Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine manages database connections and sessions
func NewEngine ¶
func NewEngine(connectionURL string, cfg EngineConfig) (*Engine, error)
NewEngine creates a new database engine from a SQLAlchemy-style connection URL, e.g. "sqlite+pysqlite:///:memory:" or "postgresql+psycopg2://user:pass@host/db". It opens the underlying database with sql.Open and selects the dialect driver (placeholder/quoting behaviour) based on the URL scheme.
type EngineConfig ¶
EngineConfig holds engine configuration. Logger is optional and can be used by higher layers to trace SQL statements.
Click to show internal directories.
Click to hide internal directories.