models

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Code generated by genx:model DO NOT EDIT.

Code generated by genx:model DO NOT EDIT.

Code generated by genx:model DO NOT EDIT.

Index

Constants

This section is empty.

Variables

View Source
var MetaCatalog = builder.NewCatalog()
View Source
var TEnumeration *tEnumeration
View Source
var TTable *tTable
View Source
var TTableColumn *tTableColumn
View Source
var TagsEnumeration = map[string]string{
	"f_tab":   "f_tab",
	"f_col":   "f_col",
	"f_enum":  "f_enum",
	"f_value": "f_value",
	"f_kind":  "f_kind",
	"f_key":   "f_key",
	"f_text":  "f_text",
}
View Source
var TagsTable = map[string]string{
	"f_tab":      "f_tab",
	"f_tab_type": "f_tab_type",
	"f_doc":      "f_doc",
}
View Source
var TagsTableColumn = map[string]string{
	"f_tab":     "f_tab",
	"f_col":     "f_col",
	"f_col_typ": "f_col_typ",
	"f_field":   "f_field",
	"f_rel":     "f_rel",
	"f_doc":     "f_doc",
}

Functions

This section is empty.

Types

type Enumeration

type Enumeration struct {
	Model string `db:"f_tab,width=64"`
	Col   string `db:"f_col,width=64"`
	Enum  string `db:"f_enum,width=255"`
	Value string `db:"f_value,width=64"`
	Kind  string `db:"f_kind,width=16"`
	Key   string `db:"f_key,width=64"`
	Text  string `db:"f_text,width=128"`
}

Enumeration +genx:model @attr TableName=sql_meta_enumeration @attr Register=MetaCatalog

func (Enumeration) ColumnRel

func (m Enumeration) ColumnRel() map[string][]string

ColumnRel presents soft foreign key of columns

func (*Enumeration) Count

func (m *Enumeration) Count(ctx context.Context, cond builder.SqlCondition) (int64, error)

Count record count of Enumeration match condition

func (*Enumeration) Create

func (m *Enumeration) Create(ctx context.Context) error

Create inserts Enumeration to database

func (Enumeration) Indexes

func (m Enumeration) Indexes() map[string][]string

Indexes returns index list of Enumeration

func (*Enumeration) List

func (m *Enumeration) List(ctx context.Context, cond builder.SqlCondition, adds builder.Additions, expects ...builder.Col) ([]Enumeration, error)

List fetch Enumeration datalist with condition and additions

func (Enumeration) PrimaryKey

func (m Enumeration) PrimaryKey() []string

PrimaryKey returns column list of Enumeration's primary key

func (Enumeration) TableDesc

func (m Enumeration) TableDesc() []string

TableDesc returns descriptions of Enumeration

func (Enumeration) TableName

func (m Enumeration) TableName() string

TableName returns database table name of Enumeration

func (Enumeration) UniqueIndexes

func (m Enumeration) UniqueIndexes() map[string][]string

UniqueIndexes returns unique index list of Enumeration

type Table

type Table struct {
	Model   string `db:"f_tab,width=64"`
	TabType string `db:"f_tab_type,width=64"`
	Comment string `db:"f_doc,width=1024"`
}

Table +genx:model @attr TableName=sql_meta_table @attr Register=MetaCatalog @def uidx ui_column Model

func (Table) ColumnRel

func (m Table) ColumnRel() map[string][]string

ColumnRel presents soft foreign key of columns

func (*Table) Count

func (m *Table) Count(ctx context.Context, cond builder.SqlCondition) (int64, error)

Count record count of Table match condition

func (*Table) Create

func (m *Table) Create(ctx context.Context) error

Create inserts Table to database

func (*Table) DeleteByModel

func (m *Table) DeleteByModel(ctx context.Context) error

DeleteByModel delete Table recode by Table.Model

func (*Table) FetchByModel

func (m *Table) FetchByModel(ctx context.Context) error

FetchByModel fetch Table by Table.Model

func (Table) Indexes

