Skip to content

Commit 6bc2aed

Browse files
committed
Document the collation enumeration
It deserves it. Signed-off-by: Stephen Celis <stephen@stephencelis.com>
1 parent 895282d commit 6bc2aed

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

SQLite/Expression.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,14 +318,23 @@ public func ^ <V: Value where V.Datatype == Int64>(lhs: V, rhs: Expression<V?>)
318318
public prefix func ~ <V: Value where V.Datatype == Int64>(rhs: Expression<V>) -> Expression<V> { return wrap(__FUNCTION__, rhs) }
319319
public prefix func ~ <V: Value where V.Datatype == Int64>(rhs: Expression<V?>) -> Expression<V?> { return wrap(__FUNCTION__, rhs) }
320320

321+
/// A collating function used to compare to strings.
322+
///
323+
/// See: <https://www.sqlite.org/datatype3.html#collation>
321324
public enum Collation {
322325

326+
/// Compares string by raw data.
323327
case Binary
324328

329+
/// Like binary, but folds uppercase ASCII letters into their lowercase
330+
/// equivalents.
325331
case Nocase
326332

333+
/// Like binary, but strips trailing space.
327334
case Rtrim
328335

336+
/// A custom collating sequence identified by the given string, registered
337+
/// using `Database.create(collation:…)`
329338
case Custom(String)
330339

331340
}

0 commit comments

Comments
 (0)