COMPLEX SEARCH

This commit is contained in:
mr
2024-08-01 09:13:10 +02:00
parent ad455e0e3a
commit 924a688a9d
14 changed files with 240 additions and 90 deletions

View File

@@ -1,5 +1,7 @@
package utils
import "cloud.o-forge.io/core/oc-lib/dbs"
type ShallowDBObject interface {
GenerateID()
GetID() string
@@ -18,7 +20,7 @@ type DBObject interface {
type Accessor interface {
SetLogger(t DataType)
GetType() string
Search(word string, options ...string) ([]ShallowDBObject, int, error)
Search(filters *dbs.Filters, search string) ([]ShallowDBObject, int, error)
LoadAll() ([]ShallowDBObject, int, error)
LoadOne(id string) (DBObject, int, error)
DeleteOne(id string) (DBObject, int, error)