sql-builder
sql-builder copied to clipboard
SQL query string builder for C++11
Does it support sub query and table alias? ``` select f.col1 A, f.col2 B, s.colx C from foo f, ( select colx from bar where colx=123) s where f.colx=s.colx ```
Very good package. There are some errors in the sample code. .where(column("score") > 60 and (column("age") >= 20 or column("address").is_not_null())) "and" should be &&, and "or" should be "||".
可以支持占位符吗
I suggest defining a Join class with table name and ON criteria and adding a std::vector to the classes that support joins.
https://www.w3schools.com/sql/sql_select_into.asp Unlike INSERT INTO, this creates a new table.
Extensions such as pgroonga have operators such as &@. Adding support for custom operators would be a nice improvement.