join() function
Several fragments, one after another.
Signature:
export declare function join(parts: readonly SqlFragment[], separator?: string): SqlFragment;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
parts |
readonly SqlFragment[] |
The fragments to join. |
|
separator |
string |
(Optional) What goes between them. Defaults to |
Returns:
One fragment, with its placeholders renumbered in order.
Example
sql`WHERE ${join(matches, ' OR ')}`;
Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.