Skip to content

Protocol

SQLDatabaseReportedVersion

Provides a protocol for reporting and comparing database version numbers.
protocol SQLDatabaseReportedVersion : Comparable, Sendable

Overview

SQLKit allows databases to report their versions. As any given database implementation may have its own particular format for version numbers, the version is provided to SQLDatabase as a value of a type conforming to this protocol, which defines an interface for generically handling and comparing versions without needing to be aware of implementation-specific details.

The most common uses for database version information are disabling or enabling feature support in SQLDialect by version, tracking usage metrics by version, logging versions, and recording versions for debugging.

Each type implementing SQLDatabaseReportedVersion is responsible for providing definitions of equality and ordering semantics between versions which are meaningful in the versioning scheme of the underlying database.

Topics

Instance Properties

Instance Methods

Default Implementations

Relationships

Inherits From

  • Swift.Comparable
  • Swift.Equatable
  • Swift.Sendable
  • Swift.SendableMetatype

See Also

Drivers