shelving
Version:
Toolkit for using data in JavaScript.
16 lines (15 loc) • 912 B
TypeScript
import type { Data } from "../../util/data.js";
import type { Identifier } from "../../util/item.js";
import type { QueryFilter } from "../../util/query.js";
import type { Segments } from "../../util/string.js";
import type { Update } from "../../util/update.js";
import { type SQLFragment, SQLProvider } from "./SQLProvider.js";
/** Abstract PostgreSQL provider with JSONB function support for nested keys, array containment, and array mutations. */
export declare abstract class PostgreSQLProvider<I extends Identifier = Identifier, T extends Data = Data> extends SQLProvider<I, T> {
/** Get the Postgres JSONB path for the nested segments of a key, e.g. `{"b","c"}`. */
private sqlPath;
/** Get the Postgres JSONB extract syntax, e.g. `"a" #>> {"b","c"}` */
sqlExtract(key: Segments): SQLFragment;
sqlUpdate(update: Update): SQLFragment;
sqlFilter(filter: QueryFilter): SQLFragment;
}