Documentation ¶
Index ¶
- type Database
- type NullInt
- type NullString
- type NullTime
- type Trx
- func (trx Trx) Commit() error
- func (trx Trx) Count(command string, args ...interface{}) (int, error)
- func (trx Trx) Execute(command string, args ...interface{}) error
- func (trx Trx) Exists(command string, args ...interface{}) (bool, error)
- func (trx Trx) Get(data interface{}, command string, args ...interface{}) error
- func (trx Trx) Query(command string, args ...interface{}) (*sql.Rows, error)
- func (trx Trx) QueryIntArray(command string, args ...interface{}) ([]int, error)
- func (trx Trx) QueryRow(command string, args ...interface{}) *sql.Row
- func (trx Trx) Rollback() error
- func (trx Trx) Select(data interface{}, command string, args ...interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
Database represents a connection to a SQL database
func NewWithLogger ¶
NewWithLogger creates a new Database instance with logging
type NullInt ¶
NullInt representa a nullable integer
func (NullInt) MarshalJSON ¶
MarshalJSON interface redefinition
type NullString ¶
type NullString struct {
sql.NullString
}
NullString representa a nullable string
func (NullString) MarshalJSON ¶
func (r NullString) MarshalJSON() ([]byte, error)
MarshalJSON interface redefinition
type NullTime ¶
NullTime representa a nullable time.Time
func (NullTime) MarshalJSON ¶
MarshalJSON interface redefinition
type Trx ¶
type Trx struct {
// contains filtered or unexported fields
}
Trx represents a Database transaction
func (Trx) QueryIntArray ¶
QueryIntArray executes given SQL command and return first column as int
Click to show internal directories.
Click to hide internal directories.