infrastructure

package module
v0.0.0-...-19bcc6a Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

func NewCloudSqlConnection

func NewCloudSqlConnection() *sql.DB

func NewMysqlConnection

func NewMysqlConnection() *sql.DB

func NewSqlHandler

func NewSqlHandler() rdb.SqlHandler

Types

type CloudSqlConfig

type CloudSqlConfig struct {
	User           string
	Password       string
	Database       string
	ConnectionName string
}

func NewCloudSqlConfig

func NewCloudSqlConfig() CloudSqlConfig

type MysqlConfig

type MysqlConfig struct {
	User     string
	Password string
	Database string
	Host     string
	Port     string
}

func NewMysqlConfig

func NewMysqlConfig() MysqlConfig

type SqlHandler

type SqlHandler struct {
	Conn *sql.DB
}

func (*SqlHandler) Execute

func (handler *SqlHandler) Execute(statement string, args ...interface{}) (rdb.Result, error)

func (*SqlHandler) Query

func (handler *SqlHandler) Query(statement string, args ...interface{}) (rdb.Row, error)

type SqlResult

type SqlResult struct {
	Result sql.Result
}

func (SqlResult) LastInsertId

func (r SqlResult) LastInsertId() (int64, error)

func (SqlResult) RowsAffected

func (r SqlResult) RowsAffected() (int64, error)

type SqlRow

type SqlRow struct {
	Rows *sql.Rows
}

func (SqlRow) Close

func (r SqlRow) Close() error

func (SqlRow) Next

func (r SqlRow) Next() bool

func (SqlRow) Scan

func (r SqlRow) Scan(dest ...interface{}) error

Jump to

Keyboard shortcuts

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