Documentation
¶
Index ¶
- func BuildWhereClause(filters ...string) string
- func GetDirQuery(dir string) string
- func GetMetadataQuery(db string, m map[string]interface{}) (mb []byte, mq string, err error)
- func GetNameQuery(name string) (string, string)
- func GetOffsetLimitQuery(limit uint64) string
- func GetOrderQuery(order string) string
- func Total(ctx context.Context, db Database, query string, params interface{}) (uint64, error)
- type Database
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildWhereClause ¶ added in v0.26.0
func GetDirQuery ¶
func GetMetadataQuery ¶
func GetNameQuery ¶
func GetOffsetLimitQuery ¶ added in v0.24.0
func GetOrderQuery ¶
Types ¶
type Database ¶ added in v0.26.0
type Database interface {
NamedExecContext(context.Context, string, interface{}) (sql.Result, error)
QueryRowxContext(context.Context, string, ...interface{}) *sqlx.Row
NamedQueryContext(context.Context, string, interface{}) (*sqlx.Rows, error)
SelectContext(ctx context.Context, dest interface{}, query string, args ...interface{}) error
GetContext(context.Context, interface{}, string, ...interface{}) error
BeginTxx(context.Context, *sql.TxOptions) (*sqlx.Tx, error)
}
Database provides a database interface
func NewDatabase ¶ added in v0.26.0
NewDatabase creates a ThingDatabase instance
Click to show internal directories.
Click to hide internal directories.