simpleAbstractModels

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2025 License: BSD-2-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	Fields, FieldTypes map[string]string
	GuardedFields      []string
	// contains filtered or unexported fields
}

func (*Model) Create

func (model *Model) Create(fields map[string]string) map[string]string

func (*Model) Db

func (model *Model) Db() *sql.DB

func (*Model) Delete

func (model *Model) Delete(id int) map[string]any

func (*Model) GetList

func (model *Model) GetList(params map[string]string, additionalFilters []map[string]any) customStructs.ListResponse

func (*Model) GetOneByField

func (model *Model) GetOneByField(field, value, withRelation string) customStructs.SimpleResponse

func (*Model) GetOneById

func (model *Model) GetOneById(id int) customStructs.SimpleResponse

func (*Model) Save

func (model *Model) Save() map[string]string

func (*Model) SetDb

func (model *Model) SetDb(db *sql.DB)

func (*Model) SetTable

func (model *Model) SetTable(tableTitle string)

func (*Model) Table

func (model *Model) Table() string

func (*Model) Update

func (model *Model) Update(fields map[string]string, id string) map[string]string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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