Documentation ¶
Index ¶
- Variables
- func CheckLocalDB() bool
- func ColumnExists(tableName, columnName, driverName string) bool
- func CompareBehaviors(behavior1 Behavior, behavior2 Behavior) bool
- func CompareKeyMappings(keyMapping1 KeyMapping, keyMapping2 KeyMapping) bool
- func ComparePathMappings(pathMapping1 PathMapping, pathMapping2 PathMapping) bool
- func Create(tableName string, data map[string]string, driverName string) error
- func CreateTables() (err error)
- func Delete(tableName string, filters map[string]string, driverName string) error
- func FactoryReset() (err error)
- func LocalDB() *sqlx.DB
- func Read(tableName string, filters map[string]string, driverName string) (result []map[string]string, err error)
- func RemoteDB() *sqlx.DB
- func TableExists(tableName string, driverName string) bool
- func ToMapSlice(unparsedData []map[string]interface{}) (parsedData []map[string]string)
- func Update(tableName string, filters map[string]string, data map[string]string, ...) error
- type Behavior
- type ColumnDoesNotExistsError
- type KeyMapping
- type PathMapping
- type TableDoesNotExistsError
Constants ¶
This section is empty.
Variables ¶
View Source
var LocalConn *sqlx.DB
View Source
var RemoteConn *sqlx.DB
Functions ¶
func CheckLocalDB ¶
func CheckLocalDB() bool
func ColumnExists ¶
func CompareBehaviors ¶
func CompareKeyMappings ¶
func CompareKeyMappings(keyMapping1 KeyMapping, keyMapping2 KeyMapping) bool
func ComparePathMappings ¶
func ComparePathMappings(pathMapping1 PathMapping, pathMapping2 PathMapping) bool
func CreateTables ¶
func CreateTables() (err error)
func Delete ¶
Delete removes a data from database, using the provided filters, returning an error if it occurs
func FactoryReset ¶
func FactoryReset() (err error)
func Read ¶
func Read(tableName string, filters map[string]string, driverName string) (result []map[string]string, err error)
Read returns an array of maps containing the results retrieved from database and an error, if it occurs
func RemoteDB ¶
RemoteDB is the connection with the user's database (MySQL) This func needs e host, port and database to create the connection...
func TableExists ¶
func ToMapSlice ¶
Types ¶
type Behavior ¶
type Behavior struct { PathMapping PathMapping KeyMappings []KeyMapping }
func GetBehaviors ¶
GetBehaviors return an array of behaviors present in the database
type ColumnDoesNotExistsError ¶
type ColumnDoesNotExistsError struct {
// contains filtered or unexported fields
}
func (ColumnDoesNotExistsError) Error ¶
func (c ColumnDoesNotExistsError) Error() string
type KeyMapping ¶
type PathMapping ¶
type TableDoesNotExistsError ¶
type TableDoesNotExistsError struct {
// contains filtered or unexported fields
}
func (TableDoesNotExistsError) Error ¶
func (t TableDoesNotExistsError) Error() string
Click to show internal directories.
Click to hide internal directories.