pocketbaselocal

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ManagerAll

func ManagerAll(manager ManagerI) []Model

func ManagerFilter

func ManagerFilter(manager ManagerI, include Params, _ ...Params) []Model

Types

type Collection

type Collection struct {
	Objects ManagerI
	// contains filtered or unexported fields
}

func (Collection) Count

func (collection Collection) Count() uint

func (Collection) DB

func (collection Collection) DB() DB

func (*Collection) Delete

func (collection *Collection) Delete(idI any) error

func (*Collection) DeleteAll

func (collection *Collection) DeleteAll() error

Pocketbase does not support DeleteAll All models will be deletting of one

func (*Collection) Get

func (collection *Collection) Get(idI any) (Model, error)

func (Collection) Manager

func (collection Collection) Manager() ManagerI

func (Collection) Model

func (collection Collection) Model() Model

func (Collection) Name

func (collection Collection) Name() string

func (*Collection) Save

func (collection *Collection) Save(model Model) error

func (*Collection) SetManager

func (collection *Collection) SetManager(newManager ManagerI)

type DataBase

type DataBase struct {
	// contains filtered or unexported fields
}

func New

func New(appp ...*pocketbase.PocketBase) *DataBase

func (*DataBase) Close

func (db *DataBase) Close() error

func (*DataBase) ExistsTable

func (db *DataBase) ExistsTable(name string) bool

func (*DataBase) Table

func (db *DataBase) Table(_ string, model Model) (Table, error)

func (*DataBase) TableFromCache

func (db *DataBase) TableFromCache(name string) Table

func (*DataBase) UpdateCollection

func (db *DataBase) UpdateCollection(model Model) error

Jump to

Keyboard shortcuts

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