npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@oracle/quicksql

v1.2.13

Published

Quick SQL to DDL and ERD translator

Downloads

41

Readme

Quick SQL

Node.js CI

Table of Contents

Overview

Quick SQL is a markdown-like shorthand syntax that expands to standards-based Oracle SQL. It is useful to rapidly design and prototype data models. Take a look at the example below:

Quick SQL

Previously, Quick SQL was only available within Oracle Application Express. This project reimplements the Quick SQL parser and translator into a JavaScript library which can be used in both NodeJS and the browser.

This repository also includes a Quick SQL to Entity Relationship Diagram module that can be used as seen in the example below:

Quick ERD

Install

npm install @oracle/quicksql

Translating Quick SQL into Oracle SQL Data Definition Language (DDL)

The Quick SQL to DDL translator is the product's core component, It allows users to transform a Quick SQL string into an Oracle SQL string.

The Quick SQL Syntax and Grammar are documented here

See below for examples of how to use this library.

Command Line Usage

NPXJS regitry already contains package with conflicting name. To disambiguate, please use command like this:

npx @oracle/quicksql test/apex/department_employees.qsql > output.sql

DDL NodeJS ECMA Script Module (ESM) Example

import { quicksql } from "@oracle/quicksql";
import fs from "fs";

try {
    const text = fs.readFileSync( './test/department_employees.quicksql' );
    console.log( new quicksql( text.toString() ).getDDL() );
} catch( e ) {
    console.error( e );
};

DDL NodeJS Common JS (CJS) Example

const { quicksql } = require( "@oracle/quicksql" );
const fs = require( "fs" );

try {
    const text = fs.readFileSync( './test/department_employees.quicksql' );
    console.log( new quicksql( text.toString() ).getDDL() );
} catch( e ) {
    console.error( e );
};

DDL Browser ECMA Script Module (ESM) Example

<script type="module">
    import { quicksql } from './dist/quick-sql.js';
    document.body.innerText = new quicksql(
`departments /insert 2
    name /nn
    location
    country
    employees /insert 4
        name /nn vc50
        email /lower
        cost center num
        date hired
        job vc255

view emp_v departments employees

# settings = { "prefix": null, "semantics": "CHAR", "DV": false }

`
    ).getDDL();
</script>

DDL Browser Universal Module Definition (UMD) Example

<script src="./dist/quick-sql.umd.cjs"></script>
<script>
    document.body.innerText = new quickSQL.quicksql(
`departments /insert 2
    name /nn
    location
    country
    employees /insert 4
        name /nn vc50
        email /lower
        cost center num
        date hired
        job vc255

view emp_v departments employees

# settings = { "prefix": null, "semantics": "CHAR", "DV": false }

`
    ).toDDL();
</script>

Transforming Quick SQL into an Entity-Relationship Diagram (ERD)

Requires a paid library. Review the usage here

Contributing

This project welcomes contributions from the community. Before submitting a pull request, please review our contribution guide

Security

Please consult the security guide for our responsible security vulnerability disclosure process

License

Copyright (c) 2023 Oracle and/or its affiliates.

Released under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl/.