Skip to content

Releases: co0lc0der/simple-query-builder-php

v0.4.1

05 Feb 11:53
c065779
Compare
Choose a tag to compare

Here will be a description

v0.4

05 Feb 05:54
18291fa
Compare
Choose a tag to compare

This is a big update. Added some new features.

  • added processing special chars (like +, / etc) for $table parameter
  • added DISTINCT for select() method
  • added parameter withValues=true for getSql() method
  • added methods:
    • __toString()
    • union() and unionSelect() for UNION and UNION ALL in SELECT queries
    • expects() and exceptSelect() for EXCEPT in SELECT queries
    • intersect() and intersectSelect() for INTERSECT in SELECT queries
    • getDriver()
  • written unit tests for all SQL methods
  • README was separated for some files
  • added createView() method (CREATE VIEW view_name AS SQL_SELECT)
  • added dropView() method (DROP VIEW view_name)

v0.3.6

21 Mar 12:05
Compare
Choose a tag to compare

Small refactoring and fixed some bugs

  • fix and refactor pluck() method
  • fix and refactor column() method
  • small refactor query() method
  • you can use like() and notLike() methods with no brackets []
  • added $printErrors property and the same parameter for __construct() (read README for details)

v0.3.5

21 Mar 09:24
Compare
Choose a tag to compare

Refactored and added 2 methods with 2 WHERE conditions.

  • isNull($field) now you can use the method for IS NULL condition
  • isNotNull($field) now you can use the method for IS NOT NULL condition
  • added notNull($field) method as a synonym of isNotNull($field)
  • you can use those conditions with where() and having() also, usage where([['phone', "IS NULL"]]) and where([['phone', "IS NOT NULL"]])
  • change ? to the corresponding values in getSql() method

v0.3.4

30 Oct 12:43
Compare
Choose a tag to compare

Refactored and added some methods.

  • orderBy() now you can use multiple fields for sorting (use an array like ['field1', 'field2 desc'])
  • groupBy() now you can use multiple fields for grouping (use an array 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 an array of needed columns
  • method exists() returns true if SQL query result has a row

v0.3

10 Aug 10:43
Compare
Choose a tag to compare

Refactored most part of QueryBuilder class and added new functionality

PAY ATTENTION! v0.2 and v0.3+ are incompatible.

v0.2

07 Oct 21:46
Compare
Choose a tag to compare
add shields to readme

v0.1

07 Oct 21:04
Compare
Choose a tag to compare
add license