node-mysql-query-utils
Advanced tools
Changelog
[1.0.6] - 2024-12-06
SQLBuilder
Class:
IN
condition in the buildWhereClause
method.
{ user_id: [1, 2, 3] }
translates to user_id IN (1, 2, 3)
.ctime
and utime
values to avoid caching the value when the server starts.
ctimeValue
and utimeValue
are functions and called them for each row to set the current time if not provided.Changelog
[1.0.5] - 2024-11-28
Raw SQL Support in Fields:
fields
parameter of the SQLBuilder
class.RawField
type, enabling greater flexibility in query construction.Default Table Alias in TableModel
Class:
tableNameAlias
property in the TableModel
constructor to set a default alias for the table.createXXXXXX()
Methods in TableModel
Class:
createXXXXXX()
methods (createSelect
, createUpdate
, createInsert
, etc.) were using the same instance of SQLBuilder
.SQLBuilder
, preventing SQL query misconstruction and ensuring thread safety.Changelog
[1.0.4] - 2024-10-07
update
method of the SQLBuilder
class.
{ increment: number }
or { decrement: number }
for fields to increment or decrement their values.increment
and decrement
are provided for the same field.LIKE
and NOT LIKE
operators handling in the SQLBuilder
class.
contains
, startsWith
, or endsWith
are provided for the same field.Changelog
[1.0.3] - 2024-10-01
TableModel
class return methods.NOT IN
, NOT LIKE
, and REGEXP
operators to the where
condition parameter in the SQLBuilder
class.LIKE
and NOT LIKE
operators, previously only accepted strings. Now added support for contains
, startsWith
, and endsWith
for more flexible use cases.Changelog
[1.0.2] - 2024-09-30
options
parameter to buildQuery
method to support query formatting.queryParts
private to prevent accidental exposure. queryParts
is an internal structure used to build SQL queries and should not be accessed directly.Changelog
[1.0.0] - 2024-09-27
node-mysql-query-utils
.patchSingleField
function was not working as expected due to the misalignment between the dist folder and the source code.