func (m Table) Indexes() map[string][]string

Indexes returns index list of Table

func (*Table) List

func (m *Table) List(ctx context.Context, cond builder.SqlCondition, adds builder.Additions, expects ...builder.Col) ([]Table, error)

List fetch Table datalist with condition and additions

func (Table) PrimaryKey

func (m Table) PrimaryKey() []string

PrimaryKey returns column list of Table's primary key

func (Table) TableDesc

func (m Table) TableDesc() []string

TableDesc returns descriptions of Table

func (Table) TableName

func (m Table) TableName() string

TableName returns database table name of Table

func (Table) UniqueIndexes

func (m Table) UniqueIndexes() map[string][]string

UniqueIndexes returns unique index list of Table

func (*Table) UpdateAndFetchByModel

func (m *Table) UpdateAndFetchByModel(ctx context.Context, targets ...builder.Col) error

UpdateAndFetchByModel update Table by Table.Model and retrieve record

func (*Table) UpdateByModel

func (m *Table) UpdateByModel(ctx context.Context, expects ...builder.Col) error

UpdateByModel update Table by Table.Model

type TableColumn

type TableColumn struct {
	Model   string `db:"f_tab,width=64"`
	Col     string `db:"f_col,width=64"`
	ColType string `db:"f_col_typ,width=2048"`
	Field   string `db:"f_field,width=64"`
	Rel     string `db:"f_rel,width=128,defualt=''"`
	Comment string `db:"f_doc,width=1024"`
}

TableColumn +genx:model @attr TableName=sql_meta_table_column @attr Register=MetaCatalog @def uidx ui_column Model;Col

func (TableColumn) ColumnRel

func (m TableColumn) ColumnRel() map[string][]string

ColumnRel presents soft foreign key of columns

func (*TableColumn) Count

func (m *TableColumn) Count(ctx context.Context, cond builder.SqlCondition) (int64, error)

Count record count of TableColumn match condition

func (*TableColumn) Create

func (m *TableColumn) Create(ctx context.Context) error

Create inserts TableColumn to database

func (*TableColumn) DeleteByModelAndCol

func (m *TableColumn) DeleteByModelAndCol(ctx context.Context) error

DeleteByModelAndCol delete TableColumn recode by TableColumn.Model and TableColumn.Col

func (*TableColumn) FetchByModelAndCol

func (m *TableColumn) FetchByModelAndCol(ctx context.Context) error

FetchByModelAndCol fetch TableColumn by TableColumn.Model and TableColumn.Col

func (TableColumn) Indexes

func (m TableColumn) Indexes() map[string][]string

Indexes returns index list of TableColumn

func (*TableColumn) List

func (m *TableColumn) List(ctx context.Context, cond builder.SqlCondition, adds builder.Additions, expects ...builder.Col) ([]TableColumn, error)

List fetch TableColumn datalist with condition and additions

func (TableColumn) PrimaryKey

func (m TableColumn) PrimaryKey() []string

PrimaryKey returns column list of TableColumn's primary key

func (TableColumn) TableDesc

func (m TableColumn) TableDesc() []string

TableDesc returns descriptions of TableColumn

func (TableColumn) TableName

func (m TableColumn) TableName() string

TableName returns database table name of TableColumn

func (TableColumn) UniqueIndexes

func (m TableColumn) UniqueIndexes() map[string][]string

UniqueIndexes returns unique index list of TableColumn

func (*TableColumn) UpdateAndFetchByModelAndCol

func (m *TableColumn) UpdateAndFetchByModelAndCol(ctx context.Context, targets ...builder.Col) error

UpdateAndFetchByModelAndCol update TableColumn by TableColumn.Model and TableColumn.Col and retrieve record

func (*TableColumn) UpdateByModelAndCol

func (m *TableColumn) UpdateByModelAndCol(ctx context.Context, expects ...builder.Col) error

UpdateByModelAndCol update TableColumn by TableColumn.Model and TableColumn.Col

Jump to

Keyboard shortcuts

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