Skip to content
This repository has been archived by the owner on Oct 11, 2018. It is now read-only.

Documentation for original Waterline statement syntax, as specced in compileStatement() (But note that this method will be removed from the driver interface in a future release)

Notifications You must be signed in to change notification settings

sailshq/waterline-compile-statement-docs-circa-2017

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 

Repository files navigation

Waterline Query Docs

NOTE: The documentation in this repo is the next-generation of Waterline query syntax and is not valid in the 0.11 version of Waterline.

This repo documents the Waterline Statement format, expected results, and error notation used by queryable Waterline drivers. While the query syntax defined here will look familiar to anyone who has worked with Waterline or MongoDB, bear in mind that it represents a lower-level abstraction, and has important differences from the criteria dictionaries you might be used to working with when calling methods like .find().

Waterline Statements allow for the composition of complex queries that can run on either a SQL datastore or a NoSQL datastore. There are a few exceptions but for the most part the language is completely database-independent. It acts as an interchange format between higher level code (e.g. business logic) and native database queries (e.g. SQL strings or Mongo dictionaries).

Each statement compiles directly into a native query for a particular database, depending on the driver that is being used to do the compilation. Statements can be built and compiled in user land, but the format is also suitable for internal use within Waterline adapters. In the latter case, the adapter uses a driver to convert a Waterline criteria dictionary into one or more Waterline statements; then compiles those statements into native queries and finally transmits that native query to the underlying database.

Note that, while it is highly influenced by a relational/SQL databases, most of WLQL's syntax is also compatible with NoSQL databases such as MongoDB.

Waterline Drivers

See Waterline driver interface.

Table of Contents

About

Documentation for original Waterline statement syntax, as specced in compileStatement() (But note that this method will be removed from the driver interface in a future release)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published