node-querybuilder
Advanced tools
Changelog
v0.9.0 (2015-02-05)
SELECT DISTINCT
queriesselect * from users u
)OR WHERE
statements with or_where()
method.LIKE
statements directly (new methods: like()
, not_like()
, or_like()
, or_not_like()
)WHERE IN(...)
statements by passing an array as the second param to where()
[OR] WHERE [NOT] IN(...)
statements directly (new methods: where_in()
, or_where_in()
, where_not_in()
, or_where_not_in()
)FROM
statements directly for SELECT
and DELETE
queries (new method: from()
) (ex. db.from('foo').get(() => ...))JOIN
statements.get_where()
as a shorthand to get()
and where()
(ex. db.get_where('table',{foo: 'bar'},() => ...);
)select_min()
, select_max()
, select_avg()
, and select_sum()
.OR HAVING
statements with or_having()
methodlimit()
method by using the offset()
method.SET
values for updates and inserts using the set()
method.UPDATE
statements now support ORDER BY
clauses which can be added to the query using the order_by()
method.update()
method's 3rd parameter can now either be the callback (as always) or a WHERE
clause (ex. 'foo = "bar"' or {foo:'bar', id: 3}). If a where clause is provided, the callback is now the 4th parameter. This change is fully backwards-compatible with the previous version of this module.where()
method works is deprecated... starting with v1.0.0, third param will be (bool) escape
and not (bool) isRaw
. So, all calls to this method using the 3rd parameter will, in future, have to be changed by converting true
to false
and vice versa. This is so that we have a consistent API throughout the library.escape()
methodupdate_batch()
method.truncate()
and empty_table()
methods.