Documentation ¶
Index ¶
- Constants
- Variables
- func ErrClosingDatabaseConnection(err error) error
- func ErrDatabaseOpen(err error) error
- func ErrSQLMapMarshalValue(err error) error
- func ErrSQLMapUnmarshalJSON(err error) error
- func ErrSQLMapUnmarshalScanned(err error) error
- func ErrSQLMapUnmarshalText(err error) error
- type Handler
- type Map
- type Model
- type Options
Constants ¶
const ( POSTGRES = "postgres" SQLITE = "sqlite" )
Variables ¶
var ( ErrNoneDatabaseCode = "meshkit-11126" ErrDatabaseOpenCode = "meshkit-11127" ErrSQLMapUnmarshalJSONCode = "meshkit-11128" ErrSQLMapUnmarshalTextCode = "meshkit-11129" ErrSQLMapMarshalValueCode = "meshkit-11130" ErrSQLMapUnmarshalScannedCode = "meshkit-11131" ErrSQLMapInvalidScanCode = "meshkit-11132" ErrClosingDatabaseConnectionCode = "meshkit-11133" ErrNoneDatabase = errors.New(ErrNoneDatabaseCode, errors.Alert, []string{"No Database selected"}, []string{}, []string{"database name is empty"}, []string{"Input a name for the database"}) ErrSQLMapInvalidScan = errors.New(ErrSQLMapInvalidScanCode, errors.Alert, []string{"invalid data type: expected []byte"}, []string{}, []string{}, []string{}) )
Functions ¶
func ErrClosingDatabaseConnection ¶ added in v0.5.0
ErrClosingDatabaseConnection represents the error which will occur when the database connection fails to get closed
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.