import { pipe as getDb, pipeSystem } from './db.js'; import { sql } from './sql.js'; import { migrateAll, migrateOne } from '../migrate/index.js'; import { excluded } from './excluded.js'; import { advisoryLock } from './advisory-lock.js'; import { serializable } from './serializable.js'; import { bulkSet } from './bulk-set.js'; import { values } from './values.js'; import { update, insert, remove, upsert } from '../write/index.js'; import { aliasedRelation, aliasedTable, aliasedTableColumn, getTableColumns, getTableName, getViewName, getViewSelectedFields, isTable, createMany, createOne, relations } from '../query/index.js'; import { define, definitions } from '../domain/index.js'; export type { DB, SQL, Table, Column, TransactionConfig } from './types.js'; /** Query operators and aggregates — eq, gt, lt, and, or, count, sum, etc. */ export { filter } from './filter.js'; /** Returns excluded-column references for onConflictDoUpdate set clauses. */ export { excluded } from './excluded.js'; /** Database accessor — returns a Drizzle DB instance scoped to the current request/job/test context. Requires active AsyncLocalStorage context. */ export declare const pipe: typeof getDb & { /** The system channel — deliberate cross-tenant access for pre-tenant surfaces (auth membership resolution, public webhook ingress, admin tooling). Never tenant-scoped or tenant-guarded; runs on the owner-role connection outside the request transaction. */ system: typeof pipeSystem; /** Query operators and aggregates — eq, gt, lt, and, or, count, sum, etc. */ filter: { readonly and: typeof import("../query/index.js").and; readonly arrayContained: typeof import("../query/index.js").arrayContained; readonly arrayContains: typeof import("../query/index.js").arrayContains; readonly arrayOverlaps: typeof import("../query/index.js").arrayOverlaps; readonly asc: typeof import("../query/index.js").asc; readonly between: typeof import("../query/index.js").between; readonly desc: typeof import("../query/index.js").desc; readonly eq: import("../query/index.js").BinaryOperator; readonly exists: typeof import("../query/index.js").exists; readonly gt: import("../query/index.js").BinaryOperator; readonly gte: import("../query/index.js").BinaryOperator; readonly ilike: typeof import("../query/index.js").ilike; readonly inArray: typeof import("../query/index.js").inArray; readonly is: typeof import("../query/entity.js").is; readonly isNotNull: typeof import("../query/index.js").isNotNull; readonly isNull: typeof import("../query/index.js").isNull; readonly like: typeof import("../query/index.js").like; readonly lt: import("../query/index.js").BinaryOperator; readonly lte: import("../query/index.js").BinaryOperator; readonly ne: import("../query/index.js").BinaryOperator; readonly not: typeof import("../query/index.js").not; readonly notBetween: typeof import("../query/index.js").notBetween; readonly notExists: typeof import("../query/index.js").notExists; readonly notIlike: typeof import("../query/index.js").notIlike; readonly notInArray: typeof import("../query/index.js").notInArray; readonly notLike: typeof import("../query/index.js").notLike; readonly or: typeof import("../query/index.js").or; readonly avg: typeof import("../query/index.js").avg; readonly avgDistinct: typeof import("../query/index.js").avgDistinct; readonly count: typeof import("../query/index.js").count; readonly countDistinct: typeof import("../query/index.js").countDistinct; readonly max: typeof import("../query/index.js").max; readonly min: typeof import("../query/index.js").min; readonly sum: typeof import("../query/index.js").sum; readonly sumDistinct: typeof import("../query/index.js").sumDistinct; readonly except: import("../query/pg-core/index.js").PgCreateSetOperatorFn; readonly exceptAll: import("../query/pg-core/index.js").PgCreateSetOperatorFn; readonly intersect: import("../query/pg-core/index.js").PgCreateSetOperatorFn; readonly intersectAll: import("../query/pg-core/index.js").PgCreateSetOperatorFn; readonly union: import("../query/pg-core/index.js").PgCreateSetOperatorFn; readonly unionAll: import("../query/pg-core/index.js").PgCreateSetOperatorFn; readonly increment: typeof import("./expressions.js").increment; readonly decrement: typeof import("./expressions.js").decrement; readonly add: typeof import("./expressions.js").add; readonly subtract: typeof import("./expressions.js").subtract; readonly coalesce: typeof import("./expressions.js").coalesce; readonly now: typeof import("./expressions.js").now; readonly scalar: typeof import("./expressions.js").scalar; readonly cast: typeof import("./expressions.js").cast; readonly interval: typeof import("./expressions.js").interval; readonly dateTrunc: typeof import("./expressions.js").dateTrunc; readonly rowNumber: typeof import("./expressions.js").rowNumber; readonly rank: typeof import("./expressions.js").rank; readonly denseRank: typeof import("./expressions.js").denseRank; readonly over: typeof import("./expressions.js").over; readonly identifier: typeof import("./expressions.js").identifier; readonly withRecursive: typeof import("./expressions.js").withRecursive; readonly ago: typeof import("./composed.js").ago; readonly castUuid: typeof import("./composed.js").castUuid; readonly castJsonb: typeof import("./composed.js").castJsonb; readonly castTimestamp: typeof import("./composed.js").castTimestamp; readonly castBoolean: typeof import("./composed.js").castBoolean; readonly castNumeric: typeof import("./composed.js").castNumeric; readonly castInteger: typeof import("./composed.js").castInteger; readonly castText: typeof import("./composed.js").castText; readonly nextSequence: typeof import("./composed.js").nextSequence; readonly caseWhen: typeof import("./expressions.js").caseWhen; readonly walCurrentLsn: typeof import("./expressions.js").walCurrentLsn; readonly walReplayLsn: typeof import("./expressions.js").walReplayLsn; readonly replicaFresh: typeof import("./expressions.js").replicaFresh; readonly jsonbExtract: typeof import("../jsonb/query.js").json; readonly jsonbExtractText: typeof import("../jsonb/query.js").pathText; readonly jsonbContains: typeof import("../jsonb/query.js").contains; }; /** Raw statement tag — for a statement pipework does not model. Interpolated values are parameters; `sql.raw` is not. Runs on the caller's connection, so inside a request it is the request transaction. Writes still go through pipe.update / insert / delete, which is what audit hooks. */ sql: typeof sql; aliasedRelation: typeof aliasedRelation; aliasedTable: typeof aliasedTable; aliasedTableColumn: typeof aliasedTableColumn; getTableColumns: typeof getTableColumns; getTableName: typeof getTableName; getViewName: typeof getViewName; getViewSelectedFields: typeof getViewSelectedFields; isTable: typeof isTable; createMany: typeof createMany; createOne: typeof createOne; relations: typeof relations; /** Runs migrations for all configured databases. */ migrate: typeof migrateAll; /** Runs migrations for a single named database. */ migrateOne: typeof migrateOne; /** Returns excluded-column references for onConflictDoUpdate set clauses. */ excluded: typeof excluded; /** Acquires a transaction-scoped advisory lock. Released at commit/rollback. */ advisoryLock: typeof advisoryLock; /** Runs a function in a SERIALIZABLE transaction with automatic retry on serialization failures and deadlocks. */ serializable: typeof serializable; /** Bulk UPDATE ... FROM (VALUES ...) — updates multiple rows with per-row values in a single statement. */ bulkSet: typeof bulkSet; /** Produces a typed VALUES clause for bulk operations — the base primitive for bulkSet and bulkUpsert. */ values: typeof values; /** Field builders for domain definitions — uuid(), text(), integer(), etc. */ field: { uuid(): import("../domain/types.js").FieldDescriptor & import("../domain/field.js").FieldModifiers; text(): import("../domain/types.js").FieldDescriptor & import("../domain/field.js").FieldModifiers; integer(): import("../domain/types.js").FieldDescriptor & import("../domain/field.js").FieldModifiers; serial(): import("../domain/types.js").FieldDescriptor & import("../domain/field.js").FieldModifiers; bigint(): import("../domain/types.js").FieldDescriptor & import("../domain/field.js").FieldModifiers; boolean(): import("../domain/types.js").FieldDescriptor & import("../domain/field.js").FieldModifiers; timestamp(): import("../domain/types.js").FieldDescriptor & import("../domain/field.js").FieldModifiers; date(): import("../domain/types.js").FieldDescriptor & import("../domain/field.js").FieldModifiers; enum(values: V): import("../domain/types.js").FieldDescriptor & import("../domain/field.js").FieldModifiers; jsonb(shape: S): import("../domain/types.js").FieldDescriptor, {}> & import("../domain/field.js").FieldModifiers, {}>; decimal(): import("../domain/types.js").FieldDescriptor & import("../domain/field.js").FieldModifiers; money(p?: number, s?: number): import("../domain/types.js").FieldDescriptor & import("../domain/field.js").FieldModifiers; pgLsn(): import("../domain/types.js").FieldDescriptor & import("../domain/field.js").FieldModifiers; custom(column: unknown, validator: S): import("../domain/types.js").FieldDescriptor, {}> & import("../domain/field.js").FieldModifiers, {}>; }; /** Registers a domain definition with table, validators, and factory projections. */ define: typeof define; /** Returns the global registry of all domain definitions. */ definitions: typeof definitions; /** Pipework-owned UPDATE builder — the only consumer-facing way to update pipework-managed tables (Q8). */ update: typeof update; /** Pipework-owned INSERT builder — the only consumer-facing way to insert into pipework-managed tables (Q8). */ insert: typeof insert; /** Pipework-owned DELETE builder — the only consumer-facing way to delete from pipework-managed tables (Q8). */ delete: typeof remove; /** Pipework-owned UPSERT builder — insert with conflict resolution (Q8). */ upsert: typeof upsert; }; //# sourceMappingURL=namespace.d.ts.map