Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildDSN ¶
BuildDSN is the single place embedded-engine DSNs are constructed. It translates legacy `_param=value` shorthands to modernc `_pragma=name(value)` directives, passes through modernc-native and plain URI parameters, rejects unknown underscore parameters (modernc would silently ignore them), and injects the 5000ms legacy busy_timeout default when unset. An empty dsn selects the default shared in-memory database. The returned map records every pragma the DSN sets, for the startup assertion.
func GetSQLEngineSetupDDL ¶
Types ¶
type SQLEngine ¶
type SQLEngine interface {
GetDB() (*sql.DB, error)
GetTx() (*sql.Tx, error)
Exec(string, ...interface{}) (sql.Result, error)
Query(string, ...interface{}) (*sql.Rows, error)
QueryRow(query string, args ...any) *sql.Row
// ExecFileLocal(string) error
// ExecFile(string) error
ExecInTxn(queries []string) error
GetCurrentGenerationID() (int, error)
GetNextGenerationID() (int, error)
GetCurrentSessionID(int) (int, error)
GetNextSessionID(int) (int, error)
GetCurrentDiscoveryGenerationID(discoveryID string) (int, error)
GetNextDiscoveryGenerationID(discoveryID string) (int, error)
CacheStoreGet(string) ([]byte, error)
CacheStoreGetAll() ([]internaldto.KeyVal, error)
CacheStorePut(string, []byte, string, int) error
IsMemory() bool
}
func NewSQLEngine ¶
func NewSQLEngine(cfg dto.SQLBackendCfg, controlAttributes sqlcontrol.ControlAttributes) (SQLEngine, error)
Click to show internal directories.
Click to hide internal directories.