mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-30 04:28:44 +00:00
Documentation
This commit is contained in:
1 parent
829451486e
commit
62f434f0e0
1 file changed
+14
-2
@@ -113,14 +113,26 @@ extension TableMapping {
|
||||
|
||||
// MARK: Full Text Search
|
||||
|
||||
/// TODO
|
||||
/// Returns a QueryInterfaceRequest with a matching predicate.
|
||||
///
|
||||
/// // SELECT * FROM books WHERE books MATCH '...'
|
||||
/// var request = Book.matching(pattern)
|
||||
///
|
||||
/// If the `selectsRowID` type property is true, then the selection includes
|
||||
/// the hidden "rowid" column:
|
||||
///
|
||||
/// // SELECT *, rowid FROM books WHERE books MATCH '...'
|
||||
/// var request = Book.matching(pattern)
|
||||
public static func matching(_ pattern: FTS3Pattern) -> QueryInterfaceRequest<Self> {
|
||||
return all().matching(pattern)
|
||||
}
|
||||
}
|
||||
|
||||
extension Column {
|
||||
/// TODO
|
||||
/// A matching SQL expression with the `MATCH` SQL operator.
|
||||
///
|
||||
/// // content MATCH '...'
|
||||
/// Column("content") MATCH '...'
|
||||
public func match(_ pattern: FTS3Pattern) -> SQLExpression {
|
||||
return SQLExpressionBinary(.match, self, pattern)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user