DB

Overview

Location

Instance Methods


constructor

 

constructor

 

DB()

 

init()

 

Sub New()

constructor (DB)

 

constructor(value: DB)

 

DB(DB value)

 

init(_ value: DB)

 

Sub New(value As DB)

Parameters:

  • value:

Begin

 

method Begin: tuple of (Memory<Tx>, error)

 

(Memory<Tx>, error) Begin()

 

func Begin() -> (Memory<Tx>, error)

 

func Begin() tuple of (Memory<Tx>, error)

 

Function Begin() As Tuple (Of Memory<Tx>, error)

BeginTx

 

method BeginTx(ctx: Context; opts: Memory<TxOptions>): tuple of (Memory<Tx>, error)

 

(Memory<Tx>, error) BeginTx(Context ctx, Memory<TxOptions> opts)

 

func BeginTx(_ ctx: Context, _ opts: Memory<TxOptions>) -> (Memory<Tx>, error)

 

func BeginTx(ctx Context, opts Memory<TxOptions>) tuple of (Memory<Tx>, error)

 

Function BeginTx(ctx As Context, opts As Memory<TxOptions>) As Tuple (Of Memory<Tx>, error)

Parameters:

  • ctx:
  • opts:

Close

 

method Close: error

 

error Close()

 

func Close() -> error

 

func Close() error

 

Function Close() As error

Conn

 

method Conn(ctx: Context): tuple of (Memory<Conn>, error)

 

(Memory<Conn>, error) Conn(Context ctx)

 

func Conn(_ ctx: Context) -> (Memory<Conn>, error)

 

func Conn(ctx Context) tuple of (Memory<Conn>, error)

 

Function Conn(ctx As Context) As Tuple (Of Memory<Conn>, error)

Parameters:

  • ctx:

Driver

 

method Driver: Driver

 

Driver Driver()

 

func Driver() -> Driver

 

func Driver() Driver

 

Function Driver() As Driver

Exec

 

method Exec(query: string; params args: array of Object): tuple of (Result, error)

 

(Result, error) Exec(string query, params Object[] args)

 

func Exec(_ query: string, _ args: Object...) -> (Result, error)

 

func Exec(query string, args []interface{}) tuple of (Result, error)

 

Function Exec(query As string, ParamArray args As Object()) As Tuple (Of Result, error)

Parameters:

  • query:
  • args:

ExecContext

 

method ExecContext(ctx: Context; query: string; params args: array of Object): tuple of (Result, error)

 

(Result, error) ExecContext(Context ctx, string query, params Object[] args)

 

func ExecContext(_ ctx: Context, _ query: string, _ args: Object...) -> (Result, error)

 

func ExecContext(ctx Context, query string, args []interface{}) tuple of (Result, error)

 

Function ExecContext(ctx As Context, query As string, ParamArray args As Object()) As Tuple (Of Result, error)

Parameters:

  • ctx:
  • query:
  • args:

Ping

 

method Ping: error

 

error Ping()

 

func Ping() -> error

 

func Ping() error

 

Function Ping() As error

PingContext

 

method PingContext(ctx: Context): error

 

error PingContext(Context ctx)

 

func PingContext(_ ctx: Context) -> error

 

func PingContext(ctx Context) error

 

Function PingContext(ctx As Context) As error

Parameters:

  • ctx:

Prepare

 

method Prepare(query: string): tuple of (Memory<Stmt>, error)

 

(Memory<Stmt>, error) Prepare(string query)

 

func Prepare(_ query: string) -> (Memory<Stmt>, error)

 

func Prepare(query string) tuple of (Memory<Stmt>, error)

 

Function Prepare(query As string) As Tuple (Of Memory<Stmt>, error)

Parameters:

  • query:

PrepareContext

 

method PrepareContext(ctx: Context; query: string): tuple of (Memory<Stmt>, error)

 

(Memory<Stmt>, error) PrepareContext(Context ctx, string query)

 

func PrepareContext(_ ctx: Context, _ query: string) -> (Memory<Stmt>, error)

 

func PrepareContext(ctx Context, query string) tuple of (Memory<Stmt>, error)

 

Function PrepareContext(ctx As Context, query As string) As Tuple (Of Memory<Stmt>, error)

Parameters:

  • ctx:
  • query:

Query

 

method Query(query: string; params args: array of Object): tuple of (Memory<Rows>, error)

 

(Memory<Rows>, error) Query(string query, params Object[] args)

 

func Query(_ query: string, _ args: Object...) -> (Memory<Rows>, error)

 

func Query(query string, args []interface{}) tuple of (Memory<Rows>, error)

 

Function Query(query As string, ParamArray args As Object()) As Tuple (Of Memory<Rows>, error)

Parameters:

  • query:
  • args:

QueryContext

 

method QueryContext(ctx: Context; query: string; params args: array of Object): tuple of (Memory<Rows>, error)

 

(Memory<Rows>, error) QueryContext(Context ctx, string query, params Object[] args)

 

func QueryContext(_ ctx: Context, _ query: string, _ args: Object...) -> (Memory<Rows>, error)

 

func QueryContext(ctx Context, query string, args []interface{}) tuple of (Memory<Rows>, error)

 

Function QueryContext(ctx As Context, query As string, ParamArray args As Object()) As Tuple (Of Memory<Rows>, error)

Parameters:

  • ctx:
  • query:
  • args:

QueryRow

 

method QueryRow(query: string; params args: array of Object): Memory<Row>

 

Memory<Row> QueryRow(string query, params Object[] args)

 

func QueryRow(_ query: string, _ args: Object...) -> Memory<Row>

 

func QueryRow(query string, args []interface{}) Memory<Row>

 

Function QueryRow(query As string, ParamArray args As Object()) As Memory<Row>

Parameters:

  • query:
  • args:

QueryRowContext

 

method QueryRowContext(ctx: Context; query: string; params args: array of Object): Memory<Row>

 

Memory<Row> QueryRowContext(Context ctx, string query, params Object[] args)

 

func QueryRowContext(_ ctx: Context, _ query: string, _ args: Object...) -> Memory<Row>

 

func QueryRowContext(ctx Context, query string, args []interface{}) Memory<Row>

 

Function QueryRowContext(ctx As Context, query As string, ParamArray args As Object()) As Memory<Row>

Parameters:

  • ctx:
  • query:
  • args:

SetConnMaxLifetime

 

method SetConnMaxLifetime(d: Duration)

 

void SetConnMaxLifetime(Duration d)

 

func SetConnMaxLifetime(_ d: Duration)

 

func SetConnMaxLifetime(d Duration) void

 

Sub SetConnMaxLifetime(d As Duration)

Parameters:

  • d:

SetMaxIdleConns

 

method SetMaxIdleConns(n: int)

 

void SetMaxIdleConns(int n)

 

func SetMaxIdleConns(_ n: int)

 

func SetMaxIdleConns(n int) void

 

Sub SetMaxIdleConns(n As int)

Parameters:

  • n:

SetMaxOpenConns

 

method SetMaxOpenConns(n: int)

 

void SetMaxOpenConns(int n)

 

func SetMaxOpenConns(_ n: int)

 

func SetMaxOpenConns(n int) void

 

Sub SetMaxOpenConns(n As int)

Parameters:

  • n:

Stats

 

method Stats: DBStats

 

DBStats Stats()

 

func Stats() -> DBStats

 

func Stats() DBStats

 

Function Stats() As DBStats