1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
//! Store helper types and embedding conversion functions.
//!
//! Submodules by responsibility:
//! - `error` - Store error types
//! - `rows` - Database row-to-struct conversions
//! - `types` - Domain types (ChunkSummary, SearchResult, CallerInfo, etc.)
//! - `search_filter` - Search filter and scoring options
//! - `scoring` - Name scoring functions
//! - `sql` - SQL placeholder generation
//! - `embeddings` - Embedding serialization/deserialization
// ============ Re-exports ============
// All public items remain accessible at their original paths
// (e.g., `crate::store::helpers::StoreError`).
// Error types
pub use StoreError;
// Row types (crate-internal)
pub use ;
// Line number helper (used by rows and other store modules)
pub use clamp_line_number;
// Domain types
pub use ;
// Search filter
pub use ;
// Scoring functions
pub use ;
// SQL helpers (crate-internal)
pub use make_placeholders;
// Embedding serialization
pub use ;
// Schema version constant
/// Schema version for database migrations
///
/// Increment this when changing the database schema. Store::open() checks this
/// against the stored version and returns StoreError::SchemaMismatch if different.
///
/// History:
/// - v16: Current (composite PK on llm_summaries: content_hash + purpose)
/// - v15: 768-dim embeddings -- dropped sentiment dimension (SQ-9)
/// - v14: llm_summaries table for SQ-6
/// - v13: enrichment_hash for idempotent enrichment, hnsw_dirty flag
/// - v12: parent_type_name column for method->class association
/// - v11: type_edges table for type-level dependency tracking
/// - v10: sentiment in embeddings, call graph, notes
pub const CURRENT_SCHEMA_VERSION: i32 = 17;
/// Default model name for metadata checks (used by test-only `check_model_version`).
/// Canonical definition is `embedder::DEFAULT_MODEL_REPO`.
pub const DEFAULT_MODEL_NAME: &str = crateDEFAULT_MODEL_REPO;
/// AD-52: ModelInfo moved to embedder::models where it logically belongs.
/// Re-exported here so `store::helpers::ModelInfo` and `store::ModelInfo` continue to work.
pub use crateModelInfo;