Documentation ¶
Index ¶
- Variables
- func Convert(v interface{}, t ColType, loc *time.Location) (interface{}, error)
- func IsIdent(s string) bool
- func ParseDateTime(v interface{}, loc *time.Location) (time.Time, error)
- func ParseDateTimeStr(str string, loc *time.Location) (time.Time, error)
- func ParseInt(v interface{}) (int, error)
- func ParseTime(v []uint8) (time.Duration, error)
- type ColType
- type Column
- type DB
- func (db *DB) Begin() error
- func (db *DB) Clone() *DB
- func (db *DB) Columns(table string) ([]SchemaColumn, error)
- func (db *DB) Commit() error
- func (db *DB) Databases() (*Table, error)
- func (db *DB) Exec(query string, args ...interface{}) (sql.Result, error)
- func (db *DB) ExecEx(q sqx.Query, args ...interface{}) (sql.Result, error)
- func (db *DB) ExecRaw(query string, args ...interface{}) (sql.Result, error)
- func (db *DB) HasDatabase(name string) (bool, error)
- func (db *DB) HasTable(name string) (bool, error)
- func (db *DB) HasTransaction() bool
- func (db *DB) InitMultiDB() error
- func (db *DB) Open(database string) *DB
- func (db *DB) Prepare(query string) (*Stmt, error)
- func (db *DB) Query(query string, args ...interface{}) (*Table, error)
- func (db *DB) QueryEx(query *sqx.SelectQuery) (*Table, error)
- func (db *DB) QueryRaw(query string, args ...interface{}) (*sql.Rows, error)
- func (db *DB) QueryRow(query string, args ...interface{}) (*Row, error)
- func (db *DB) QueryRowEx(query *sqx.SelectQuery) (*Row, error)
- func (db *DB) QueryRowRaw(query string, args ...interface{}) *sql.Row
- func (db *DB) QueryRows(query string, args ...interface{}) (*sql.Rows, error)
- func (db *DB) QueryRowsEx(q *sqx.SelectQuery) (*sql.Rows, error)
- func (db *DB) QueryValue(query string, args ...interface{}) (interface{}, error)
- func (db *DB) QueryValueEx(query *sqx.SelectQuery) (interface{}, error)
- func (db *DB) QueryValueRaw(query string, args ...interface{}) (interface{}, error)
- func (db *DB) Reader(query string, args ...interface{}) (*Reader, error)
- func (db *DB) ReaderEx(query *sqx.SelectQuery) (*Reader, error)
- func (db *DB) ReaderRaw(query string, args ...interface{}) (*Reader, error)
- func (db *DB) Rollback() error
- func (db *DB) ScanValueRaw(v interface{}, query string, args ...interface{}) error
- func (db *DB) ShowQuery(query string) (*Table, error)
- func (db *DB) ShowQueryEx(query *sqx.ShowQuery) (*Table, error)
- func (db *DB) ShowReader(query string) (*Reader, error)
- func (db *DB) ShowReaderEx(query *sqx.ShowQuery) (*Reader, error)
- func (db *DB) Tables() ([]string, error)
- func (db *DB) ToSql(q sqx.Query) (string, []interface{}, error)
- type NullTime
- type Reader
- type Row
- type Scanner
- type SchemaColumn
- type Stmt
- type Table
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrReadOnly = errors.New("error 1299. Can't write changes in Read-Only mode")
Functions ¶
Types ¶
type DB ¶
type DB struct { *sql.DB Location *time.Location Driver string Database string Prefix string Namespace string sync.Mutex ReadOnly bool IgnoreTx bool NestedTx bool // contains filtered or unexported fields }
func OpenDatabase ¶
OpenDatabase opens a new database handle.
func (*DB) HasTransaction ¶
func (*DB) InitMultiDB ¶
func (*DB) QueryRowEx ¶
func (db *DB) QueryRowEx(query *sqx.SelectQuery) (*Row, error)
func (*DB) QueryRowsEx ¶
func (*DB) QueryValue ¶
func (*DB) QueryValueEx ¶
func (db *DB) QueryValueEx(query *sqx.SelectQuery) (interface{}, error)
func (*DB) QueryValueRaw ¶
func (*DB) ScanValueRaw ¶
type Row ¶
type Row struct { Values []interface{} `json:"values"` // contains filtered or unexported fields }
func (*Row) ColumnIndex ¶
type SchemaColumn ¶
type Table ¶
func ToTableLimit ¶
Returns a table with up to maxRows number of rows and returns also if there are more rows to read.
func (*Table) ColumnIndex ¶
Click to show internal directories.
Click to hide internal directories.