Documentation ¶
Index ¶
- func NewDB(driver string, connection string) *database
- type ColumnType
- type ColumnTypes
- type ColumnValue
- func (v ColumnValue) AsBool() (NullBool, error)
- func (v ColumnValue) AsBytes() (NullBytes, error)
- func (v ColumnValue) AsFloat() (NullFloat, error)
- func (v ColumnValue) AsInteger() (NullInteger, error)
- func (v ColumnValue) AsString() (NullString, error)
- func (v ColumnValue) AsTime() (NullTime, error)
- func (v ColumnValue) WithType(typ ColumnType) *ColumnValue
- type DB
- type NullBool
- type NullBytes
- type NullFloat
- type NullInteger
- type NullString
- type NullTime
- type Row
- type Schema
- type Table
- type Tables
- type Tx
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ColumnType ¶
type ColumnType string
const ( ColumnTypeUnknown ColumnType = "UNKNOWN" ColumnTypeBoolean ColumnType = "BOOL" ColumnTypeInteger ColumnType = "INTEGER" ColumnTypeFloat ColumnType = "FLOAT" ColumnTypeString ColumnType = "STRING" ColumnTypeTime ColumnType = "TIME" )
type ColumnTypes ¶
type ColumnTypes map[string]ColumnType
func (ColumnTypes) GetColumnNames ¶
func (columnTypes ColumnTypes) GetColumnNames() []string
type ColumnValue ¶
type ColumnValue struct { Type ColumnType // contains filtered or unexported fields }
func NewColumnValue ¶
func NewColumnValue(val any, typ ColumnType) *ColumnValue
func UnknownTypeColumnValue ¶
func UnknownTypeColumnValue(val any) *ColumnValue
func (ColumnValue) AsBool ¶
func (v ColumnValue) AsBool() (NullBool, error)
func (ColumnValue) AsBytes ¶
func (v ColumnValue) AsBytes() (NullBytes, error)
func (ColumnValue) AsFloat ¶
func (v ColumnValue) AsFloat() (NullFloat, error)
func (ColumnValue) AsInteger ¶
func (v ColumnValue) AsInteger() (NullInteger, error)
func (ColumnValue) AsString ¶
func (v ColumnValue) AsString() (NullString, error)
func (ColumnValue) AsTime ¶
func (v ColumnValue) AsTime() (NullTime, error)
func (ColumnValue) WithType ¶
func (v ColumnValue) WithType(typ ColumnType) *ColumnValue
type NullFloat ¶
type NullFloat sql.NullFloat64
type NullInteger ¶
type NullString ¶
type NullString sql.NullString
type Row ¶
type Row map[string]*ColumnValue
type Schema ¶
type Schema struct { PrimaryKeys []string ColumnTypes ColumnTypes Dependencies []string }
func (Schema) GetColumnNames ¶
Click to show internal directories.
Click to hide internal directories.