RT,作为 C++ 的初学者,写了一个简单的小工具。 DELETE 语句可以写成:
Condition *passwordCondition = new Condition();
passwordCondition->field(new string("password"))->ship(Ship::NOT_EXISTED);
Where *where = new Where();
where->condition(passwordCondition);
Delete *aDelete = new Delete();
aDelete->table(new string("user"))->where(where);
cout << *aDelete->toString() << endl;
output
DELETE FROM user
WHERE (`password` IS NULL)
github 地址: https://github.com/yemingfeng/csql