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

MysqlClient overview

Added in v1.0.0


Table of contents


compiler

makeCompiler

Signature

export declare const makeCompiler: (transform?: (_: string) => string) => 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<MysqlClient | Client.SqlClient, ConfigError>

Added in v1.0.0

models

MysqlClient (interface)

Signature

export interface MysqlClient extends Client.SqlClient {
  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?: Redacted.Redacted | undefined

  readonly host?: string | undefined
  readonly port?: number | undefined
  readonly database?: string | undefined
  readonly username?: string | undefined
  readonly password?: Redacted.Redacted | undefined

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

  readonly poolConfig?: Mysql.PoolOptions | undefined

  readonly spanAttributes?: Record<string, unknown> | undefined

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

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