SqliteQueryCompiler (sqlite/sqlite-query-compiler.ts)

kysely · src/dialect/sqlite/sqlite-query-compiler.ts · typescript · MIT
database

SQLite-specific query compiler extending default compiler.

// 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 type { DefaultInsertValueNode } from '../../operation-node/default-insert-value-node.js'
import type { OrActionNode } from '../../operation-node/or-action-node.js'
import { DefaultQueryCompiler } from '../../query-compiler/default-query-compiler.js'

const ID_WRAP_REGEX = /"/g
const JSON_PATH_MEMBER_ESCAPE_REGEX = /[\\'"]/g

export class SqliteQueryCompiler extends DefaultQueryCompiler {
  protected override visitOrAction(node: OrActionNode): void {
    this.append('or ')
    this.append(node.action)
  }

  protected override getCurrentParameterPlaceholder(): string {
    return '?'
  }

  protected override getLeftExplainOpt

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

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

Get a free API key