# Static Methods
# forClass()
const builder = QueryBuilder.forClass(modelClass);
Copied!
Create QueryBuilder for a Model subclass. You rarely need to call this. Query builders are created using the Model.query() and other query methods.
# Arguments
Argument | Type | Description |
---|---|---|
modelClass | ModelClass | A Model class constructor |
# Return value
Type | Description |
---|---|
QueryBuilder | The created query builder |
# parseRelationExpression()
const exprObj = QueryBuilder.parseRelationExpression(expr);
Copied!
Parses a string relation expression into the object notation.
# Arguments
Argument | Type | Description |
---|---|---|
expr | RelationExpression | A relation expression string or object. |
# Return value
Type | Description |
---|---|
object | The relation expression in object notation. |