Documentation
ΒΆ
Overview ΒΆ
Package dorm provides the stable public entry points for opening database connections.
Index ΒΆ
- Constants
- Variables
- func RegisterDriver(d driver.Driver)
- func RegisteredDriver() driver.Driver
- func Version() string
- type APIContract
- type APILifecycle
- type AccessPolicyEvent
- type AccessPolicyEventKind
- type AuditAction
- type CompatibilityPolicy
- type DB
- type DryRunSession
- type ExecutionReport
- type ExecutionStatement
- type ExecutionStatus
- type LifecycleHookEvent
- type OpenOption
- type QueryAdvisor
- type QueryAdvisorFinding
- type QueryAdvisorInput
- type QueryAdvisorReport
- type RoadmapModule
Constants ΒΆ
const ( ExecutionStatusSkipped = orm.ExecutionStatusSkipped AccessPolicyEventInjectedPredicate = orm.AccessPolicyEventInjectedPredicate AccessPolicyEventInjectedField = orm.AccessPolicyEventInjectedField AccessPolicyEventInheritedPolicy = orm.AccessPolicyEventInheritedPolicy AccessPolicyEventPolicyOverride = orm.AccessPolicyEventPolicyOverride AccessPolicyEventSoftDelete = orm.AccessPolicyEventSoftDelete )
const ( // VersionMajor is the major release component for the current public API. VersionMajor = 0 // VersionMinor is the minor release component for the current public API. VersionMinor = 3 // VersionPatch is the patch release component for the current public API. VersionPatch = 0 )
const (
// MinimumSupportedGoVersion is the minimum Go toolchain version supported by this release line.
MinimumSupportedGoVersion = "1.26"
)
Variables ΒΆ
var ( // SupportedOS lists the platform targets considered supported by the framework. SupportedOS = []string{"linux", "darwin", "windows"} // SupportedArch lists the CPU architectures considered supported by the framework. SupportedArch = []string{"amd64", "arm64"} // SupportedPostgresMajorVersions lists the PostgreSQL major versions validated by this release line. SupportedPostgresMajorVersions = []int{13, 14, 15, 16, 17} )
var ( ErrNotFound = dormerrors.ErrNotFound ErrAlreadyExists = dormerrors.ErrAlreadyExists ErrConflict = dormerrors.ErrConflict ErrInvalidModel = dormerrors.ErrInvalidModel ErrInvalidRelationship = dormerrors.ErrInvalidRelationship ErrMigrationRequired = dormerrors.ErrMigrationRequired ErrSchemaDrift = dormerrors.ErrSchemaDrift ErrInvalidContext = dormerrors.ErrInvalidContext ErrMissingCompany = dormerrors.ErrMissingCompany ErrPolicyDenied = dormerrors.ErrPolicyDenied ErrSeedConflict = dormerrors.ErrSeedConflict ErrDriverNotRegistered = dormerrors.ErrDriverNotRegistered ErrUnsupportedDialect = dormerrors.ErrUnsupportedDialect ErrTransactionClosed = dormerrors.ErrTransactionClosed ErrCommitFailed = dormerrors.ErrCommitFailed ErrRollbackFailed = dormerrors.ErrRollbackFailed ErrOptimisticLockFailed = dormerrors.ErrOptimisticLockFailed ErrRawSQLPolicyRequired = dormerrors.ErrRawSQLPolicyRequired )
Functions ΒΆ
func RegisterDriver ΒΆ
func RegisteredDriver ΒΆ
Types ΒΆ
type APIContract ΒΆ
type APIContract struct {
Name string
Lifecycle APILifecycle
DeprecatedSince string
Replacement string
}
APIContract describes the lifecycle state of a public symbol or package.
func DeprecatedAPI ΒΆ
func DeprecatedAPI(name, since, replacement string) APIContract
DeprecatedAPI creates a deprecated API contract record.
func ExperimentalAPI ΒΆ
func ExperimentalAPI(name string) APIContract
ExperimentalAPI creates an experimental API contract record.
func StableAPI ΒΆ
func StableAPI(name string) APIContract
StableAPI creates a stable API contract record.
func (APIContract) IsDeprecated ΒΆ
func (c APIContract) IsDeprecated() bool
IsDeprecated reports whether the contract is deprecated.
func (APIContract) IsStable ΒΆ
func (c APIContract) IsStable() bool
IsStable reports whether the contract is stable.
type APILifecycle ΒΆ
type APILifecycle string
APILifecycle describes the lifecycle of a public symbol.
const ( // APILifecycleExperimental marks a symbol that may change without notice. APILifecycleExperimental APILifecycle = "experimental" // APILifecycleStable marks a supported public symbol. APILifecycleStable APILifecycle = "stable" // APILifecycleDeprecated marks a public symbol that should not be used for new code. APILifecycleDeprecated APILifecycle = "deprecated" // APILifecycleRemoved marks a symbol that has been removed from the public API. APILifecycleRemoved APILifecycle = "removed" )
type AccessPolicyEvent ΒΆ added in v0.4.0
type AccessPolicyEvent = orm.AccessPolicyEvent
type AccessPolicyEventKind ΒΆ added in v0.4.0
type AccessPolicyEventKind = orm.AccessPolicyEventKind
type AuditAction ΒΆ added in v0.4.0
type AuditAction = orm.AuditAction
type CompatibilityPolicy ΒΆ
type CompatibilityPolicy struct {
MinimumGoVersion string
OperatingSystems []string
Architectures []string
PostgresMajors []int
}
CompatibilityPolicy describes supported runtime and database environments.
func DefaultCompatibilityPolicy ΒΆ
func DefaultCompatibilityPolicy() CompatibilityPolicy
DefaultCompatibilityPolicy returns the framework compatibility policy for this release line.
func (CompatibilityPolicy) Summary ΒΆ
func (p CompatibilityPolicy) Summary() string
Summary returns a stable human-readable summary of the compatibility policy.
func (CompatibilityPolicy) SupportsPostgreSQLMajor ΒΆ
func (p CompatibilityPolicy) SupportsPostgreSQLMajor(major int) bool
SupportsPostgreSQLMajor reports whether the provided PostgreSQL major version is supported.
func (CompatibilityPolicy) ValidateRuntime ΒΆ
func (p CompatibilityPolicy) ValidateRuntime() error
ValidateRuntime checks whether the current Go runtime and platform are supported.
type DryRunSession ΒΆ added in v0.4.0
type DryRunSession = orm.DryRunSession
type ExecutionReport ΒΆ added in v0.4.0
type ExecutionReport = orm.ExecutionReport
type ExecutionStatement ΒΆ added in v0.4.0
type ExecutionStatement = orm.ExecutionStatement
type ExecutionStatus ΒΆ added in v0.4.0
type ExecutionStatus = orm.ExecutionStatus
type LifecycleHookEvent ΒΆ added in v0.4.0
type LifecycleHookEvent = orm.LifecycleHookEvent
type OpenOption ΒΆ added in v0.1.11
type OpenOption func(*openConfig)
func WithObservability ΒΆ added in v0.1.11
func WithObservability(cfg orm.ObservabilityConfig) OpenOption
type QueryAdvisor ΒΆ added in v0.4.0
type QueryAdvisor = orm.QueryAdvisor
type QueryAdvisorFinding ΒΆ added in v0.4.0
type QueryAdvisorFinding = orm.QueryAdvisorFinding
type QueryAdvisorInput ΒΆ added in v0.4.0
type QueryAdvisorInput = orm.QueryAdvisorInput
type QueryAdvisorReport ΒΆ added in v0.4.0
type QueryAdvisorReport = orm.QueryAdvisorReport
type RoadmapModule ΒΆ
type RoadmapModule struct {
Name string
Description string
Contract APIContract
}
RoadmapModule describes a stable core capability or a planned future module.
func ExperimentalRoadmap ΒΆ
func ExperimentalRoadmap() []RoadmapModule
ExperimentalRoadmap returns the planned future modules only.
func Roadmap ΒΆ
func Roadmap() []RoadmapModule
Roadmap returns the stable core and the likely future modules for the framework.
func StableCore ΒΆ
func StableCore() []RoadmapModule
StableCore returns the stable core roadmap items only.
Directories
ΒΆ
| Path | Synopsis |
|---|---|
|
Package access applies context-scoped policies and row-level access controls.
|
Package access applies context-scoped policies and row-level access controls. |
|
benchmark
|
|
|
cmd
|
|
|
orm
command
|
|
|
Package dialect defines SQL rendering contracts for database-specific implementations.
|
Package dialect defines SQL rendering contracts for database-specific implementations. |
|
Package driver defines database driver integration for opening connections and exposing dialects.
|
Package driver defines database driver integration for opening connections and exposing dialects. |
|
Package errkind defines typed error categories used throughout the framework.
|
Package errkind defines typed error categories used throughout the framework. |
|
examples
|
|
|
basic
command
|
|
|
multi-tenant
command
|
|
|
todo
command
|
|
|
internal
|
|
|
Package migrate generates, writes, and applies database migrations.
|
Package migrate generates, writes, and applies database migrations. |
|
Package orm provides the runtime ORM for querying and mutating application models.
|
Package orm provides the runtime ORM for querying and mutating application models. |
|
Package schema parses, inspects, and compares database schema definitions.
|
Package schema parses, inspects, and compares database schema definitions. |