Documentation ¶
Index ¶
- func CallSql[R any](query string, core QueryRunnerInterface, args ...any) (int, string, string, []R, error)
- func ConvertJsonToStruct[Q any](row string) (Q, error)
- func Fill[Data any](query string, core QueryRunnerInterface, args ...any) ([]Data, string, string, error)
- func Filler[Data any](query string, core QueryRunnerInterface, args ...any) (Data, string, string, error)
- func GetQueryResp[R any](query string, core QueryRunnerInterface, args ...any) (int, string, string, bool, any, error)
- func HandleCheckDuplicate(code int, desc, dupDesc string, record []QueryData, err error) (int, string, error)
- func HandleCheckExistance(code int, desc, notExistDesc string, record []QueryData, err error) (int, string, error)
- func ParseCommand(command, user, app, action, title string, value map[string]string, ...) string
- func ParseQueryResult(result map[string]any, t reflect.Type, v reflect.Value)
- type DmlResult
- type FieldParser
- type Insertable
- type QueryData
- type QueryRunnerInterface
- type QueryRunnerModel
- func (m QueryRunnerModel) CallDbFunction(callString string, args ...any) (int, string, error)
- func (m QueryRunnerModel) GetModule() (string, string)
- func (m QueryRunnerModel) InsertRow(insert string, args ...any) (sql.Result, error)
- func (m QueryRunnerModel) QueryRunner(querySql string, args ...any) (int, []any, error)
- func (m QueryRunnerModel) QueryToStruct(querySql string, target any, args ...any) (int, any, error)
- type QueryWithDeps
- type RecordData
- type RecordDataDml
- type RecordDataGet
- type Updatable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertJsonToStruct ¶
func GetQueryResp ¶
func HandleCheckDuplicate ¶
func HandleCheckExistance ¶
func ParseCommand ¶
func ParseCommand(command, user, app, action, title string, value map[string]string, parser FieldParser) string
Types ¶
type DmlResult ¶
type DmlResult struct { Rows map[string]string `json:"rows"` LastInsertId int64 `json:"lastId"` RowsAffected int64 `json:"rowsAffected"` }
func (*DmlResult) LoadFromMap ¶
type FieldParser ¶
type Insertable ¶
type QueryRunnerInterface ¶
type QueryRunnerInterface interface { QueryRunner(querySql string, args ...any) (int, []any, error) QueryToStruct(querySql string, target any, args ...any) (int, any, error) CallDbFunction(callString string, args ...any) (int, string, error) GetModule() (string, string) InsertRow(insert string, args ...any) (sql.Result, error) }
type QueryRunnerModel ¶
func (QueryRunnerModel) CallDbFunction ¶
func (QueryRunnerModel) GetModule ¶
func (m QueryRunnerModel) GetModule() (string, string)
func (QueryRunnerModel) QueryRunner ¶
func (QueryRunnerModel) QueryToStruct ¶
type QueryWithDeps ¶
type QueryWithDeps interface {
GetFillables(core QueryRunnerInterface) (map[string]any, error)
}
type RecordData ¶
type RecordDataDml ¶
type RecordDataDml interface { SetId(string) CheckDuplicate(core QueryRunnerInterface) (int, string, error) Filler(headers map[string][]string, core QueryRunnerInterface, args ...any) (string, error) Post(core QueryRunnerInterface, args map[string]string) (DmlResult, int, string, error) CheckExistence(core QueryRunnerInterface) (int, string, error) PreControl(core QueryRunnerInterface) (int, string, error) Put(core QueryRunnerInterface, args map[string]string) (DmlResult, int, string, error) }
type RecordDataGet ¶
Click to show internal directories.
Click to hide internal directories.