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 OptimisticLockingInfo
- 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 = 4 // VersionPatch is the patch release component for the current public API. VersionPatch = 3 )
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 OptimisticLockingInfo ¶ added in v0.4.1
type OptimisticLockingInfo = orm.OptimisticLockingInfo
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. |