@@ -11,7 +11,7 @@ export const guid = 'guid';
1111export const tswtz = 'Timestamp with time zone' ;
1212export const tswltz = 'Timestamp with local time zone' ;
1313
14- export const ddl = ( function ( ) {
14+ export const parsed = ( function ( ) {
1515
1616 const defaultOptions = {
1717 apex : { label : 'APEX' , value :'no' , check :[ 'yes' , 'no' ] } ,
@@ -471,8 +471,7 @@ export function toQSQL( input ) {
471471 * @returns JSON object listing tables and links
472472 */
473473export function toERD ( input , options ) {
474- const parsed = new ddl ( input , options ) ;
475- return parsed . getERD ( ) ;
474+ return new parsed ( input , options ) . getERD ( ) ;
476475} ;
477476
478477/**
@@ -482,8 +481,7 @@ export function toERD( input, options ) {
482481 * @returns translated DDL
483482 */
484483export function toDDL ( input , options ) {
485- const parsed = new ddl ( input , options ) ;
486- return parsed . getDDL ( ) ;
484+ return new parsed ( input , options ) . getDDL ( ) ;
487485} ;
488486/**
489487 * @deprecated since version 1.2.0.
@@ -492,17 +490,16 @@ export function toDDL( input, options ) {
492490 * @returns list of SyntaxError objects
493491 */
494492export function errors ( input , options ) {
495- const parsed = new ddl ( input , options ) ;
496- return parsed . getErrors ( ) ;
493+ return new parsed ( input , options ) . getErrors ( ) ;
497494} ;
498495
499496export const version = {
500497 writable : false ,
501498 value : typeof __PACKAGE_VERSION__ === 'undefined' ? 'development' : __PACKAGE_VERSION__
502499} ;
503500
504- ddl . version = version ;
505- ddl . toDDL = toDDL ; // legacy, deprecated
506- ddl . toERD = toERD ; // legacy, deprecated
501+ parsed . version = version ;
502+ parsed . toDDL = toDDL ; // legacy, deprecated
503+ parsed . toERD = toERD ; // legacy, deprecated
507504
508- export default ddl ;
505+ export default parsed ;
0 commit comments