Skip to content

Commit add4d64

Browse files
Tests for version postfix irrelevance
1 parent 8be42f7 commit add4d64

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

doc/user/quick-sql-grammar.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ setting to override this default.
271271
**Possible Values**: `11g`, `12c`, `19c`, `21c`, `23c`
272272
**Default Value**: `19c`
273273

274-
Specifies the database version the syntax should be compatible with.
274+
Specifies the database version the syntax should be compatible with. Only version number is significant (and not the postfix). Therefore, 21 and 23.1.1 are also legitimate values.
275275

276276
### drop
277277

test/small_tests.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,19 @@ students
633633

634634
assert( "0 < output.indexOf('number default on null to_number(sys_guid()')" );
635635

636+
// https://github.com/oracle/quicksql/issues/51
637+
output = new quicksql(`boolvalues
638+
is_legal
639+
finished_yn
640+
ok bool
641+
yes boolean
642+
#db:"23"`).getDDL();
643+
644+
assert( "0 < output.indexOf('is_legal boolean,')" );
645+
assert( "0 < output.indexOf('finished_yn boolean,')" );
646+
assert( "0 < output.indexOf('ok boolean,')" );
647+
assert( "0 < output.indexOf('yes boolean')" );
648+
636649
// https://github.com/oracle/quicksql/issues/51
637650
output = new quicksql(`boolvalues
638651
is_legal
@@ -645,7 +658,18 @@ students
645658
assert( "0 < output.indexOf('finished_yn boolean,')" );
646659
assert( "0 < output.indexOf('ok boolean,')" );
647660
assert( "0 < output.indexOf('yes boolean')" );
661+
// https://github.com/oracle/quicksql/issues/51
662+
output = new quicksql(`boolvalues
663+
is_legal
664+
finished_yn
665+
ok bool
666+
yes boolean
667+
#db:"23.1.1"`).getDDL();
648668

669+
assert( "0 < output.indexOf('is_legal boolean,')" );
670+
assert( "0 < output.indexOf('finished_yn boolean,')" );
671+
assert( "0 < output.indexOf('ok boolean,')" );
672+
assert( "0 < output.indexOf('yes boolean')" );
649673
// https://github.com/oracle/quicksql/issues/51
650674
output = new quicksql(`boolvalues
651675
ok bool

0 commit comments

Comments
 (0)