Pewarta Proxy

📋 Server Request & Proxy Logs

Loading active proxy settings...
Developed by Khairul Adha (adhexa.id)
Mengambil log server...

⚙️ Pengaturan Proxy Target

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
feat: add volatile, alias of temp(orary)
  • Loading branch information
davidjgoss committed Feb 12, 2024
commit d55586d4b210f8e7747e1dc8e8d9b341a15df17c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
package net.sf.jsqlparser.statement.create.view;

public enum TemporaryOption {
NONE, TEMP, TEMPORARY;
NONE, TEMP, TEMPORARY, VOLATILE;

public static TemporaryOption from(String option) {
return Enum.valueOf(TemporaryOption.class, option.toUpperCase());
Expand Down
2 changes: 2 additions & 0 deletions src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjt
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@ TOKEN: /* SQL Keywords. prefixed with K_ to avoid name clashes */
| <K_VARYING:"VARYING">
| <K_VERBOSE: "VERBOSE">
| <K_VIEW:"VIEW">
| <K_VOLATILE:"VOLATILE">
| <K_CONCURRENTLY:"CONCURRENTLY">
| <K_WAIT : "WAIT">
| <K_WHEN:"WHEN">
Expand Down Expand Up @@ -5814,6 +5815,7 @@ CreateView CreateView(boolean isUsingOrReplace):
[
<K_TEMP> { createView.setTemporary(TemporaryOption.TEMP); }
| <K_TEMPORARY> { createView.setTemporary(TemporaryOption.TEMPORARY); }
| <K_VOLATILE> { createView.setTemporary(TemporaryOption.VOLATILE); }
]
[ <K_MATERIALIZED> { createView.setMaterialized(true);} ]
<K_VIEW> view=Table() { createView.setView(view); }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ public void testCreateForceView3() throws JSQLParserException {
"CREATE OR REPLACE NO FORCE VIEW view1 AS SELECT a, b FROM testtab");
}

@Test
public void testCreateVolatileView() throws JSQLParserException {
assertSqlCanBeParsedAndDeparsed("CREATE VOLATILE VIEW myview AS SELECT * FROM mytable");
}

@Test
public void testCreateTemporaryViewIssue604() throws JSQLParserException {
assertSqlCanBeParsedAndDeparsed("CREATE TEMPORARY VIEW myview AS SELECT * FROM mytable");
Expand Down