abstract

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IStore

type IStore[ID any, DATA any] interface {
	// OTHER
	GetCount(filter map[string]interface{}) (int64, error)
	// CRUD
	InsertOne(data DATA) (record.Record[ID, DATA], error)
	FindOne(filter map[string]interface{}) (record.Record[ID, DATA], error)
	FindAll(page Page, filter map[string]interface{}) (recordset.RecordSet[ID, DATA], error)
	DeleteOne(filter map[string]interface{}) (record.Record[ID, DATA], error)
	UpdateOne(filter map[string]interface{}, update map[string]interface{}) (record.Record[ID, DATA], error)
}

type Page

type Page struct {
	Limit int64
	Skip  int64
}

type Store

type Store[STORAGE any, ID any, DATA any] struct {
	Storage STORAGE
	Context *context.Context
	Filter  map[string]string
}

Структура источника данных

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL