Documentation
¶
Index ¶
- func Pretty(str string) string
- type Codex
- func (c *Codex) Delete() error
- func (c *Codex) Insert() (int64, error)
- func (c *Codex) RawQuery(query string, args ...any) (any, error)
- func (c *Codex) Select(args ...any) ([]any, error)
- func (c *Codex) SelectById(args ...any) (any, error)
- func (c *Codex) SelectOne(args ...any) (any, error)
- func (c *Codex) SoftDelete() (int64, error)
- func (c *Codex) String() string
- func (c *Codex) Update() (int64, error)
- type CxArgs
- type DefaultQueries
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Codex ¶
type Codex struct {
Table string `json:"table,omitempty"`
DefaultQueries DefaultQueries `json:"default_queries,omitempty"`
Queries map[string]string `json:"queries"`
DB mantisDb.MySQL `json:"db,omitempty"`
// contains filtered or unexported fields
}
Codex provides an easy query store
func CreateGodex ¶
func CreateGodex( db mantisDb.MySQL, table string, SelectById string, SelectOne string, Select string, Insert string, Update string, Delete string, SoftDelete string, ) Codex
CreateGodex creates a new instance of Codex
type DefaultQueries ¶
type DefaultQueries struct {
SelectById string `json:"selectById,omitempty"`
SelectOne string `json:"selectOne,omitempty"`
Select string `json:"select,omitempty"`
Insert string `json:"insert,omitempty"`
Update string `json:"update,omitempty"`
Delete string `json:"delete,omitempty"`
SoftDelete string `json:"softDelete,omitempty"`
}
DefaultQueries stores specific queries to be used by Codex
Click to show internal directories.
Click to hide internal directories.