Skip to content

SqlRow — @gj-kit/toss-payments-postgresql

A public interface from @gj-kit/toss-payments-postgresql. The signature below is taken directly from the 0.5.1 release declaration.

import { SqlRow } from '@gj-kit/toss-payments-postgresql';
/**
* SqlClient seam — 이 패키지의 유일한 드라이버 접점 (설계 §2).
*
* `pg`는 peer조차 아니다: 타입 import까지 금지하고 구조적 타입 {@link PgPoolLike}
* 소비한다. TypeORM/Prisma/postgres.js 사용자는 {@link SqlClient}를 직접 구현한다.
*
* 계약 요점:
* - `$1, $2` 위치 파라미터 규약(PostgreSQL 프로토콜). 실패는 그대로 throw —
* 드라이버 에러를 감싸지 않는다(errors.ts 원칙).
* - `rowCount`에 의존하지 않는다 — 존재 판정은 전부 RETURNING/SELECT의 rows로 한다
* (드라이버 간 이식성: rowCount 노출 형태가 제각각이다).
* - `withConnection`은 migrate()·PostgreSQL billing-key mutation lock·opaque lifecycle
* advisory lock의 트랜잭션이 풀의 서로 다른 커넥션으로 흩어지지 않게 한다. 일반
* 스토어 경로는 단일 문이지만 lock callback은 이 세션을 유지한다.
*/
interface SqlRow {
readonly [column: string]: unknown;
}

This declaration is the source of truth for parameters, optionality, generics, return values, and public union/type contracts. Check the package golden path and this subpath’s import conditions for required environment, permission, and error boundaries before calling it.

  • Package: @gj-kit/toss-payments-postgresql
  • Version: 0.5.1
  • Public entry: .
  • Source: GitHub