The driver object for the database in use
Determine whether a variable is of the type specified in the function name, eg isNumber
Types available are Null, Undefined, Object, Array, String, Number, Boolean, Function, RegExp, NaN and Infinite
mixed
o
:
Boolean
.isScalar(obj)
Determine whether an object is scalar
Determine whether an object is scalar
mixed
obj
:
bool
.type(o)
Get the type of the variable passed
Get the type of the variable passed
mixed
o
:
String
.isScalar(obj)
Determine whether an object is scalar
Determine whether an object is scalar
mixed
obj
:
bool
.type(o)
Get the type of the variable passed
Get the type of the variable passed
mixed
o
:
String
Return the output of the parsing of the join condition
String
condition
:
The join condition to evalate
String
:
The parsed/escaped join condition
Run the generated delete query
String
table
:
The table to insert into
[Object
]
where
:
Where clause for delete statement
Function
callback
:
Callback for handling response from the database
:
void
Closes the database connection for the current adapter
:
void
Specify the database table to select from
String
tableName
:
The table to use for the current query
:
this
Get the results of the compiled query
[String
]
table
:
The table to select from
[Number
]
limit
:
A limit for the query
[Number
]
offset
:
An offset for the query
Function
callback
:
A callback for receiving the result
:
void
Return generated delete query SQL
String
table
:
the name of the table to delete from
[Boolean
]
reset
(default true
)
:
Whether to reset the query builder so another query can be built
String
Return generated insert query SQL
String
table
:
the name of the table to insert into
[Boolean
]
reset
(default true
)
:
Whether to reset the query builder so another query can be built
String
Return generated select query SQL
[String
]
table
:
the name of the table to retrieve from
[Boolean
]
reset
(default true
)
:
Whether to reset the query builder so another query can be built
:
String
Return generated update query SQL
String
table
:
the name of the table to update
[Boolean
]
reset
(default true
)
:
Whether to reset the query builder so another query can be built
String
Return an existing query builder instance
queryBuilder
Group the results by the selected field(s)
:
this
Ends a logical grouping started with one of the groupStart methods
:
this
Adds an open paren to the current query for logical grouping
:
this
Check if the string contains an operator, and if so, return the operator(s). If there are no matches, return null
String
string
:
the string to check
Array
or
Add a 'having' clause
String
or Object
key
:
The name of the field and the comparision operator, or an object
[String
or Number
]
val
:
The value to compare if the value of key is a string
:
this
Create a query builder object
String
drivername
:
The name of the database type, eg. mysql or pg
Object
connObject
:
A connection object from the database library you are connecting with
[String
]
connLib
:
The name of the db connection library you are using, eg. mysql or mysql2. Optional if the same as drivername
queryBuilder
Run the generated insert query
String
table
:
The table to insert into
[Object
]
data
:
Data to insert, if not already added with the 'set' method
Function
callback
:
Callback for handling response from the database
:
void
Insert multiple sets of rows at a time
String
table
:
The table to insert into
Array
data
:
The array of objects containing data rows to insert
Function
callback
:
Callback for handling database response
:
void
query.insertBatch('foo',[{id:1,val:'bar'},{id:2,val:'baz'}], callbackFunction);
Add a join clause to the query
String
table
:
The table you are joining
String
cond
:
The join condition.
[String
]
type
(default 'inner'
)
:
The type of join, which defaults to inner
:
this
Add a 'like/ and like' clause to the query
String
field
:
The name of the field to compare to
String
val
:
The value to compare to
[String
]
pos
(default both
)
:
The placement of the wildcard character(s): before, after, or both
:
this
Put a limit on the query
:
this
Add a 'not like/ and not like' clause to the query
String
field
:
The name of the field to compare to
String
val
:
The value to compare to
[String
]
pos
(default both
)
:
The placement of the wildcard character(s): before, after, or both
:
this
Adds an open paren to the current query for logical grouping, prefixed with 'OR'
:
this
Add an 'or having' clause
String
or Object
key
:
The name of the field and the comparision operator, or an object
[String
or Number
]
val
:
The value to compare if the value of key is a string
:
this
Add an 'or like' clause to the query
String
field
:
The name of the field to compare to
String
val
:
The value to compare to
[String
]
pos
(default both
)
:
The placement of the wildcard character(s): before, after, or both
:
this
Adds an open paren to the current query for logical grouping, prefixed with 'OR NOT'
:
this
Add an 'or not like' clause to the query
String
field
:
The name of the field to compare to
String
val
:
The value to compare to
[String
]
pos
(default both
)
:
The placement of the wildcard character(s): before, after, or both
:
this
Set a 'or where' clause
String
or Object
key
:
The name of the field and the comparision operator, or an object
[String
or Number
]
val
:
The value to compare if the value of key is a string
:
this
Set a 'or where in' clause
:
this
Field is not null prefixed with 'OR'
String
field
:
:
this
Field is null prefixed with 'OR'
String
field
:
:
this
Set a 'or where not in' clause
:
this
Order the results by the selected field(s)
String
field
:
The field(s) to order by
[String
]
type
(default 'ASC'
)
:
The order direction, ASC or DESC
:
this
Tokenize the sql into parts for additional processing
String
sql
:
Object
Parse a where clause to separate functions from values
String
:
The parsed/escaped where condition
Reset the object state for a new query
:
void
Specify rows to select in the query
:
this
Set values for insertion or updating
:
this
Run the generated update query
String
table
:
The table to insert into
[Object
]
data
:
Data to insert, if not already added with the 'set' method
Function
callback
:
Callback for handling response from the database
:
void
Set a 'where' clause
String
or Object
key
:
The name of the field and the comparision operator, or an object
[String
or Number
]
val
:
The value to compare if the value of key is a string
:
this
Set a 'where in' clause
:
this
Specify that a field IS NOT NULL
String
field
:
:
this
Select a field that is Null
String
field
:
The name of the field that has a NULL value
:
this