Skip to content

Commit a53a65d

Browse files
issue 47 half way
1 parent 3594e96 commit a53a65d

File tree

11 files changed

+1793
-1614
lines changed

11 files changed

+1793
-1614
lines changed

CHANGELOG.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,13 @@ Issues up to #51
2525

2626
Further Json to QSQL parsing progress
2727

28-
Performance optimization: from 12 sec down to 6 sec for 1000 line QSQL schema definition
29-
in test/profile.js. Faster regression test as well.
28+
Performance optimization: from 12 sec down to 4.5 sec for 1000 line QSQL schema definition
29+
in test/profile.js (test for pk-fk chain of 333 tables, 3 column each; 268 ms for chain of
30+
50 tables, 20 columns each).
31+
32+
## [1.2.2] - 2024-2-15
33+
34+
Issue #47
35+
36+
Fixed invalid 'Misaligned Table ...' error, exhibited in vscode QSQL extension (yet to be published).
37+

dist/quick-sql.js

Lines changed: 1260 additions & 1275 deletions
Large diffs are not rendered by default.

dist/quick-sql.umd.cjs

Lines changed: 141 additions & 148 deletions
Large diffs are not rendered by default.

doc/user/quick-sql-grammar.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@
7878
| /insert NN | Generate NN SQL INSERT statement(s) with random data, for example: /INSERT 20. (Maximum = 1000) |
7979
| /rest | Generate REST enablement of the table using Oracle REST Data Services (ORDS) |
8080
| /select | Generate SQL SELECT statement after generating data for each table |
81-
| /unique | Generate table level unique constraint |
81+
| /unique, /uk | Generate table level unique constraint |
82+
| /pk | Generate primary key constraint (on table level it is usually a composite key) |
8283
<!-- markdownlint-enable MD013 -->
8384

8485
### Star/Snowflake schema relationship direction indicators
@@ -110,7 +111,7 @@ and is usually omitted from QSQL schema definition.
110111
| Directive | Description |
111112
| ------------------------------ | ------------------------------------------ |
112113
| /idx, /index, /indexed | Creates a non unique index |
113-
| /unique | Creates a unique constraint |
114+
| /unique, /uk | Creates a unique constraint |
114115
| /check | Creates a check constraint with comma or white space delimited values e.g. /check Yes, No |
115116
| /constant | When generating data set this column to a constant value. For example /constant NYC. |
116117
| /default | Adds default value if the column is null |
@@ -429,6 +430,8 @@ stmt::= tree
429430
| 'document' '=' JSON
430431
431432
view::= 'view' view_name table_name+
433+
| view_name '=' table_name+
434+
432435
view_name::= identifier
433436
table_name::= identifier
434437
column_name::= identifier
@@ -452,11 +455,13 @@ tableDirective::= '/'
452455
|'insert' integer
453456
|'rest'
454457
|'select'
455-
|'unique' )
458+
|'unique' | 'uk'
459+
|'pk'
460+
)
456461
457462
columnDirective::= '/'
458463
('idx'|'index'|'indexed'
459-
|'unique'
464+
|'unique'|'uk'
460465
|'check'
461466
|'constant'
462467
|'default'
@@ -467,7 +472,9 @@ columnDirective::= '/'
467472
|'between'
468473
|'hidden'|'invisible'
469474
|'references'|'reference'
470-
|'fk'|'pk' )
475+
|'fk'
476+
|'pk'
477+
)
471478
472479
datatype::=
473480
'num'|'number'

0 commit comments

Comments
 (0)