Releases: co0lc0der/simple-query-builder-python
Releases · co0lc0der/simple-query-builder-python
v0.4
This is a big update. Added some new features.
- classes
MetaSingletonandDataBasewas extracted into filedatabase.py - added
driverproperty forDataBaseclass - added processing special chars (like
+,/etc) fortableparameter - added type
listfortableparameter - added
DISTINCTforselect()method - added parameter
with_values=Trueforget_sql()method - added methods:
__str__()union()andunion_select()forUNIONandUNION ALLinSELECTqueriesexpects()andexcept_select()forEXCEPTinSELECTqueriesintersect()andintersect_select()forINTERSECTinSELECTquerieshas_error()insteadget_error()(in the next version)
- written unit test for all SQL methods
- README was separated for some files
- added
create_view()method (CREATE VIEW view_name AS SQL_SELECT) - added
drop_view()method (DROP VIEW view_name)
v0.3.6
v0.3.5
Refactored and added 2 methods with 2 WHERE conditions.
is_null(field)now you can use the method forIS NULLconditionis_not_null(field)now you can use the method forIS NOT NULLcondition- added
not_null(field)method as a synonym ofis_not_null(field) - you can use those conditions with
where()andhaving()also, usagewhere([['phone', "IS NULL"]])andwhere([['phone', "IS NOT NULL"]]) - you can use
like()andnot_like()methods with no brackets[] - added
_print_errorsproperty and the same parameter for__init__()(read README for details) - added
result_dictparameter for__init__()(read README for details) - change
?to the corresponding values inget_sql()method
v0.3.4
Refactored and added some methods.
order_by()now you can use multiple fields for sorting (use a list like['field1', 'field2 desc'])group_by()now you can use multiple fields for grouping (use a list like['field1', 'field2'])where()andhaving()now you can omit the operator=orIN, usagewhere([['id', 3]])andwhere([['id', [10, 11, 12]]])- method
pluck(key_index, column_index)returns a list of tuples of needed columns