Package Exports
- squirreling
- squirreling/src/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (squirreling) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Squirreling SQL Engine

Squirreling is a streaming async SQL engine for JavaScript. It is designed to provide efficient streaming of results from pluggable backend for highly efficient retrieval of data for browser applications.
Features
- Lightweight and fast
- Easy to integrate with frontend applications
- Lets you move query execution closer to your users
- Supports standard SQL queries
- Async streaming for large datasets
- Constant memory usage for simple queries with LIMIT
- Robust error handling and validation designed for LLM tool use
- In-memory data option for simple use cases
Usage
Squirreling returns an async generator, allowing you to process rows one at a time without loading everything into memory.
import { executeSql } from 'squirreling'
// In-memory table
const users = [
{ id: 1, name: 'Alice', active: true },
{ id: 2, name: 'Bob', active: false },
{ id: 3, name: 'Charlie', active: true },
// ...more rows
]
// Process rows as they arrive (streaming)
for await (const user of executeSql({
tables: { users },
query: 'SELECT * FROM users WHERE active = TRUE LIMIT 100',
})) {
console.log(user.name)
}There is an exported helper function collect to gather all rows into an array if needed:
import { collect } from 'squirreling'
const allUsers = await collect(executeSql({
tables: { users },
query: 'SELECT * FROM users',
}))
console.log(allUsers)