Skip to content

Tnifey/aql-tag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ₯‘ What?

AQL Template Tag Literal. ES Module with no dependencies.

πŸ₯‘ Why?

To work with AQL Queries anywhere.

πŸ₯‘ Usage

import { aql } from "https://raw.githubusercontent.com/Tnifey/aql-tag/master/src/mod.ts";
// or with tag
import { aql } from "https://raw.githubusercontent.com/Tnifey/aql-tag/0.0.3/mod.ts";

example

Works like AQL Helpers.

TL;DR

// import { aql } from '...'

const arr = [1, 2, 3];

const query = aql`for u in ${arr}`;

query returns

{
  query: "for u in @value0",
  bindVars: { value0: [1,2,3] },
}

πŸ₯‘ License

Apache License 2.0

Slightly modified by Tnifey

Source from: [https://github.com/arangodb/arangojs/blob/v6/src/aql-query.ts]

πŸ₯‘

About

AQL Query Tag as TypeScript for deno

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published