Documentation
¶
Index ¶
- Constants
- func GetQuery[R any](query string, core OrmInterface, args ...any) ([]R, error)
- func Query[R any](command libQuery.CommandInterface, core OrmInterface, args ...any) ([]R, error)
- func QueryToStruct[Target any](db *gorm.DB, querySql string, args ...any) ([]Target, error)
- func SetVariable(ctx context.Context, tx *gorm.DB, command, key, value string) error
- type ContextKey
- type OrmInterface
- type OrmModel
Constants ¶
View Source
const ( APP = "request.APP" USER = "request.USER" MODULE = "request.MODULE" METHOD = "request.METHOD" SetCommandError = "error in Dml->SetTrxVariable(%s,%s,%s)" ErrorExecuteDML = "ERROR_EXECUTE_DML" OracleSetVariableCommand = `--sql BEGIN AUDIT_TRAIL.SET_MODIF_ARGS(:1, :2); END;` PostgresSetVariableCommand = "SELECT set_config($1,$2,true);" MySQLSetVariableCommand = "SET @%s = '%s';" SQLiteSetVariableCommand = "PRAGMA %s = '%s';" )
Variables ¶
This section is empty.
Functions ¶
func Query ¶
func Query[R any](command libQuery.CommandInterface, core OrmInterface, args ...any) ([]R, error)
func QueryToStruct ¶
Types ¶
type ContextKey ¶
type ContextKey string
Click to show internal directories.
Click to hide internal directories.