Registry / database / foxhound

foxhound

JSON →
library0.0jsnpmunverified

FoxHound is a fluent query generation DSL for Node.js and the browser (v2.0.27). It generates dialect-specific SQL from a single chainable API, keeping application code database-agnostic while producing parameterized queries for MySQL, PostgreSQL, MSSQL, SQLite, and ALASQL. Key differentiators include schema-aware auto-management of identity columns, timestamps, soft-delete tracking, built-in Fable integration (logging, config, UUID generation), and multiple output dialects including human-readable English and REST URL endpoints. The library supports full CRUD, count, filtering, sorting, joins, pagination, and custom SQL overrides with automatic parameter binding. It is released under the MIT license and follows a configure-then-build pattern.

npm install foxhound
INSTALL
IMPORT
SIG · FOXHOUND
F
foxhound
databasejavascriptv0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

libFoxHound
const libFoxHound = require('foxhound');
import libFoxHound from 'foxhound';
CommonJS module; ESM import will fail unless a bundler is used.
new
libFoxHound.new(_Fable);
new libFoxHound();
Instantiation requires a Fable instance; no direct constructor.
buildReadQuery
tmpQuery.buildReadQuery();
Build methods must be called after configuration; they generate query.body and query.parameters.

Create a query instance with a Fable object, chain configuration methods to build a SELECT query for MySQL, then log the SQL and parameters.

const libFable = require('fable'); const libFoxHound = require('foxhound'); const _Fable = new libFable({}); const tmpQuery = libFoxHound.new(_Fable); tmpQuery .setScope('Books') .setDataElements(['Title', 'Author', 'PublishedYear']) .addFilter('Genre', 'Science Fiction') .addSort({Column: 'PublishedYear', Direction: 'Descending'}) .setCap(25) .setDialect('MySQL') .buildReadQuery(); console.log(tmpQuery.query.body); // => SELECT `Title`, `Author`, `PublishedYear` FROM `Books` // WHERE `Books`.`Genre` = :Genre_w0 ORDER BY PublishedYear DESC LIMIT 25; console.log(tmpQuery.query.parameters); // => { Genre_w0: 'Science Fiction' }
Debug
Known issues
gotchaRequires a Fable instance; cannot be instantiated directly.
fix
Always pass a configured Fable object to libFoxHound.new().
affects: >=2.0.0
deprecatedThe 'setDialect' method is deprecated in favor of 'dialect'.
fix
Use .dialect('MySQL') instead of .setDialect('MySQL').
affects: >=2.0.0
breakingQuery parameters are now named with a suffix (e.g., :Genre_w0) to avoid collisions across multiple filters.
fix
Update any code that assumes fixed parameter names; use the parameters object returned.
affects: >=2.0.0
Errors
Common errors & fixes
TypeError: libFoxHound is not a constructor
Attempting to instantiate FoxHound without a Fable instance.
fix
Use libFoxHound.new(_Fable) instead of new libFoxHound().
Cannot read property 'query' of undefined
Calling buildReadQuery() before complete configuration.
fix
Ensure all necessary methods (setScope, setDialect, etc.) are called before buildReadQuery().
Error: Dialect 'XYZ' not supported
Using an unsupported dialect string.
fix
Use one of: 'MySQL', 'PostgreSQL', 'MSSQL', 'SQLite', 'ALASQL', 'English', or 'MeadowEndpoints'.
Upgrade
Version history
0.0latest on npm
Audit
Dependencies
fableoptionalRequired for configuration, logging, and UUID generation. FoxHound operates as a Fable service.
Agent activity
4 hits · last 30 days
node
4
Resources
foxhound — npm install foxhound · libregistry