[–] ltbarcly3 6y ago ↗ I created this to provide a simple way to generate SQL after becoming frustrated with other libraries.Things that distinguish this library from other SQL generation libraries:- (N)ot an (ORM), so there are no schemas or table definitions to maintain in code.- is really dumb. It is just doing string concatenation internally, so whatever you type into it will appear as is in the query.- lets you build up queries safely, like most other SQL generation libraries.- provides a simple, consistent wrapper for Python DB-API libraries, while still directly exposing all the functionality of those libraries- code looks almost identical to the generated SQL- the generated SQL is very nicely formatted for humans to read (either for debugging or in database logs).- makes it possible to safely generate multiple row inserts in a single INSERT statement, even with heterogeneous columns in each row.
1 comment
[ 2.4 ms ] story [ 15.8 ms ] threadThings that distinguish this library from other SQL generation libraries:
- (N)ot an (ORM), so there are no schemas or table definitions to maintain in code.
- is really dumb. It is just doing string concatenation internally, so whatever you type into it will appear as is in the query.
- lets you build up queries safely, like most other SQL generation libraries.
- provides a simple, consistent wrapper for Python DB-API libraries, while still directly exposing all the functionality of those libraries
- code looks almost identical to the generated SQL
- the generated SQL is very nicely formatted for humans to read (either for debugging or in database logs).
- makes it possible to safely generate multiple row inserts in a single INSERT statement, even with heterogeneous columns in each row.