0.0.6 • Published 10 years ago

ysql v0.0.6

Weekly downloads
6
License
ISC
Repository
github
Last release
10 years ago

YSQL

YSQL is a language based on YAML or JSON that converts to SQL.

Usage

var Query = require('ysql').Query;
var query = new Query();

var ysql = fs.readFileSync('format.yml', 'utf8');

query.parse(ysql).toSql();
// output: { text: 'SELECT id, name AS "title" FROM "docs"', params: [] }

Where file format.yml content is:

SELECT:
  COLUMNS:
    - COLUMN:
        name: id
    - COLUMN:
        name: name
        as: title
  FROM:
    TABLE:
      name: docs

Build Status

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago