interfaces

package
v0.12.9 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB interface {
	Close() Error

	Table(name string, model Model) (Table, Error)
	ExistsTable(name string) bool
	TableFromCache(name string) Table
}

type ManagerI

type ManagerI interface {
	IsInstance() bool
	Copy() ManagerI
	Table() Table

	Get(id any) Model
	Delete(id any)
	All() []Model
	Filter(include Params, exclude ...Params) ManagerI

	Count() uint
	First() Model
	Last() Model
}

type Model

type Model interface {
	Create(DB, string) Model // Create(DB, jsonString) Model

	Id() any
	Save(table Table) error
	Delete(DB) error
}

type Params

type Params map[string]any

type Table

type Table interface {
	Name() string
	DB() DB
	Model() Model

	Get(id any) (Model, Error)
	Save(model Model) Error
	Delete(id any) Error
	DeleteAll() Error
	Count() uint
	Manager() ManagerI
}

Jump to

Keyboard shortcuts

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