Versions in this module Expand all Collapse all v0 v0.0.13 Apr 21, 2019 Changes in this version + func Connection(ctx context.Context, cfg *Configuration) (*sqlx.DB, error) + func ConvertSortParameters(params db.SortParameters, sortableColumns map[string]bool) []string + func ToSnakeCase(in string) string + type Configuration struct + AutoMigrate bool + ConnectionString string + Password string + Username string + type ConnectionURL struct + Database string + Host string + Options map[string]string + Password string + Socket string + User string + func ParseURL(s string) (u ConnectionURL, err error) + func (c ConnectionURL) String() (s string) + type Default struct + func NewCRUDTable(session *sqlx.DB, db, table string, columns, sortable []string) *Default + func (d *Default) Create(ctx context.Context, data interface{}) error + func (d *Default) GetDBName() string + func (d *Default) GetSession() interface{} + func (d *Default) GetTableName() string + func (d *Default) RemoveOne(ctx context.Context, filter interface{}) error + func (d *Default) Search(ctx context.Context, filter interface{}, pagination *db.Pagination, ...) (int, error) + func (d *Default) Update(ctx context.Context, updates map[string]interface{}, filter interface{}) error + func (d *Default) WhereAndFetchOne(ctx context.Context, filter interface{}, result interface{}) error + func (d *Default) WhereCount(ctx context.Context, filter interface{}) (int, error)