relational

package
v0.6.38 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package relational re-exports the relational engine (github.com/hanzoai/xorm) so consumers depend on hanzoai/orm as the single ORM namespace while the mature xorm engine backs it. It imports only xorm — importing this package drags none of the orm root's doc-store or driver init, so it composes cleanly into a host that registers its own SQL driver. Aliases and a thin forwarder — zero behavior change.

Index

Constants

View Source
const (
	Debug  = log.LOG_DEBUG
	Info   = log.LOG_INFO
	Warn   = log.LOG_WARNING
	Err    = log.LOG_ERR
	Silent = log.LOG_OFF
)

How much the engine says. An engine that shares a process with a server carrying its own log wants Silent, which is why the levels are here: reaching for them should not mean reaching past this package.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cell

type Cell = xorm.Cell

type Engine

type Engine = xorm.Engine

func Bind added in v0.6.27

func Bind(driverName, dataSourceName string, db *sql.DB) (*Engine, error)

Bind returns an engine over a connection the caller already opened.

It is the constructor for a host that owns its own open: an encrypted SQLite file whose key the caller derives, a pool whose limits the caller has already set, or any connection two subsystems must share. Opening a second handle to the same file instead would be a second pool, and two pools disagree about what is committed.

driverName selects the dialect, and dataSourceName is read only to derive it, so a host with nothing to say there may pass the empty string.

func NewEngine

func NewEngine(driverName, dataSourceName string, driverOptions ...func(db *sql.DB) error) (*Engine, error)

NewEngine opens a relational engine backed by the given driver.

type IterFunc

type IterFunc = xorm.IterFunc

type LogLevel added in v0.6.29

type LogLevel = log.LogLevel

type Rows

type Rows = xorm.Rows

type Session

type Session = xorm.Session

type SyncOptions

type SyncOptions = xorm.SyncOptions

type SyncResult

type SyncResult = xorm.SyncResult

Directories

Path Synopsis
Package schemas re-exports the relational engine's schema vocabulary (github.com/hanzoai/xorm/schemas) so a consumer names hanzoai/orm and never hanzoai/xorm — the same reason the parent relational package exists, one level down.
Package schemas re-exports the relational engine's schema vocabulary (github.com/hanzoai/xorm/schemas) so a consumer names hanzoai/orm and never hanzoai/xorm — the same reason the parent relational package exists, one level down.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL