Skip to content

Function: createPostgresGlobalRulesBuilder() ​

ts
function createPostgresGlobalRulesBuilder(uri, options): PostgresGlobalRulesBuilder;

Defined in: postgres/src/builders/create-postgres-global-rules-builder.ts:19

Creates a pure, side-effect-free PostgresGlobalRulesBuilder for postgres.globalRules(uri, options).

Validates options.table against strict SQL identifier rules (^[A-Za-z_][A-Za-z0-9_]*$) immediately at declaration time without opening a PostgreSQL connection.

Parameters ​

ParameterTypeDescription
uristring | EnvRefPostgreSQL connection URI or symbolic P.env(...) reference.
optionsPostgresGlobalRulesOptionsOptions specifying the target global rules table name.

Returns ​

PostgresGlobalRulesBuilder

Immutable builder for PostgresRulesSourceNode.

Throws ​

If options.table is not a valid SQL identifier.

Released under the MIT License.