Function
| Static Public Summary | ||
| public |
format(arr: unknown[], dialect: AbstractDialect): * this function was deprecated. use {@link injectReplacements} instead. This method has been removed in v7.
|
|
| public |
formatNamedParameters(sql: string, parameters: object, dialect: AbstractDialect): * this function was deprecated. use {@link injectReplacements} instead. This method has been removed in v7.
|
|
| public |
injectReplacements(sqlString: *, dialect: *, replacements: *): * Inlines replacements in places where they would be valid SQL values. |
|
| public |
safeStringifyJson(value: any): string Stringify a value as JSON with some differences:
|
|
Static Public
public format(arr: unknown[], dialect: AbstractDialect): * source
Params:
| Name | Type | Attribute | Description |
| arr | unknown[] | first item is the SQL, following items are the positional replacements. |
|
| dialect | AbstractDialect |
Return:
| * |
public formatNamedParameters(sql: string, parameters: object, dialect: AbstractDialect): * source
Return:
| * |
public injectReplacements(sqlString: *, dialect: *, replacements: *): * source
Inlines replacements in places where they would be valid SQL values.
Params:
| Name | Type | Attribute | Description |
| sqlString | * | The SQL that contains the replacements |
|
| dialect | * | The dialect of the SQL |
|
| replacements | * | if provided, this method will replace ':named' replacements & positional replacements (?) |
Return:
| * | The SQL with replacements rewritten in their dialect-specific syntax. |
Guides
Reference
Source
