-
Notifications
You must be signed in to change notification settings - Fork 43
Full-text search #120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Full-text search #120
Conversation
| /// | ||
| /// - Parameter pattern: A string expression describing the `MATCH` pattern. | ||
| /// - Returns: A predicate expression. | ||
| public func match(_ pattern: QueryValue) -> some QueryExpression<Bool> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving this to requiring an FTS5 conformance is technically a breaking change, but it's not valid to call match outside of FTS, so I think it's fine while the library is still 0.x.
|
After integrating it into my project, the migration from my custom FTS5 implementation was smooth. I did encounter two issues:
@Table("tokens_fts")
public struct DBTokenFTS: StructuredQueries.FTS5, Codable, Sendable, Hashable {
@Column(primaryKey: true)
public let rowid: DBToken.ID
public let path: String
public init(rowid: DBToken.ID, path: String) {
self.rowid = rowid
self.path = path
}
} |
* Full-text search * wip * wip * Update FTS5.swift * wip * wip * wip * wip * wip * wip * wip * fix
* Full-text search * wip * wip * Update FTS5.swift * wip * wip * wip * wip * wip * wip * wip * fix
This PR (draft for now) introduces some potential helpers for SQLite's full-text search capabilities (FTS5). We can refine them further, and potentially quarantine them to a SQLite-only trait/module before merging.