module

Xerp::Store::Statements

Provides prepared statement helpers for database operations.

Class methods

all_files(db : DB::Database) : Array(FileRow)
Source
all_token_vectors(db : DB::Database) : Array(TokenVectorRow)
Source
delete_blocks_by_file(db : DB::Database, file_id : Int64) : Nil
Source
delete_file(db : DB::Database, file_id : Int64) : Nil
Source
delete_lines_by_file(db : DB::Database, file_id : Int64) : Nil
Source
delete_postings_by_file(db : DB::Database, file_id : Int64) : Nil
Source
file_count(db : DB::Database) : Int64
Source
increment_feedback_stat(db : DB::Database, result_id : String, kind : String) : Nil
Source
insert_block(db : DB::Database, file_id : Int64, kind : String, level : Int32, line_start : Int32, line_end : Int32, header_text : String | Nil, parent_block_id : Int64 | Nil) : Int64
Source
insert_feedback_event(db : DB::Database, result_id : String, query_hash : String | Nil, kind : String, note : String | Nil, created_at : String) : Int64
Source
select_block_by_id(db : DB::Database, block_id : Int64) : BlockRow | Nil
Source
select_block_line_map(db : DB::Database, file_id : Int64) : Bytes | Nil
Source
select_block_with_header(db : DB::Database, block_id : Int64) : Tuple(BlockRow, String | Nil) | Nil

Selects a block with its header text from line_cache via join.

Source
select_blocks_by_file(db : DB::Database, file_id : Int64) : Array(BlockRow)
Source
select_feedback_events_by_result(db : DB::Database, result_id : String) : Array(FeedbackEventRow)
Source
select_feedback_stats(db : DB::Database, result_id : String) : FeedbackStatsRow | Nil
Source
select_file_by_id(db : DB::Database, file_id : Int64) : FileRow | Nil
Source
select_file_by_path(db : DB::Database, rel_path : String) : FileRow | Nil
Source
select_line_from_cache(db : DB::Database, file_id : Int64, line_num : Int32) : String | Nil
Source
select_postings_by_file(db : DB::Database, file_id : Int64) : Array(PostingRow)
Source
select_postings_by_token(db : DB::Database, token_id : Int64) : Array(PostingRow)
Source
select_token_by_id(db : DB::Database, token_id : Int64) : TokenRow | Nil
Source
select_token_by_text(db : DB::Database, token : String) : TokenRow | Nil
Source
select_token_vector(db : DB::Database, token_id : Int64) : TokenVectorRow | Nil
Source
token_count(db : DB::Database) : Int64
Source
update_token_df(db : DB::Database, token_id : Int64, df : Int32) : Nil
Source
upsert_block_line_map(db : DB::Database, file_id : Int64, map_blob : Bytes) : Nil
Source
upsert_feedback_stats(db : DB::Database, result_id : String, promising_count : Int32, useful_count : Int32, not_useful_count : Int32) : Nil
Source
upsert_file(db : DB::Database, rel_path : String, file_type : String, mtime : Int64, size : Int64, line_count : Int32, content_hash : String, indexed_at : String) : Int64
Source
upsert_line_cache(db : DB::Database, file_id : Int64, line_num : Int32, text : String) : Nil
Source
upsert_posting(db : DB::Database, token_id : Int64, file_id : Int64, tf : Int32, lines_blob : Bytes) : Nil
Source
upsert_token(db : DB::Database, token : String, kind : String) : Int64
Source
upsert_token_vector(db : DB::Database, token_id : Int64, model : String, dims : Int32, vector_f32 : Bytes, trained_at : String) : Nil
Source