Download Latest Version v0.4.0 source code.tar.gz (6.0 MB)
Email in envelope

Get an email when there's a new version of Stoolap

Home / v0.3.4
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2026-03-09 4.5 kB
v0.3.4 source code.tar.gz 2026-03-09 5.4 MB
v0.3.4 source code.zip 2026-03-09 5.8 MB
Totals: 3 Items   11.3 MB 1

What's New in v0.3.4

C FFI Layer

Complete C API for embedding Stoolap in any language that can call C functions. Feature-gated with --features ffi.

  • Opaque handle API with step-based iteration, per-handle error storage, and panic-safe catch_unwind boundaries
  • Bulk fetch API (stoolap_rows_fetch_all) transfers entire result sets in a single packed binary buffer, eliminating per-row FFI overhead
  • Prepared statements with pre-compiled plans that bypass cache lookup on every execution
  • Transaction support with isolation level control (begin, commit, rollback)
  • Parameter binding for both positional ($1, $2) and named (:key) parameters
  • Full C header (include/stoolap.h) with documented binary format spec

    :::c StoolapDb *db = stoolap_open(":memory:"); stoolap_exec(db, "CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT)");

    StoolapStmt *stmt = stoolap_prepare(db, "INSERT INTO users VALUES ($1, $2)"); StoolapValue params[] = { stoolap_int(1), stoolap_text("Alice") }; stoolap_stmt_execute(stmt, params, 2);

Table-Valued Functions

  • GENERATE_SERIES for integer, float, and timestamp types
  • LIMIT pushdown, WHERE range clamping, JOIN support, and EXPLAIN integration
  • TVF infrastructure (parser, AST, executor, registry) for future functions

    :::sql SELECT * FROM GENERATE_SERIES(1, 10); SELECT * FROM GENERATE_SERIES('2026-01-01', '2026-12-31', '1 month'); SELECT g.value, t.name FROM GENERATE_SERIES(1, 5) g JOIN tasks t ON t.id = g.value;

Hash and String Functions

  • Hash/checksum: MD5, SHA1, SHA256, SHA384, SHA512, CRC32
  • String: STARTS_WITH, ENDS_WITH, CONTAINS

Query Optimizer Improvements

  • Mixed OR hybrid optimization for queries with both indexed and non-indexed OR branches (index lookup + filtered scan with dedup)
  • Relaxed multi-column index prefix rule to allow single-column prefix matching
  • Trailing range scan on composite indexes after equality prefix
  • BETWEEN decomposition to range comparisons for index use
  • Subquery index probe safety guard with outer refs or nested subqueries
  • Aggregation guard to prevent fast-path optimizations on aggregate queries

EXPLAIN Improvements

  • Partition WHERE predicates to correct join sides
  • Show residual filters on index scans
  • Handle ROLLUP/CUBE/GROUPING SETS display

Stoolap Studio

  • Documentation page with features overview, installation guide, quick tour, and keyboard shortcuts
  • Responsive dark/light mode screenshots on docs site and README

Bug Fixes

  • Fix undefined behavior in FFI bulk fetch buffer deallocation: into_boxed_slice() guarantees len == capacity for safe Vec::from_raw_parts reconstruction
  • Fix CowHashMap Stacked Borrows violation in drop and backward-shift deletion
  • Fix I64Map Stacked Borrows violation in backward-shift deletion
  • Fix CowBTree Stacked Borrows violations across all node pointer accesses
  • Fix CompactArc Stacked Borrows violation: derive data pointer via raw arithmetic instead of Deref
  • Restore Expression::Case match arm in process_where_subqueries accidentally deleted by mutation testing
  • Fix qualified outer column resolution in expression compiler to prevent incorrect binding when inner row shadows outer column names
  • Fix parser handling of consecutive semicolons (SELECT 1;;)
  • Reject bare expression statements in prepare() to catch typos like SELECTX at prepare time

Testing & CI

  • 14 FFI aggregate function tests (COUNT, SUM, AVG, MIN, MAX, GROUP BY, HAVING, JOINs, subqueries)
  • 67 unit tests for outer reference detection covering all match arms
  • 13 integration tests for correlated subquery outer reference paths
  • MVCC TransactionRegistry unit tests
  • sqllogictest suite with comprehensive .slt test files
  • Failpoint infrastructure for I/O error injection testing
  • Nightly CI: mutation testing (24 shards), Miri rotation (5 module groups), stress tests, sanitizers
  • TSAN inline suppression for CompactArc false positive

Documentation

  • C driver page with full API reference and bulk fetch binary format spec
  • Node.js driver updated for N-API C addon architecture
  • Development category: testing, limitations, building from source, contributing
  • Changelog page fetching releases from GitHub API
  • Unified header styles and grid overlay across docs site

Full Changelog: https://github.com/stoolap/stoolap/compare/v0.3.3...v0.3.4

Source: README.md, updated 2026-03-09