Documentation ¶
Index ¶
- Variables
- func Insert(db *sql.DB, q string, v ...interface{}) (int64, error)
- func Query(db *sql.DB, obj interface{}, q string, v ...interface{}) error
- func ToSnake(in string) string
- func Update(db *sql.DB, q string, v ...interface{}) (effected int64, err error)
- type JsonNumList
- type JsonStrList
- type MayTx
- func (tx *MayTx) Commit() error
- func (tx *MayTx) Exec(query string, args ...interface{}) (sql.Result, error)
- func (tx *MayTx) Insert(q string, v ...interface{}) (int64, error)
- func (tx *MayTx) Prepare(query string) (*sql.Stmt, error)
- func (tx *MayTx) Query(query string, args ...interface{}) (*sql.Rows, error)
- func (tx *MayTx) QueryRow(query string, args ...interface{}) *sql.Row
- func (tx *MayTx) Rollback() error
- func (tx *MayTx) Stmt(stmt *sql.Stmt) *sql.Stmt
- func (tx *MayTx) Update(q string, v ...interface{}) (effected int64, err error)
- type NameList
- type NullFloat64
- type NullInt64
- type NullString
- type NullTime
- type NullUint64
- type NumList
- type PreparedScan
- type TableMeta
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotTx = errors.New("not a Tx")
View Source
var ZeroEffected = errors.New("0 row effected")
Functions ¶
Types ¶
type JsonNumList ¶
type JsonNumList []int64
func (*JsonNumList) Scan ¶
func (list *JsonNumList) Scan(value interface{}) error
type JsonStrList ¶
type JsonStrList []string
func (*JsonStrList) Scan ¶
func (list *JsonStrList) Scan(value interface{}) error
type NullFloat64 ¶
func (NullFloat64) MarshalJSON ¶
func (n NullFloat64) MarshalJSON() ([]byte, error)
func (*NullFloat64) Scan ¶
func (n *NullFloat64) Scan(value interface{}) error
func (*NullFloat64) UnmarshalJSON ¶
func (n *NullFloat64) UnmarshalJSON(data []byte) error
type NullString ¶
func (NullString) MarshalJSON ¶
func (ns NullString) MarshalJSON() ([]byte, error)
func (*NullString) Scan ¶
func (ns *NullString) Scan(value interface{}) error
func (*NullString) UnmarshalJSON ¶
func (ns *NullString) UnmarshalJSON(data []byte) error
type NullUint64 ¶
func (NullUint64) MarshalJSON ¶
func (n NullUint64) MarshalJSON() ([]byte, error)
func (*NullUint64) Scan ¶
func (n *NullUint64) Scan(value interface{}) error
func (*NullUint64) UnmarshalJSON ¶
func (n *NullUint64) UnmarshalJSON(data []byte) error
type PreparedScan ¶
type PreparedScan struct {
// contains filtered or unexported fields
}
func (*PreparedScan) GetScanFields ¶
func (p *PreparedScan) GetScanFields(v interface{}) (fields []interface{}, err error)
type TableMeta ¶
func GetTableMeta ¶
func (*TableMeta) GetScanFields ¶
func (*TableMeta) PrepareScan ¶
func (m *TableMeta) PrepareScan(names []string) (*PreparedScan, error)
Click to show internal directories.
Click to hide internal directories.