Constructor
new Query(database, escaper, queryExecuter)
Initialize the query.
Parameters:
Name | Type | Description |
---|---|---|
database |
Database | A Database instance to query. |
escaper |
Escaper | An instance of an Escaper matching the database type (i.e. MySQLEscaper or MSSQLEscaper). |
queryExecuter |
QueryExecuter | queryExecuter A QueryExecuter instance. |
- Source:
Members
database
Properties:
Name | Type | Description |
---|---|---|
database |
Database | A database instance. |
escaper |
Escaper | An instance of an Escaper class that can escape query parts. |
queryExecuter |
QueryExecuter | An instance of a QueryExecuter that can execute CRUD operations. |
- Source:
Methods
buildQuery() → {Query~QueryMeta}
Build the query.
- Source:
Returns:
The string-representation of the query to
execute along with any query parameters.
- Type
- Query~QueryMeta
Type Definitions
QueryMeta
Type:
- Object | Array.<Object>
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
sql |
string | The string representation of the query. | |
params |
Object | An object containing query parameters. | |
modelMeta |
Object |
<optional> |
An optional meta object containing extra information about the model. |
- Source: