Skip to main content

code_nodes_schema

Function code_nodes_schema 

Source
pub fn code_nodes_schema() -> Schema
Expand description

Schema for the CodeNodes table.

Columns 0–12 (original):

  • id: fully-qualified identifier (e.g. func:brain/perception/signal_fusion.py::fuse)
  • kind: object type (dictionary-encoded string, Dictionary<Int8, Utf8>)
  • parent_id: containment pointer (function→class→module→file)
  • name: object name
  • signature: function/method signature
  • docstring: documentation text
  • body_hash: SHA-256 of the object body for equality checks
  • body: full source text of the node
  • embedding: semantic vector (FixedSizeList<f32, 768>)
  • loc: lines of code
  • cyclomatic_complexity: complexity metric
  • coverage_pct: test coverage percentage
  • last_modified: timestamp from git history

Columns 13–18 (EX-3168 / V12a-1 — position metadata, all nullable):

  • start_line: 1-indexed source line where the node begins
  • end_line: 1-indexed source line where the node ends
  • start_col: 0-indexed column within start_line
  • end_col: 0-indexed column within end_line
  • file_path: relative path from crate root (e.g. "src/lib.rs")
  • byte_offset: byte position from file start (for fast editor seek)

Position columns are nullable for backward compatibility with existing Parquet files. The tree-sitter Rust parser (EX-3120) populates them for new nodes.