Skip to content

Releases: co0lc0der/simple-query-builder-python

v0.4

25 Dec 09:10
bfdaa12
Compare
Choose a tag to compare

This is a big update. Added some new features.

  • classes MetaSingleton and DataBase was extracted into file database.py
  • added driver property for DataBase class
  • added processing special chars (like +, / etc) for table parameter
  • added type list for table parameter
  • added DISTINCT for select() method
  • added parameter with_values=True for get_sql() method
  • added methods:
    • __str__()
    • union() and union_select() for UNION and UNION ALL in SELECT queries
    • expects() and except_select() for EXCEPT in SELECT queries
    • intersect() and intersect_select() for INTERSECT in SELECT queries
    • has_error() instead get_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

18 Mar 12:21
Compare
Choose a tag to compare

Small refactoring and fixed some bugs

  • fix and refactor pluck() method
  • small refactor query() and column() methods

v0.3.5

17 Mar 09:27
Compare
Choose a tag to compare

Refactored and added 2 methods with 2 WHERE conditions.

  • is_null(field) now you can use the method for IS NULL condition
  • is_not_null(field) now you can use the method for IS NOT NULL condition
  • added not_null(field) method as a synonym of is_not_null(field)
  • you can use those conditions with where() and having() also, usage where([['phone', "IS NULL"]]) and where([['phone', "IS NOT NULL"]])
  • you can use like() and not_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 in get_sql() method

v0.3.4

07 Oct 09:38
Compare
Choose a tag to compare

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() and having() now you can omit the operator = or IN, usage where([['id', 3]]) and where([['id', [10, 11, 12]]])
  • method pluck(key_index, column_index) returns a list of tuples of needed columns

v0.3.3

08 Sep 08:20
Compare
Choose a tag to compare

Small fixes

v0.3.1

08 Sep 06:38
Compare
Choose a tag to compare

small fixes in non code files

v0.3.0

08 Sep 05:34
Compare
Choose a tag to compare

The first release