index overview
Added in v1.0.0
Table of contents
constructor
PgClientConfig (interface)
Signature
export interface PgClientConfig {
readonly url?: Secret.Secret
readonly host?: string
readonly port?: number
readonly path?: string
readonly ssl?: boolean
readonly database?: string
readonly username?: string
readonly password?: Secret.Secret
readonly idleTimeout?: Duration.DurationInput
readonly connectTimeout?: Duration.DurationInput
readonly maxConnections?: number
readonly connectionTTL?: Duration.DurationInput
readonly transformResultNames?: (str: string) => string
readonly transformQueryNames?: (str: string) => string
readonly transformJson?: boolean
readonly fetchTypes?: boolean
readonly debug?: postgres.Options<{}>["debug"]
}
Added in v1.0.0
make
Signature
export declare const make: (options: PgClientConfig) => Effect.Effect<PgClient, never, Scope>
Added in v1.0.0
makeCompiler
Signature
export declare const makeCompiler: (
transform?: ((_: string) => string) | undefined,
transformJson?: boolean
) => Statement.Compiler
Added in v1.0.0
makeLayer
Signature
export declare const makeLayer: (config: Config.Config.Wrap<PgClientConfig>) => Layer.Layer<PgClient, ConfigError>
Added in v1.0.0
model
PgClient (interface)
Signature
export interface PgClient extends Client.Client {
readonly config: PgClientConfig
readonly json: (_: unknown) => Fragment
readonly array: (_: ReadonlyArray<Primitive>) => Fragment
}
Added in v1.0.0
tag
tag
Signature
export declare const tag: Tag<PgClient, PgClient>
Added in v1.0.0
utils
transform
Column renaming helpers.
Signature
export declare const transform: typeof transform
Added in v1.0.0