Add TreeModel and HasSubtree implementation
This commit is contained in:
@@ -316,6 +316,8 @@ export class PostgreSQLDialect extends SQLDialect {
|
||||
const field: string = constraint.field.split('.').map(x => `"${x}"`)
|
||||
.join('.')
|
||||
statements.push(`${indent}${statements.length < 1 ? '' : constraint.preop + ' '}${field} ${constraint.operator} ${this.escape(constraint.operand).value}`)
|
||||
} else if ( constraint instanceof QuerySafeValue ) {
|
||||
statements.push(`${indent}${statements.length < 1 ? '' : 'AND '}${constraint.toString()}`)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ export type EscapeValue = null | undefined | string | number | boolean | Date |
|
||||
export type EscapeValueObject = { [field: string]: EscapeValue }
|
||||
|
||||
/**
|
||||
* A wrapper class whose value is save to inject directly into a query.
|
||||
* A wrapper class whose value is safe to inject directly into a query.
|
||||
*/
|
||||
export class QuerySafeValue {
|
||||
constructor(
|
||||
|
||||
Reference in New Issue
Block a user