fql-parser 0.1.4

A parser for the Fauna Query Language (FQL).
Documentation

This repository contains unofficial patterns, sample code, or tools to help developers build more effectively with Fauna. All Fauna Labs repositories are provided “as-is” and without support. By using this repository or its contents, you agree that this repository may never be officially supported and moved to the Fauna organization.

FQL parser

This is a Rust crate and NPM package that parses raw FQL queries into the wire protocol format.

Usage

Rust

To use the parser, add the following to your Cargo.toml:

[dependencies]
fql-parser = "0.1.3"

Then, in your code, import the crate and parse your query:

extern crate fql_parser;

fn main() {
    let query = "Add(2, 2)";
    let result = fql_parser::serialize_fql_query(query);

    println!("{}", result);
}

JavaScript/TypeScript

TODO

Building and publishing the crate

Rust

cargo build
# Publish to https://crates.io/crates/fql-parser
cargo publish

NPM

wasm-pack build --scope fauna-labs
wasm-pack publish --access=public