db

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTables

func CreateTables() error

func Get

func Get(dest interface{}, query string, args ...interface{}) error

func InitDB

func InitDB()

func MustExec

func MustExec(query string, args ...interface{}) sql.Result

func NamedExec

func NamedExec(query string, arg interface{}) (sql.Result, error)

func NamedInsert

func NamedInsert(query string, arg interface{}) (int64, error)

NamedInsert execute insert statement, return last insert id and error

func NamedQuery

func NamedQuery(query string, arg interface{}) (*sqlx.Rows, error)

func NamedUpdate

func NamedUpdate(query string, arg interface{}) (int64, error)

NamedUpdate execute update statement, return affected row count and error

func Query

func Query(query string, args ...interface{}) (*sqlx.Rows, error)

func Select

func Select(dest interface{}, query string, args ...interface{}) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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