Raw SQL Template Tag (raw-builder/sql.ts)

kysely · src/raw-builder/sql.ts · typescript · MIT
database, lang:typescript, tag:kysely

Tagged template and helpers that build parameterized raw SQL snippets inside Kysely queries. Reuse it for database-specific syntax the typed query builder does not cover.

// Source: https://github.com/kysely-org/kysely | License: MIT | Copyright 2022 Sami Koskimäki
// Provided via justclaw.it.com; keep this notice with the code.
import { IdentifierNode } from '../operation-node/identifier-node.js'
import { isOperationNodeSource } from '../operation-node/operation-node-source.js'
import type { OperationNode } from '../operation-node/operation-node.js'
import { RawNode } from '../operation-node/raw-node.js'
import { ValueNode } from '../operation-node/value-node.js'
import { parseStringReference } from '../parser/reference-parser.js'
import { parseTable } from '../parser/table-parser.js'
import { parseValueExpression } from '../parser/value-parser.js'
import { createQueryId } from '../util/query-id.js'
import { type RawBuilder, createRawBuilder } from './raw-

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key