DB

Overview

Location

  • Reference:
    • Go.dll  .NET, .NET Standard 2.0
    • Go.fx  Island, macOS
  • Namespace: go.database.sql

Instance Methods


constructor

 

constructor

 

DB()

 

init()

constructor (DB)

 

constructor(value: DB)

 

DB(DB value)

 

init(_ value: DB)

Parameters:

  • value:

Begin

 

// .NET, Island, macOS
method Begin: tuple of (Reference<Tx>, error)
// .NET Standard 2.0
method Begin: ValueTuple<Reference<Tx>, error>

 

// .NET, Island, macOS
(Reference<Tx>, error) Begin()
// .NET Standard 2.0
ValueTuple<Reference<Tx>, error> Begin()

 

// .NET, Island, macOS
func Begin() -> (Reference<Tx>, error)
// .NET Standard 2.0
func Begin() -> ValueTuple<Reference<Tx>, error>

 

// .NET, Island, macOS
func Begin() (Reference<Tx>, error)
// .NET Standard 2.0
func Begin() ValueTuple<Reference<Tx>, error>

BeginTx

 

// .NET, Island, macOS
method BeginTx(ctx: Context; opts: Reference<TxOptions>): tuple of (Reference<Tx>, error)
// .NET Standard 2.0
method BeginTx(ctx: Context; opts: Reference<TxOptions>): ValueTuple<Reference<Tx>, error>

 

// .NET, Island, macOS
(Reference<Tx>, error) BeginTx(Context ctx, Reference<TxOptions> opts)
// .NET Standard 2.0
ValueTuple<Reference<Tx>, error> BeginTx(Context ctx, Reference<TxOptions> opts)

 

// .NET, Island, macOS
func BeginTx(_ ctx: Context, _ opts: Reference<TxOptions>) -> (Reference<Tx>, error)
// .NET Standard 2.0
func BeginTx(_ ctx: Context, _ opts: Reference<TxOptions>) -> ValueTuple<Reference<Tx>, error>

 

// .NET, Island, macOS
func BeginTx(ctx Context, opts Reference<TxOptions>) (Reference<Tx>, error)
// .NET Standard 2.0
func BeginTx(ctx Context, opts Reference<TxOptions>) ValueTuple<Reference<Tx>, error>

Parameters:

  • ctx:
  • opts:

Close

 

method Close: error

 

error Close()

 

func Close() -> error

 

func Close() error

Conn

 

// .NET, Island, macOS
method Conn(ctx: Context): tuple of (Reference<Conn>, error)
// .NET Standard 2.0
method Conn(ctx: Context): ValueTuple<Reference<Conn>, error>

 

// .NET, Island, macOS
(Reference<Conn>, error) Conn(Context ctx)
// .NET Standard 2.0
ValueTuple<Reference<Conn>, error> Conn(Context ctx)

 

// .NET, Island, macOS
func Conn(_ ctx: Context) -> (Reference<Conn>, error)
// .NET Standard 2.0
func Conn(_ ctx: Context) -> ValueTuple<Reference<Conn>, error>

 

// .NET, Island, macOS
func Conn(ctx Context) (Reference<Conn>, error)
// .NET Standard 2.0
func Conn(ctx Context) ValueTuple<Reference<Conn>, error>

Parameters:

  • ctx:

Driver

 

// .NET, .NET Standard 2.0
method Driver: Driver
// Island, macOS
method Driver: Driver

 

// .NET, .NET Standard 2.0
Driver Driver()
// Island, macOS
Driver Driver()

 

// .NET, .NET Standard 2.0
func Driver() -> Driver
// Island, macOS
func Driver() -> Driver

 

// .NET, .NET Standard 2.0
func Driver() Driver
// Island, macOS
func Driver() Driver

Exec

 

// .NET, Island, macOS
method Exec(query: string; params args: array of Object): tuple of (Result, error)
// .NET Standard 2.0
method Exec(query: string; params args: array of Object): ValueTuple<Result, error>

 

// .NET, Island, macOS
(Result, error) Exec(string query, params Object[] args)
// .NET Standard 2.0
ValueTuple<Result, error> Exec(string query, params Object[] args)

 

// .NET, Island, macOS
func Exec(_ query: string, _ args: Object...) -> (Result, error)
// .NET Standard 2.0
func Exec(_ query: string, _ args: Object...) -> ValueTuple<Result, error>

 

// .NET, Island, macOS
func Exec(query string, args []interface{}) (Result, error)
// .NET Standard 2.0
func Exec(query string, args []interface{}) ValueTuple<Result, error>

Parameters:

  • query:
  • args:

ExecContext

 

// .NET, Island, macOS
method ExecContext(ctx: Context; query: string; params args: array of Object): tuple of (Result, error)
// .NET Standard 2.0
method ExecContext(ctx: Context; query: string; params args: array of Object): ValueTuple<Result, error>

 

// .NET, Island, macOS
(Result, error) ExecContext(Context ctx, string query, params Object[] args)
// .NET Standard 2.0
ValueTuple<Result, error> ExecContext(Context ctx, string query, params Object[] args)

 

// .NET, Island, macOS
func ExecContext(_ ctx: Context, _ query: string, _ args: Object...) -> (Result, error)
// .NET Standard 2.0
func ExecContext(_ ctx: Context, _ query: string, _ args: Object...) -> ValueTuple<Result, error>

 

// .NET, Island, macOS
func ExecContext(ctx Context, query string, args []interface{}) (Result, error)
// .NET Standard 2.0
func ExecContext(ctx Context, query string, args []interface{}) ValueTuple<Result, error>

