sql

package
v0.0.58 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(driver string, addrVar string, mustConnectVar string) *sqlx.DB

Types

type ConnX

type ConnX interface {
	sqlx.Queryer

	MapperFunc(func(string) string)
	Rebind(string) string
	Unsafe() *sqlx.DB
	BindNamed(string, interface{}) (string, []interface{}, error)
	NamedQuery(string, interface{}) (*sqlx.Rows, error)
	NamedExec(string, interface{}) (sql.Result, error)
	Select(interface{}, string, ...interface{}) error
	Get(interface{}, string, ...interface{}) error
	MustBegin() *sqlx.Tx
	Beginx() (*sqlx.Tx, error)
	MustExec(string, ...interface{}) sql.Result
	Preparex(string) (*sqlx.Stmt, error)
	PrepareNamed(string) (*sqlx.NamedStmt, error)
}

type NullInt64 added in v0.0.55

type NullInt64 struct {
	Value int64
	Valid bool
}

func (*NullInt64) MarshalJSON added in v0.0.55

func (nt *NullInt64) MarshalJSON() ([]byte, error)

func (*NullInt64) Scan added in v0.0.55

func (nt *NullInt64) Scan(value interface{}) error

func (*NullInt64) UnmarshalJSON added in v0.0.55

func (nt *NullInt64) UnmarshalJSON(b []byte) error

type NullString added in v0.0.55

type NullString struct {
	Value string
	Valid bool
}

NullString is an alias for sql.NullString data type

func (*NullString) MarshalJSON added in v0.0.55

func (ns *NullString) MarshalJSON() ([]byte, error)

MarshalJSON for NullString

func (*NullString) Scan added in v0.0.55

func (ns *NullString) Scan(value interface{}) error

Scan implements the Scanner interface for NullString

func (*NullString) UnmarshalJSON added in v0.0.55

func (ns *NullString) UnmarshalJSON(b []byte) error

UnmarshalJSON for NullString

type NullTime added in v0.0.54

type NullTime struct {
	time.Time
	Valid bool
}

func (*NullTime) MarshalJSON added in v0.0.54

func (nt *NullTime) MarshalJSON() ([]byte, error)

MarshalJSON for NullTime

func (*NullTime) Scan added in v0.0.54

func (nt *NullTime) Scan(value interface{}) error

func (*NullTime) UnmarshalJSON added in v0.0.54

func (nt *NullTime) UnmarshalJSON(b []byte) error

UnmarshalJSON for NullTime

Jump to

Keyboard shortcuts

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