Skip to content

mitica/ysql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

YSQL - YAML to SQL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published