Versions in this module Expand all Collapse all v0 v0.2.4 Sep 8, 2023 v0.2.3 Sep 8, 2023 Changes in this version + const ConditionQueryPrefix + const ConditionQuerySuffix + const TagNameMulti + const TagNameWildcard + var SortDirection_name = map[SortDirection]string + var SortDirection_value = map[string]SortDirection + type FilterRequest struct + PropertyFilters []*PropertyFilter + func ExtractFilters(ctx context.Context, req interface{}, columnMap map[string]string, ...) (fr FilterRequest, err error) + func (fr *FilterRequest) AddPropertyFilter(f *PropertyFilter) *FilterRequest + type Model struct + GfModel *gdb.Model + MongoModel *mongodb.Model + Type ModelType + func AddCondition(_ context.Context, columnName string, condition *PropertyFilter, m *Model) (*Model, error) + func AddCondition1(columnName string, condition *gwtypes.Condition, m *Model) (*Model, error) + func ApplyFilter(ctx context.Context, request FilterRequest, m *Model) (output *Model, err error) + func ApplyPropertyFilter(_ context.Context, condition *PropertyFilter, m *Model) (*Model, error) + func ParseConditions(ctx context.Context, req interface{}, columnMap map[string]string, m *Model) (*Model, error) + func (m *Model) Count(ctx context.Context) (int64, error) + func (m *Model) Delete(ctx context.Context, where ...interface{}) (*Result, error) + func (m *Model) Fields(fieldNamesOrMapStruct ...interface{}) *Model + func (m *Model) FieldsEx(fieldNamesOrMapStruct ...interface{}) *Model + func (m *Model) InsertOne(ctx context.Context, req interface{}) (*Result, error) + func (m *Model) Limit(limit ...int) *Model + func (m *Model) Order(orderBy ...interface{}) *Model + func (m *Model) Page(page, limit int) *Model + func (m *Model) Scan(ctx context.Context, pointer interface{}, where ...interface{}) error + func (m *Model) Update(ctx context.Context, data interface{}) (*Result, error) + func (m *Model) Upsert(ctx context.Context, data interface{}) (*Result, error) + func (m *Model) Where(where interface{}, args ...interface{}) *Model + func (m *Model) WhereBetween(column string, min, max interface{}) *Model + func (m *Model) WhereGT(column string, value interface{}) *Model + func (m *Model) WhereGTE(column string, value interface{}) *Model + func (m *Model) WhereIn(column string, in interface{}) *Model + func (m *Model) WhereLT(column string, value interface{}) *Model + func (m *Model) WhereLTE(column string, value interface{}) *Model + func (m *Model) WhereLike(column string, like string) *Model + func (m *Model) WhereNot(column string, value interface{}) *Model + func (m *Model) WhereNotBetween(column string, min, max interface{}) *Model + func (m *Model) WhereNotIn(column string, in interface{}) *Model + func (m *Model) WhereNotLike(column string, like string) *Model + func (m *Model) WhereNotNull(column ...string) *Model + func (m *Model) WhereNull(column ...string) *Model + func (m *Model) WherePri(where interface{}, args ...interface{}) *Model + func (m *Model) WithAll() *Model + type ModelType uint8 + const GF_ORM + const MONGO + type PageInfo struct + First bool + Last bool + Number uint32 + NumberOfElements uint32 + Offset uint64 + Size uint32 + Sorts []SortParam + TotalElements uint64 + TotalPages uint32 + func (pi *PageInfo) From(pageRequest PageRequest, numberOfElement uint32, totalElements uint64) + type PageRequest struct + Number uint32 + Offset uint64 + Size uint32 + Sorts []SortParam + func (pr PageRequest) AddSort(sort SortParam) PageRequest + func (pr PageRequest) AddSortByString(sort string) PageRequest + func (pr PageRequest) Of(page, size uint32, sort ...SortParam) PageRequest + func (pr PageRequest) OrderString() string + type PropertyFilter struct + Multi gwtypes.MultiType + Operator gwtypes.OperatorType + Property string + Value interface{} + Wildcard gwtypes.WildcardType + func AddConditionFilter(columnName string, condition *gwtypes.Condition, mType ModelType) (pf *PropertyFilter, err error) + type Result struct + LastInsertedId string + MongoResult *mongodb.MongoResult + RowsAffected int64 + SqlResult sql.Result + Type ModelType + type SortDirection uint8 + const SortDirection_ASC + const SortDirection_DESC + type SortParam struct + Direction SortDirection + Property string