Releases: co0lc0der/simple-query-builder-python
Releases · co0lc0der/simple-query-builder-python
v0.4
This is a big update. Added some new features.
- classes
MetaSingleton
andDataBase
was extracted into filedatabase.py
- added
driver
property forDataBase
class - added processing special chars (like
+
,/
etc) fortable
parameter - added type
list
fortable
parameter - added
DISTINCT
forselect()
method - added parameter
with_values=True
forget_sql()
method - added methods:
__str__()
union()
andunion_select()
forUNION
andUNION ALL
inSELECT
queriesexpects()
andexcept_select()
forEXCEPT
inSELECT
queriesintersect()
andintersect_select()
forINTERSECT
inSELECT
querieshas_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 NULL
conditionis_not_null(field)
now you can use the method forIS NOT NULL
condition- 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_errors
property and the same parameter for__init__()
(read README for details) - added
result_dict
parameter 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