Description
UCAST, short for Universal Conditions AST, is a set of JavaScript libraries for representing a set of conditions in a neutral form and translating it into other query languages. It is meant for passing filter conditions between an API and a database. The README gives three examples: turning an HTTP request's query string into SQL, Mongo or Elasticsearch queries, running a MongoDB query inside a JavaScript runtime, and building a query builder for SQL. The project is split into packages. The core package defines the conditions syntax tree and helpers. The js package is an interpreter that evaluates conditions in JavaScript. The mongo package parses MongoDB query syntax, and mongo2js evaluates MongoDB queries in JavaScript. The sql package is an SQL interpreter with integrations for major ORMs. All packages target ES2020-compatible runtimes. The README links each package to its npm status badge and its package page, and a separate README in the core package explains what parsers, interpreters and translators are.…
Highlights
- Neutral syntax tree for filter conditions
- Translate conditions to SQL and MongoDB queries
- Evaluate MongoDB queries in JavaScript
- SQL interpreter with ORM integrations
- Targets ES2020-compatible runtimes
Ratings & Reviews
No ratings yet
Be the first to rate Ucast.
People also visit
Ucast FAQ
What is ucast for?
It is a library for representing conditions, such as filters from a request, in a standard form and then interpreting or translating them into a target language.
Which databases does it support?
The README names SQL, MongoDB and ElasticSearch as targets. SQL support includes integrations with major ORMs, and the mongo packages handle MongoDB query syntax.
Which package do I start with?
The core package holds the conditions syntax tree and helpers. Add the js, mongo, mongo2js or sql package for the target you need.
Which JavaScript runtimes are supported?
All packages target ES2020-compatible JavaScript runtimes, according to the README.
Is it free?
The source is public on GitHub. The README does not state a price or a license.
What are the best Ucast alternatives?
Popular alternatives to Ucast include LibreDB Studio, MistQL and Cirql. See all Ucast alternatives







