Documentation ¶
Index ¶
Constants ¶
const ( POSTGRES = "postgres" SQLITE = "sqlite" )
Variables ¶
var ( ErrNoneDatabaseCode = "test" ErrDatabaseOpenCode = "test" ErrSQLMapUnmarshalJSONCode = "test" ErrSQLMapUnmarshalTextCode = "test" ErrSQLMapMarshalValueCode = "test" ErrSQLMapUnmarshalScannedCode = "test" ErrSQLMapInvalidScanCode = "test" ErrNoneDatabase = errors.NewDefault(ErrNoneDatabaseCode, "No Database selected") ErrSQLMapInvalidScan = errors.NewDefault(ErrSQLMapUnmarshalScannedCode, "invalid data type: expected []byte") )
Functions ¶
func ErrDatabaseOpen ¶
func ErrSQLMapMarshalValue ¶ added in v0.2.8
ErrSQLMapMarshalValue represents the error which will occur when the native SQL driver will fail to marshal the value
func ErrSQLMapUnmarshalJSON ¶ added in v0.2.8
ErrSQLMapUnmarshalJSON represents the error which will occur when the native SQL driver will fail to unmarshal the JSON
func ErrSQLMapUnmarshalScanned ¶ added in v0.2.8
ErrSQLMapUnmarshalScanned represents the error which will occur when the native SQL driver will fail to unmarshal the scanned data
func ErrSQLMapUnmarshalText ¶ added in v0.2.8
ErrSQLMapUnmarshalJSON represents the error which will occur when the native SQL driver will fail to unmarshal the text
Types ¶
type Map ¶ added in v0.2.8
type Map map[string]interface{}
Map type is an alias for map[string]interface{}
It implements native SQL driver interfaces and hence can be used for SQL json or jsonb types as a drop in replacement of golang native maps
func (Map) Interface ¶ added in v0.2.8
func (m Map) Interface() interface{}
Interface implements the nulls.nullable interface.
func (*Map) Scan ¶ added in v0.2.8
Scan implements the sql.Scanner interface. It allows to read the map from the database value.
func (*Map) UnmarshalJSON ¶ added in v0.2.8
UnmarshalJSON will unmarshall JSON value into the map representation of this value.
func (Map) UnmarshalText ¶ added in v0.2.8
UnmarshalText will unmarshall text value into the map representation of this value.