tiny.sql.SearchPrepared
Defined in tiny.sql.
API (7)
Actions
Public operations.
Fields and members
Public fields and members.
Source
Source: lib/sql/src/search/engine.zig:78
zig
pub const Prepared = struct { parsed: query_mod.Query, pub fn deinit(self: *Prepared, allocator: Allocator) void { self.parsed.deinit(allocator); self.* = undefined; } pub fn execute(self: *const Prepared, search: anytype, allocator: Allocator, limit: usize) Error!Results { const phase = trace.scope("search.prepared.execute"); defer phase.end(); return try search.queryParsed(allocator, self.parsed, limit); } pub fn executeScoreBand(self: *const Prepared, search: anytype, allocator: Allocator, limit: usize) Error!Results { const phase = trace.scope("search.prepared.execute_score_band"); defer phase.end(); return try search.queryParsedScoreBand(allocator, self.parsed, limit); } pub fn executeRanked(self: *const Prepared, search: anytype, allocator: Allocator, limit: usize, options: rank_mod.RankingOptions) Error!RankedResults { const phase = trace.scope("search.prepared.execute_ranked"); defer phase.end(); return try search.queryParsedRanked(allocator, self.parsed, limit, options); } pub fn snippet(self: *const Prepared, allocator: Allocator, text: []const u8, options: snippet_mod.SnippetOptions) Error![]u8 { return try snippet_mod.snippetParsed(allocator, text, self.parsed, options); } pub fn matches(self: *const Prepared, text: []const u8) bool { for (self.parsed.clauses) |clause| { if (text_mod.clauseScore(text, clause) != 0) return true; } return false; }};Source: lib/sql/src/root.zig:258
zig
pub const SearchPrepared = search.Prepared;Also reachable as
Audit
| Definitions | 7 |
|---|---|
| Public names | 14 |
| Members | 1 |
| Version | 26.7.0 |
| Revision | daab053ee433 |