Skip to content
Effect Days 2026 Get your ticket

MssqlClient

10 exports Added in v1.0.0 Source

Compiler

makeCompiler

Added in v1.0.0 Source

Signature

declare function makeCompiler(transform?: (_: string) => string): any

Constructors

make

Added in v1.0.0 Source

Signature

declare function make(options: MssqlClientConfig): Effect<MssqlClient, SqlError, any>

Layers

layer

Added in v1.0.0 Source

Signature

declare function layer(config: MssqlClientConfig): Layer<any, any>

layerConfig

Added in v1.0.0 Source

Signature

declare function layerConfig(config: Wrap<MssqlClientConfig>): Layer<any, any>

Models

MssqlClient interface

Added in v1.0.0 Source

Signature

interface MssqlClient extends unknown {
readonly [TypeId]: typeof TypeId;
readonly call: <I extends Record<string, Parameter<any>>, O extends Record<string, Parameter<any>>, A extends object>(procedure: ProcedureWithValues<I, O, A>) => Effect<Result<O, A>, SqlError>;
readonly config: MssqlClientConfig;
readonly param: (type: DataType, value: unknown, options?: any) => Fragment;
}

MssqlClientConfig interface

Added in v1.0.0 Source

Signature

interface MssqlClientConfig {
readonly authType?: string;
readonly connectionTTL?: any;
readonly connectTimeout?: any;
readonly database?: string;
readonly domain?: string;
readonly encrypt?: boolean;
readonly instanceName?: string;
readonly maxConnections?: number;
readonly minConnections?: number;
readonly parameterTypes?: Record<string, DataType>;
readonly password?: Redacted<string>;
readonly port?: number;
readonly server: string;
readonly spanAttributes?: Record<string, unknown>;
readonly transformQueryNames?: (str: string) => string;
readonly transformResultNames?: (str: string) => string;
readonly trustServer?: boolean;
readonly username?: string;
}

Other

Signature

declare const defaultParameterTypes: Record<Statement.PrimitiveKind, DataType>

Tags

MssqlClient

Added in v1.0.0 Source

Signature

declare const MssqlClient: any

Type Ids

TypeId

Added in v1.0.0 Source

Signature

declare const TypeId: unique symbol

TypeId type

Added in v1.0.0 Source

Signature

type TypeId = typeof TypeId