database

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 6, 2024 License: BSD-2-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClickHouse added in v0.0.5

type ClickHouse struct {
	Name   string
	Config ClickHouseConfig
	// contains filtered or unexported fields
}

func NewClickHouse added in v0.0.9

func NewClickHouse(name string, cfg ClickHouseConfig) *ClickHouse

func (*ClickHouse) Exec added in v0.0.5

func (t *ClickHouse) Exec(ctx context.Context, query string, args ...interface{}) error

func (*ClickHouse) GetDb added in v0.0.5

func (t *ClickHouse) GetDb() interface{}

func (*ClickHouse) Init added in v0.0.5

func (t *ClickHouse) Init(app interfaces.IEngine) error

func (*ClickHouse) Query added in v0.0.5

func (t *ClickHouse) Query(ctx context.Context, query string, args ...interface{}) (interfaces.SQLRows, error)

func (*ClickHouse) QueryRow added in v0.0.6

func (t *ClickHouse) QueryRow(ctx context.Context, query string, args ...interface{}) (interfaces.SQLRow, error)

func (*ClickHouse) Stop added in v0.0.5

func (t *ClickHouse) Stop() error

func (*ClickHouse) String added in v0.0.5

func (t *ClickHouse) String() string

type ClickHouseConfig added in v0.0.9

type ClickHouseConfig struct {
	Database string `yaml:"database"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
	Hosts    string `yaml:"hosts"`
}

type Mock added in v0.3.0

type Mock struct {
	Name string
	// contains filtered or unexported fields
}

func (*Mock) Exec added in v0.3.0

func (t *Mock) Exec(ctx context.Context, query string, args ...interface{}) error

func (*Mock) GetDb added in v0.3.0

func (t *Mock) GetDb() interface{}

func (*Mock) Init added in v0.3.0

func (t *Mock) Init(app interfaces.IEngine) error

func (*Mock) Query added in v0.3.0

func (t *Mock) Query(ctx context.Context, query string, args ...interface{}) (interfaces.SQLRows, error)

func (*Mock) QueryRow added in v0.3.0

func (t *Mock) QueryRow(ctx context.Context, query string, args ...interface{}) (interfaces.SQLRow, error)

func (*Mock) Stop added in v0.3.0

func (t *Mock) Stop() error

func (*Mock) String added in v0.3.0

func (t *Mock) String() string

type MySQL added in v0.0.9

type MySQL struct {
	Name   string
	Config MySQLConfig
	// contains filtered or unexported fields
}

func NewMySQL added in v0.0.9

func NewMySQL(name string, cfg MySQLConfig) *MySQL

func (*MySQL) Exec added in v0.0.9

func (t *MySQL) Exec(ctx context.Context, query string, args ...interface{}) error

func (*MySQL) GetDb added in v0.0.9

func (t *MySQL) GetDb() interface{}

func (*MySQL) Init added in v0.0.9

func (t *MySQL) Init(app interfaces.IEngine) error

func (*MySQL) Query added in v0.0.9

func (t *MySQL) Query(ctx context.Context, query string, args ...interface{}) (interfaces.SQLRows, error)

func (*MySQL) QueryRow added in v0.0.9

func (t *MySQL) QueryRow(ctx context.Context, query string, args ...interface{}) (interfaces.SQLRow, error)

func (*MySQL) Stop added in v0.0.9

func (t *MySQL) Stop() error

func (*MySQL) String added in v0.0.9

func (t *MySQL) String() string

type MySQLConfig added in v0.0.9

type MySQLConfig struct {
	URI string `yaml:"uri"`
}

type PGSQLRows added in v0.0.6

type PGSQLRows struct {
	Rows pgx.Rows
}

func (*PGSQLRows) Close added in v0.0.6

func (t *PGSQLRows) Close() error

func (*PGSQLRows) Next added in v0.0.6

func (t *PGSQLRows) Next() bool

func (*PGSQLRows) Scan added in v0.0.6

func (t *PGSQLRows) Scan(dest ...any) error

type Postgres

type Postgres struct {
	Name   string
	Config PostgresConfig
	// contains filtered or unexported fields
}

func NewPostgres added in v0.0.9

func NewPostgres(name string, cfg PostgresConfig) *Postgres

func (*Postgres) Exec

func (t *Postgres) Exec(ctx context.Context, query string, args ...interface{}) error

func (*Postgres) GetDb

func (t *Postgres) GetDb() interface{}

func (*Postgres) Init

func (t *Postgres) Init(app interfaces.IEngine) error

func (*Postgres) Query added in v0.0.5

func (t *Postgres) Query(ctx context.Context, query string, args ...interface{}) (interfaces.SQLRows, error)

func (*Postgres) QueryRow added in v0.0.6

func (t *Postgres) QueryRow(ctx context.Context, query string, args ...interface{}) (interfaces.SQLRow, error)

func (*Postgres) Stop

func (t *Postgres) Stop() error

func (*Postgres) String

func (t *Postgres) String() string

type PostgresConfig added in v0.0.9

type PostgresConfig struct {
	URI string `yaml:"uri"`
}

type Sqlite3

type Sqlite3 struct {
	Name   string
	Config Sqlite3Config
	// contains filtered or unexported fields
}

func NewSqlite3 added in v0.0.9

func NewSqlite3(name string, cfg Sqlite3Config) *Sqlite3

func (*Sqlite3) Exec

func (t *Sqlite3) Exec(ctx context.Context, query string, args ...interface{}) error

func (*Sqlite3) GetDb

func (t *Sqlite3) GetDb() interface{}

func (*Sqlite3) Init

func (t *Sqlite3) Init(app interfaces.IEngine) error

func (*Sqlite3) Query added in v0.0.5

func (t *Sqlite3) Query(ctx context.Context, query string, args ...interface{}) (interfaces.SQLRows, error)

func (*Sqlite3) QueryRow added in v0.0.6

func (t *Sqlite3) QueryRow(ctx context.Context, query string, args ...interface{}) (interfaces.SQLRow, error)

func (*Sqlite3) Stop

func (t *Sqlite3) Stop() error

func (*Sqlite3) String

func (t *Sqlite3) String() string

type Sqlite3Config added in v0.0.9

type Sqlite3Config struct {
	Database string `yaml:"database"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL