formatPostgresSqlLiteral (lib/postgres-row-sql.ts)

appwrite · apps/console/src/lib/postgres-row-sql.ts · typescript · BSD-3-Clause
database

TypeScript helpers for formatting Postgres literals, building row identities, and generating SQL clauses.

// Source: https://github.com/appwrite/appwrite | License: BSD-3-Clause | Copyright 2019 Appwrite (https://appwrite.io) and individual contributors
// Provided via justclaw.it.com; keep this notice with the code.
import {
  parsePostgresTableId,
  quotePostgresIdentifier,
} from '@/lib/postgres-database-routes'
import type { PostgresTableColumnRow } from '@/lib/postgres-sql'
import {
  buildPostgresColumnTypeSql,
  parsePostgresColumnTypeFromRow,
} from '@/lib/postgres-column-types'
import {
  isPostgresPrimaryKeyColumn,
  prefixPostgresSqlComment,
  quotePostgresStringLiteral,
} from '@/lib/postgres-sql'
import type { RowCellValue } from '@/lib/database-row-inline-edits'
import { getErrorMessage } from '@/lib/utils/error-formatting'

type PostgresColumnLiteralMeta = Pick<
  PostgresTableC

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

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

Get a free API key