SuperAPI AI Directory

fandhe-db

Data & analytics

View repository

Updated 10-16 05:07

About this skill

fandhe-db

fandhe-db is a local-first vector-specialized query DB written in Rust.fandhe-vector-db-engine(core engine, SQL surface layer, HNSW/BM25/hybrid search, redb persistence, RLS) and fandhe-vector-db-wire-server(binary compatible with PostgreSQL wire protocol v3), and can be connected to from an unmodified psql / psycopg / pg client,USING PLAN / USING OPERATION_ID extension syntax. The target version is crates.io for both crates 0.1.0(no tag / release, pin commit SHA 7022d112e79760dca916480599553fcac256b5fb). The 0.1.0 crate name is fandhe-vector-db-engine / fandhe-vector-db-wire-server and this skill's commands (cargo run -p etc.), public names, and the docs.rs source: in each page's frontmatter are written under this name (fandhe-db-engine / fandhe-db-wire-server renaming to

There is no official documentation site; sources are the public repository https://github.com/Fandhe-AI/fandhe-db の README・docs/design/ ADRs and crate source (docs.rs source view. The rendered rustdoc pages are 404, so only the source view is available).

Positioning of the specification — The source of truth for the specification is the private repository Fandhe-AI/fandhe-db-spec(non-public), and since this skill cannot access it, it is limited to the scope that can be traced from public sources and public ADRs. The doc comments (rustdoc) in the crate source are written in Japanese, and the references body summarizes them in Japanese, while signature (type/identifier) portions are transcribed verbatim in English. Behaviors for which only a private spec reference ID remains are explicitly stated on each page ## Notes as "not documented because the spec is non-public".

Differentiation from other skills — upstash is the managed SaaS client for @upstash/vector,supabase is client-side usage of the pgvector extension and Postgres RLS, and neither is the vector DB engine itself.mssql / drizzle is a SQL client / ORM and is distinct from this skill's SQL surface layer (USING PLAN limited to extension syntax such as performance/ covers CPU SIMD (isa / dispatch) and GPU batch kernels via wgpu, and is not a reference for the GPU language/runtime layer (CUDA / MSL / HIP) handled bynvidia-cuda / apple-silicon / amd-rocm .fandhe-ai / fandhe-backend / fandhe-frontend is a separate library in the same fandhe org and its API is unrelated; if you want to investigate the vector DB engine itself, refer to this skill (fandhe-db).

Directory structure

skills/fandhe-db/
  SKILL.md
  references/
    getting-started/
      README.md
      overview.md
      crate-layout.md
      lib.md
      core.md
      error-format.md
      development-setup.md
    sql/
      README.md
      sql-module.md
      lexer.md
      parser.md
      allowlist.md
      using-plan.md
      using-operation-id.md
      mode.md
      explain.md
      plan.md
      scan.md
    sql-execution/
      README.md
      exec.md
      aggregate.md
      group-by.md
      expr-program.md
      scalar-index.md
      scalar-plan.md
      udf-call.md
      arena-cache.md
      hnsw-cache.md
      hnsw-hybrid.md
      sparse-cache.md
      visible-cache.md
    search/
      README.md
      search-engine.md
      hnsw.md
      sparse.md
      hybrid.md
      rerank.md
      scoring-boost.md
      precision.md
      query-planner.md
      tiering.md
    storage/
      README.md
      storage.md
      row-codec.md
      catalog.md
      txn.md
      recovery.md
      incremental.md
      arena.md
      buffer-pool.md
    security/
      README.md
      policy.md
      rls.md
      tenant.md
    wire-server/
      README.md
      main-cli.md
      server.md
      handshake.md
      auth.md
      bind-guard.md
      framing.md
      protocol-dispatch.md
      simple-query.md
      result-encoder.md
      response-buffer.md
      error-response.md
      limits.md
      search-engine-opt.md
      lib.md
    performance/
      README.md
      kernel.md
      isa.md
      dispatch.md
      gpu-batch.md
      batch-search.md
      batch-fallback.md
      batch-limits.md
      parallel-search.md
      f16.md
      sq8.md
    extensions/
      README.md
      wasm-udf.md
      declarative-filter.md
      embedding.md
      chunking.md
      dictionary.md
  samples/
    README.md
    start-wire-server.md
    connect-psql.md
    connect-psycopg.md
    connect-node-pg.md
    e2e-three-client.md
    docker-compose.md
  scripts/
    README.md
    install.md
    make-targets.md
    run-wire-server.md

Exploration procedure

Derive the category from the task, and identify the target page in the category's README.md:

  1. Find the category corresponding to the task in the mapping table below
  2. In that category, references/{category}/README.md refer to and identify the target page
  3. The target page's .md Read and confirm the details

Task → Category mapping

Task Category Reference README
Want to know the repository's positioning, crate structure, features, dependencies, engine crate root,VectorCore/EngineCore core API,ErrorClass/WireError wire_code mapping, development environment setup, and Makefile getting-started references/getting-started/README.md
SQL surface layer's tokenizer, semantic binding, AST allowlist,USING PLAN / USING OPERATION_ID / HINT ORDER Extended syntax,recall/precision mode resolution,EXPLAIN I want to know about responses and wide retrieval scan sql references/sql/README.md
SQL execution plan body (RLS→SCALAR→DISTANCE order), aggregation・GROUP BY, expression step compilation, scalar secondary index, declarative UDF invocation, and various generations-consistent caches dedicated to the SQL surface layer sql-execution references/sql-execution/README.md
I want to know about search engine selection/construction, HNSW approximate nearest neighbor search, BM25 inverted index, RRF hybrid fusion, reranking, declarative scoring boost, precision confidence gate, and LLM query planning/tiering search references/search/README.md
I want to know about the redb-based persistence layer, row encoder, schema catalog, transaction handle, failure recovery・commit_boundary・ledger, incremental index application, vector arena, and buffer pool storage references/storage/README.md
I want to know about tenant boundary/visibility context construction determination, RLS implicit application hooks and visible-row-limited search, and the reference implementation of the row store integration layer security references/security/README.md
I want to know about the wire-server binary's CLI flags/startup, connection accept loop, StartupMessage/authentication flow, Argon2id verification, message framing/type byte classification, simple query execution, response byte string generation, ErrorResponse cross-cutting mapping, and timeout/concurrent connection count control wire-server references/wire-server/README.md
I want to know about the search kernel boundary/CPU reference implementation, SIMD runtime detection/dispatch decision table, wgpu GPU batch search, degradation fallback to CPU-SIMD, bulk ingestion limit, parallel Top-k, and f16/i8(SQ8) quantization performance references/performance/README.md
I want to know about the WASM UDF sandbox execution contract, declarative metadata filters, embedding transformation injection points, chunk splitting, and symbol/term index extraction extensions references/extensions/README.md
I want to know about typical usage such as how to start wire-server, connection examples from unmodified psql/psycopg/pg clients, a 3-client e2e harness, and a Docker development environment samples samples/README.md
I want to know about installation/CLI commands such as development environment setup, Makefile tasks, and the wire-server startup command scripts scripts/README.md