Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ListByOperations ¶
type ListByOperations interface {
QueryBuilder
Count() ListByOperations
OrderBy(field string) ListByOperations
// Name overrides the auto-generated query/method name
Name(name string) ListByOperations
}
func ListBy ¶
func ListBy(args ...interface{}) ListByOperations
ListBy creates a query to list records with filters Can accept either string field names (defaulting to Eq filter) or Filter objects Example: ListBy("org_id") or ListBy(filter.Range("age"), filter.Search("name"))
type Query ¶
type Query struct {
// contains filtered or unexported fields
}
func (Query) GetFilters ¶
func (Query) GetOrderBy ¶
func (Query) Name ¶
func (q Query) Name(name string) QueryOperations
type QueryBuilder ¶
type QueryBuilder interface {
Query()
}
func DefaultCRUD ¶
func DefaultCRUD() QueryBuilder
DefaultCRUD expands to several queries, so it cannot be named
type QueryOperations ¶
type QueryOperations interface {
QueryBuilder
// Name overrides the auto-generated query/method name
Name(name string) QueryOperations
}
func Create ¶
func Create() QueryOperations
func CreateBulk ¶
func CreateBulk() QueryOperations
func Delete ¶
func Delete() QueryOperations
func DeleteAll ¶
func DeleteAll() QueryOperations
func Get ¶
func Get() QueryOperations
func GetBy ¶
func GetBy(fields ...string) QueryOperations
GetBy creates a query to get a record by one or more fields Example: GetBy("id") or GetBy("org_id", "email")
func ListAll ¶
func ListAll() QueryOperations
func Update ¶
func Update() QueryOperations
type Type ¶
type Type string
const ( TypeDefaultCRUD Type = "default_crud" TypeCreate Type = "create" TypeCreateBulk Type = "create_bulk" TypeGet Type = "get" TypeUpdate Type = "update" TypeDelete Type = "delete" TypeDeleteAll Type = "delete_all" TypeListAll Type = "list_all" TypeGetBy Type = "get_by" TypeListBy Type = "list_by" )
Click to show internal directories.
Click to hide internal directories.