ID
The identifier of an SQLite collation.
struct ID
SQLite identifies collations by their name (case insensitive).
The identifier of an SQLite collation.
struct ID
SQLite identifies collations by their name (case insensitive).
import GRDB
A toolkit for SQLite databases, with a focus on application development
final class DatabaseCollation
DatabaseCollation
is a custom string comparison function used by SQLite.
init(_ name: String, function: @escaping (String, String) -> ComparisonResult)
Creates a collation.
static let caseInsensitiveCompare: DatabaseCollation
A collation that compares strings according to the Foundation String.caseInsensitiveCompare(_:)
method.
static let localizedCaseInsensitiveCompare: DatabaseCollation
A collation that compares strings according to the Foundation String.localizedCaseInsensitiveCompare(_:)
method.
static let localizedCompare: DatabaseCollation
A collation that compares strings according to the Foundation String.localizedCompare(_:)
method.
static let localizedStandardCompare: DatabaseCollation
A collation that compares strings according to the Foundation String.localizedStandardCompare(_:)
method.
static let unicodeCompare: DatabaseCollation
A collation that compares strings according to the built-in ==
and <=
operators of the Swift String.
var id: ID { get }
The identifier of the collation.
let name: String
The name of the collation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
static func == (lhs: Self, rhs: Self) -> Bool
Two collations are equal if they share the same name (case insensitive)
func hash(into hasher: inout Hasher)
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.