SQLFragmentclass
new SQLFragment(strings: ImmutableArray<string>, values: ImmutableArray<unknown>)
| Param | Type | |
|---|---|---|
strings | ImmutableArray<string> | Immutable array: an array that cannot be changed. required |
values | ImmutableArray<unknown> | Immutable array: an array that cannot be changed. required |
| Return | |
|---|---|
SQLFragment | SQL fragment made from template strings plus embedded expressions, ready to be composed into a query. |
| Property | Type | |
|---|---|---|
.strings | ImmutableArray<string> | Immutable array: an array that cannot be changed. required readonly |
.values | ImmutableArray<unknown> | Immutable array: an array that cannot be changed. required readonly |
SQL fragment made from template strings plus embedded expressions, ready to be composed into a query.
- Flattens eagerly:
SQLFragmentvalues are spliced inline at construction, sovaluesonly ever contains bindable parameters (or driver-specific identifier tokens) — never other fragments. - Concrete providers can therefore pass
strings/valuesstraight to their driver, and detect fragments with a plaininstanceofcheck.