Skip to main content Link Search Menu Expand Document (external link)

Client overview

Added in v1.0.0


Table of contents


compiler

makeCompiler

Signature

export declare const makeCompiler: (transform?: ((_: string) => string) | undefined) => any

Added in v1.0.0

constructors

make

Signature

export declare const make: (options: MysqlClientConfig) => Effect.Effect<MysqlClient, never, Scope>

Added in v1.0.0

layers

layer

Signature

export declare const layer: (config: Config.Config.Wrap<MysqlClientConfig>) => Layer.Layer<any, ConfigError>

Added in v1.0.0

models

MysqlClient (interface)

Signature

export interface MysqlClient extends Client.Client {
  readonly [TypeId]: TypeId
  readonly config: MysqlClientConfig
}

Added in v1.0.0

MysqlClientConfig (interface)

Signature

export interface MysqlClientConfig {
  /**
   * Connection URI. Setting this will override the other connection options
   */
  readonly url?: Secret.Secret

  readonly host?: string
  readonly port?: number
  readonly database?: string
  readonly username?: string
  readonly password?: Secret.Secret

  readonly maxConnections?: number
  readonly connectionTTL?: Duration.DurationInput

  readonly poolConfig?: Mysql.PoolOptions

  readonly transformResultNames?: (str: string) => string
  readonly transformQueryNames?: (str: string) => string
}

Added in v1.0.0

tags

MysqlClient

Signature

export declare const MysqlClient: any

Added in v1.0.0

type ids

TypeId

Signature

export declare const TypeId: typeof TypeId

Added in v1.0.0

TypeId (type alias)

Signature

export type TypeId = typeof TypeId

Added in v1.0.0