Teide JS
One Engine. Tables and Graphs.
From Node.js.
Zero-copy Node.js bindings for the Teide columnar engine. Full SQL support, graph pattern matching with SQL/PGQ, vector search, and a fluent TypeScript API — all backed by a native C17 core with no data copying.
Features
SQL Engine
Full SQL with aggregations, joins, window functions, subqueries, and CTEs. Execute queries synchronously or asynchronously via executeSync() and execute().
Graph Queries (SQL/PGQ)
Create property graphs, match patterns with MATCH, traverse variable-length paths, and find shortest paths — all using the SQL/PGQ standard.
Vector Search
Cosine similarity, euclidean distance, and K-nearest-neighbor search with HNSW indexes. Built-in support for embedding-based retrieval.
Graph Algorithms
PageRank, connected components, Dijkstra shortest path, Louvain community detection, and clustering coefficients — accessible directly from SQL.
Zero-Copy Performance
Native C17 columnar engine exposed through NAPI. Data is shared via TypedArray views directly over the C heap — no serialization, no copying.
TypeScript API
Fluent, chainable query builder plus a full SQL interface. Complete type safety with TypeScript definitions for every API surface.
Quick Example
import { Context } from 'teidedb';
const ctx = new Context();
// Load a CSV file into a table
ctx.executeSync("CREATE TABLE t AS SELECT * FROM read_csv('data.csv')");
// Run an aggregation query
const result = ctx.executeSync(`
SELECT category, SUM(price) AS total
FROM t
GROUP BY category
ORDER BY total DESC
`);
console.log(result.columns, result.nRows);
ctx.destroy();