Skip to content

Instance Method

isEqual(to:)

Returns true if the provided version is the same version as self.
func isEqual(to otherVersion: any SQLDatabaseReportedVersion) -> Bool

Parameters

otherVersion

The version to compare against.

Return Value

true if both versions are equal, false otherwise.

Discussion

Implementations of this method must check that the provided version and self represent the same type. If no implementation is provided, the default is to compare the type(of:) and stringValue of both versions for exact equality.

Warning

This method has been deprecated for callers, although it remains a protocol requirement for drivers. Users should use the == operator instead.

Default Implementations

SQLDatabaseReportedVersion Implementations