The driver object for the database in use
Append a clause to the query map
void
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
Return the output of the parsing of the join condition
String
condition
:
The join condition to evalate
String
:
The parsed/escaped join condition
The driver object for the database in use
void
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
QueryBuilder
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
Group the results by the selected field(s)
QueryBuilder
Ends a logical grouping started with one of the groupStart methods
QueryBuilder
Adds an open paren to the current query for logical grouping
QueryBuilder
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
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
QueryBuilder
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
QueryBuilder
Put a limit on the query
QueryBuilder
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
QueryBuilder
Adds an open paren to the current query for logical grouping, prefixed with 'OR'
QueryBuilder
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
QueryBuilder
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
QueryBuilder
Adds an open paren to the current query for logical grouping, prefixed with 'OR NOT'
QueryBuilder
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
QueryBuilder
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
QueryBuilder
Set a 'or where in' clause
QueryBuilder
Field is not null prefixed with 'OR'
String
field
:
QueryBuilder
Field is null prefixed with 'OR'
String
field
:
QueryBuilder
Set a 'or where not in' clause
QueryBuilder
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
QueryBuilder
Tokenize the sql into parts for additional processing
String
sql
:
Object
Parse a where clause to separate functions from values
Driver
driver
:
State
state
:
String
:
The parsed/escaped where condition
Reset the object state for a new query
void
Specify rows to select in the query
QueryBuilder
Set values for insertion or updating
QueryBuilder
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
QueryBuilder
Set a 'where in' clause
QueryBuilder
Specify that a field IS NOT NULL
String
field
:
QueryBuilder
Select a field that is Null
String
field
:
The name of the field that has a NULL value
QueryBuilder
Set a 'where not in' clause
QueryBuilder