Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConnectionInterface ¶ added in v2.0.3
type ConnectionInterface interface {
// Dialect returns the SQL dialect for placeholder formatting and feature support
Dialect() dialect.Dialect
// Logger returns the logger for SQL statement tracing (may be nil)
Logger() *slog.Logger
// Context returns the connection context
Context() context.Context
// ExecuteContext runs a SQL statement
ExecuteContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
// QueryRowContext executes a query that returns a single row
QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row
// QueryRowsContext executes a query that returns multiple rows
QueryRowsContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
// GetTableName extracts the table name from a table object
GetTableName(tbl interface{}) string
// GetTableColumns extracts column references from a table object
GetTableColumns(tbl interface{}) []*table.ColumnRef
}
ConnectionInterface defines the methods required by query builders. Builders should depend on this interface rather than directly on Engine or Connection.
Click to show internal directories.
Click to hide internal directories.