db

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenMssql

func OpenMssql(conn string) (*sql.DB, error)

func OpenPgsql

func OpenPgsql(conn string) (*sql.DB, error)

func OpenSqlite

func OpenSqlite(conn string) (*sql.DB, error)

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

type Db

type Db struct {
	Driver string
	// contains filtered or unexported fields
}

func New

func New(driver string, connection string) (*Db, error)

func (*Db) Close

func (db *Db) Close()

func (*Db) Execute

func (db *Db) Execute(sql string) (int64, error)

func (*Db) Query

func (db *Db) Query(sql string) (*sql.Rows, error)

func (*Db) QueryMap

func (db *Db) QueryMap(sql string) ([]map[string]interface{}, error)

Jump to

Keyboard shortcuts

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