Skip to documentation
SLOP

tiny.sql.SearchPrepared

Reference tiny.sql SearchPrepared

Defined in tiny.sql.

API (7)

Actions

Public operations.

Fields and members

Public fields and members.

No direct callersNo direct callstiny.sqlSearchPrepared
Static calls · unresolved targets: unknown · external targets: unknown.

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

search.Prepared.

Audit

Definitions7
Public names14
Members1
Version26.7.0
Revisiondaab053ee433