Parameters:

  • ctx:
  • query:
  • args:

Ping

 

method Ping: error

 

error Ping()

 

func Ping() -> error

 

func Ping() error

PingContext

 

method PingContext(ctx: Context): error

 

error PingContext(Context ctx)

 

func PingContext(_ ctx: Context) -> error

 

func PingContext(ctx Context) error

Parameters:

  • ctx:

Prepare

 

// .NET, Island, macOS
method Prepare(query: string): tuple of (Reference<Stmt>, error)
// .NET Standard 2.0
method Prepare(query: string): ValueTuple<Reference<Stmt>, error>

 

// .NET, Island, macOS
(Reference<Stmt>, error) Prepare(string query)
// .NET Standard 2.0
ValueTuple<Reference<Stmt>, error> Prepare(string query)

 

// .NET, Island, macOS
func Prepare(_ query: string) -> (Reference<Stmt>, error)
// .NET Standard 2.0
func Prepare(_ query: string) -> ValueTuple<Reference<Stmt>, error>

 

// .NET, Island, macOS
func Prepare(query string) (Reference<Stmt>, error)
// .NET Standard 2.0
func Prepare(query string) ValueTuple<Reference<Stmt>, error>

Parameters:

  • query:

PrepareContext

 

// .NET, Island, macOS
method PrepareContext(ctx: Context; query: string): tuple of (Reference<Stmt>, error)
// .NET Standard 2.0
method PrepareContext(ctx: Context; query: string): ValueTuple<Reference<Stmt>, error>

 

// .NET, Island, macOS
(Reference<Stmt>, error) PrepareContext(Context ctx, string query)
// .NET Standard 2.0
ValueTuple<Reference<Stmt>, error> PrepareContext(Context ctx, string query)

 

// .NET, Island, macOS
func PrepareContext(_ ctx: Context, _ query: string) -> (Reference<Stmt>, error)
// .NET Standard 2.0
func PrepareContext(_ ctx: Context, _ query: string) -> ValueTuple<Reference<Stmt>, error>

 

// .NET, Island, macOS
func PrepareContext(ctx Context, query string) (Reference<Stmt>, error)
// .NET Standard 2.0
func PrepareContext(ctx Context, query string) ValueTuple<Reference<Stmt>, error>

Parameters:

  • ctx:
  • query:

Query

 

// .NET, Island, macOS
method Query(query: string; params args: array of Object): tuple of (Reference<Rows>, error)
// .NET Standard 2.0
method Query(query: string; params args: array of Object): ValueTuple<Reference<Rows>, error>

 

// .NET, Island, macOS
(Reference<Rows>, error) Query(string query, params Object[] args)
// .NET Standard 2.0
ValueTuple<Reference<Rows>, error> Query(string query, params Object[] args)

 

// .NET, Island, macOS
func Query(_ query: string, _ args: Object...) -> (Reference<Rows>, error)
// .NET Standard 2.0
func Query(_ query: string, _ args: Object...) -> ValueTuple<Reference<Rows>, error>

 

// .NET, Island, macOS
func Query(query string, args []interface{}) (Reference<Rows>, error)
// .NET Standard 2.0
func Query(query string, args []interface{}) ValueTuple<Reference<Rows>, error>

Parameters:

  • query:
  • args:

QueryContext

 

// .NET, Island, macOS
method QueryContext(ctx: Context; query: string; params args: array of Object): tuple of (Reference<Rows>, error)
// .NET Standard 2.0
method QueryContext(ctx: Context; query: string; params args: array of Object): ValueTuple<Reference<Rows>, error>

 

// .NET, Island, macOS
(Reference<Rows>, error) QueryContext(Context ctx, string query, params Object[] args)
// .NET Standard 2.0
ValueTuple<Reference<Rows>, error> QueryContext(Context ctx, string query, params Object[] args)

 

// .NET, Island, macOS
func QueryContext(_ ctx: Context, _ query: string, _ args: Object...) -> (Reference<Rows>, error)
// .NET Standard 2.0
func QueryContext(_ ctx: Context, _ query: string, _ args: Object...) -> ValueTuple<Reference<Rows>, error>

 

// .NET, Island, macOS
func QueryContext(ctx Context, query string, args []interface{}) (Reference<Rows>, error)
// .NET Standard 2.0
func QueryContext(ctx Context, query string, args []interface{}) ValueTuple<Reference<Rows>, error>

Parameters:

  • ctx:
  • query:
  • args:

QueryRow

 

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

 

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

 

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

 

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

Parameters:

  • query:
  • args:

QueryRowContext

 

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

 

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

 

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

 

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

Parameters:

  • ctx:
  • query:
  • args:

SetConnMaxLifetime

 

method SetConnMaxLifetime(d: Duration)

 

void SetConnMaxLifetime(Duration d)

 

func SetConnMaxLifetime(_ d: Duration)

 

func SetConnMaxLifetime(d Duration)

Parameters:

  • d:

SetMaxIdleConns

 

method SetMaxIdleConns(n: int)

 

void SetMaxIdleConns(int n)

 

func SetMaxIdleConns(_ n: int)

 

func SetMaxIdleConns(n int)

Parameters:

  • n:

SetMaxOpenConns

 

method SetMaxOpenConns(n: int)

 

void SetMaxOpenConns(int n)

 

func SetMaxOpenConns(_ n: int)

 

func SetMaxOpenConns(n int)

Parameters:

  • n:

Stats

 

method Stats: DBStats

 

DBStats Stats()

 

func Stats() -> DBStats

 

func Stats() DBStats