Documentation ¶
Index ¶
- Constants
- func GetVals(data interface{}, fieldNames []string) (values []interface{}, err error)
- type DB
- func (me *DB) Exec(query string, secured bool, prm ...interface{}) (result sql.Result, err error)
- func (me *DB) Init(logFacility *log.Facility, driver string, dsn string, maxConn int, ...) error
- func (me *DB) OpenRecordset(query string, secured bool, prm ...interface{}) (result *sql.Rows, err error)
- func (me *DB) SecureString(s string) string
- type DBext
- func (me *DBext) DB() *DB
- func (me *DBext) Exec(id uint64, secured bool, name string, params ...interface{}) (result interface{}, code int, err error)
- func (me *DBext) OpenRecordset(name string, secured bool, params ...interface{}) (*sql.Rows, error)
- func (me *DBext) OpenRecordsetExtended(name string, secured bool, offset uint, count uint, params ...interface{}) (*sql.Rows, error)
- func (me *DBext) SecureString(s string) string
- func (me *DBext) Select(id uint64, secured bool, rowPattern interface{}, name string, cacheName string, ...) (result []interface{}, code int, err error)
- type NullBool
- type NullFloat64
- type NullInt32
- type NullInt64
- type NullString
- type NullTime
Constants ¶
View Source
const ( // MYSQL -- MYSQL = "mysql" // PGSQL -- PGSQL = "postgres" // MSSQL -- MSSQL = "mssql" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB --
func (*DB) Init ¶
func (me *DB) Init(logFacility *log.Facility, driver string, dsn string, maxConn int, maxRetry int) error
Init --
type DBext ¶
type DBext struct {
// contains filtered or unexported fields
}
DBext --
func NewDBext ¶
func NewDBext(logFacility *log.Facility, cfg *config.DB, queries misc.StringMap) (dbExt *DBext, err error)
NewDBext --
func (*DBext) Exec ¶
func (me *DBext) Exec(id uint64, secured bool, name string, params ...interface{}) (result interface{}, code int, err error)
Exec -- execute stored procedure or other
func (*DBext) OpenRecordset ¶
OpenRecordset -- fetching data
func (*DBext) OpenRecordsetExtended ¶
func (me *DBext) OpenRecordsetExtended(name string, secured bool, offset uint, count uint, params ...interface{}) (*sql.Rows, error)
OpenRecordsetExtended -- fetching data with providing a start position and max count
func (*DBext) SecureString ¶ added in v0.1.11
SecureString --
type NullFloat64 ¶
type NullFloat64 sql.NullFloat64
NullFloat64 --
func (NullFloat64) MarshalJSON ¶
func (v NullFloat64) MarshalJSON() ([]byte, error)
MarshalJSON for NullFloat64
func (*NullFloat64) Scan ¶
func (v *NullFloat64) Scan(value interface{}) error
Scan implements the Scanner interface.
type NullInt32 ¶ added in v0.1.7
NullInt32 --
func (NullInt32) MarshalJSON ¶ added in v0.1.7
MarshalJSON for NullInt32
type NullString ¶
type NullString sql.NullString
NullString --
func (NullString) MarshalJSON ¶
func (v NullString) MarshalJSON() ([]byte, error)
MarshalJSON for NullString
func (*NullString) Scan ¶
func (v *NullString) Scan(value interface{}) error
Scan implements the Scanner interface.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.