Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AsmParam ¶
type AsmParam struct {
Api string
Param []any
Session metadata.SessionContext
AutoFilter []metadata.AutoFilter
AutoPopulate []metadata.AutoPopulate
}
type DalContext ¶
type DalContext struct {
// Container for transaction management.
// Ensures that accessing the same database during a single API request uses the same connection,
// and automatically commits or rolls back transactions when the request ends.
Container *sync.Map
DebugInfo []map[string]any
// contains filtered or unexported fields
}
func NewDalContext ¶ added in v0.13.3
func NewDalContext(ctx context.Context) *DalContext
func (*DalContext) Context ¶ added in v0.13.3
func (d *DalContext) Context() context.Context
type OperationType ¶ added in v0.11.0
type OperationType int
const ( InvalidAction OperationType = iota CreateOneAction CreateManyAction ReadManyAction ReadOneAction ReadValueAction UpdateOneAction UpdateManyAction DeleteOneAction DeleteManyAction TransactionAction DDLAction )
func (OperationType) String ¶ added in v0.12.2
func (t OperationType) String() string
type PreparedQuery ¶
type PreparedQuery struct {
QueryType string `json:"queryType"`
Query string `json:"query"`
Bind []any `json:"bind"`
// Query purpose, only used for subqueries like CheckPoint/ResultEnricher
// Possible values: "uk_conflict", "fk_exists", "fk_restrict", "count", etc.
Purpose string `json:"purpose,omitempty"`
// Field names involved, used for generating error messages
// For UK conflicts: unique key fields
// For FK checks: foreign key fields
Column []string `json:"columns,omitempty"`
CheckPoint []PreparedQuery `json:"checkPoint,omitempty"`
ResultEnricher []PreparedQuery `json:"resultEnricher,omitempty"`
}
type QueryResult ¶
type QueryResult struct {
ResultName string
ResultSource ResultSource
ResultType ResultType
LastInsertId int64
RowsAffected int64
Row map[string]any
Rows []map[string]any
CheckPoint []*QueryResult
Enricher []*QueryResult
}
type ResultSource ¶ added in v0.12.2
type ResultSource int
const ( SourceMainQuery ResultSource = iota SourceCheckpoint SourceEnricher )
func (ResultSource) String ¶ added in v0.12.2
func (s ResultSource) String() string
type ResultType ¶ added in v0.11.0
type ResultType int
const ( None ResultType = iota MultiRows SingleRow AutoSingleColumn SingleValue LastInsertId RowsAffected Transaction )
func (ResultType) String ¶ added in v0.12.2
func (t ResultType) String() string
Click to show internal directories.
Click to hide internal directories.