orm

package
v0.0.0-...-ab49a64 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ManageDbResValue

func ManageDbResValue(rb sql.RawBytes) interface{}

func ManageNullString

func ManageNullString(s string) sql.NullString

func ManageValues

func ManageValues(values *[]interface{}, v interface{})

Types

type Column

type Column struct {
	Type          string
	Length        string
	NotNull       bool
	UcDefault     string
	Default       string
	MinLength     string
	MaxLength     string
	Checks        []validator.Check
	UI_Widget     string
	UI_WsUrl      string
	UI_WsCallback string
}

type CondSql

type CondSql struct {
	Wquery string
	Hquery string
	Binds  []interface{}
}

type DbRes

type DbRes struct {
	Err bool
	Msg string

	Data []RowValues
	// contains filtered or unexported fields
}

func ManageDbmsError

func ManageDbmsError(dbRes *DbRes, debug string, err error, query string) *DbRes

type Dictio

type Dictio struct {
	EntTitle string                         `json:"EntTitle"`
	Title    map[string]string              `json:"Title"`
	Msg      map[string]string              `json:"Msg"`
	Info     map[string]string              `json:"Info"`
	Opts     map[string][]map[string]string `json:"Opts"`
}

type FKeys

type FKeys struct {
	ToTable  string
	ToColumn string
	ToRefs   []string
}

type RowValues

type RowValues map[string]interface{}

type Table

type Table struct {
	Name             string
	Primary          []string
	Uniques          [][]string
	ColumnsInUniques []string
	Indexes          [][]string
	FKeys            map[string]FKeys
	ColumnsOrder     []string
	Columns          map[string]Column
}

func (*Table) DeleteRows

func (table *Table) DeleteRows(dbConn *sql.DB, debug string, conds [][7]string) *DbRes

func (*Table) InsertRow

func (table *Table) InsertRow(dbConn *sql.DB, debug string, ps *map[string]interface{}) *DbRes

func (*Table) Select

func (table *Table) Select(dbConn *sql.DB, debug string, countRows bool, extRefs bool, quickList []string,
	conds [][7]string, order [][2]string, limit int, offset int) *DbRes

func (*Table) Update

func (table *Table) Update(dbConn *sql.DB, debug string, ps *map[string]interface{}, conds [][7]string) *DbRes

type TableTab

type TableTab struct {
	T             *Dictio
	Data          []RowValues
	HasData       bool
	CsrfToken     string
	FormHasErrors bool
}

Jump to

Keyboard shortcuts

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