-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* support clickhouse global keyword in join * fix: add missing public Getter Add public Getter for `updateSets` Fixes #1630 * feat: Clickhouse GLOBAL JOIN All credits to @julianzlzhang fixes #1615 fixes #1535 * feat: IF/ELSE statements supports Block Make `If... Else...` statements work with Blocks Make `Statement()` production work with `Block()` Rewrite the `Block()` related Unit Tests fixes #1682 * fix: Revert unintended changes to the Special Oracle Tests * fix: `SET` statement supports `UserVariable` Make `SetStatement` parse Objects instead of Names only Add Grammar to accept `UserVariable` (e.g. "set @Flag = 1") Add Test Case for `UserVariable` fixes #1682 * feat: Google Spanner Support Replaces PR #1415, all credit goes to @s13o Re-arranged some recently added Tokens in alphabetical order Update Keywords * fix: fix JSonExpression, accept Expressions Make JSonExpression accept Expressions Add Testcase Expose Idents() and Operators() Fixes #1696 * test: add Test for Issue #1237 Co-authored-by: Zhang Zhongliang <zhangzhongliang@xiaomi.com>
- Loading branch information
1 parent
08a92fc
commit 8d9db70
Showing
20 changed files
with
434 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 75 additions & 0 deletions
75
src/main/java/net/sf/jsqlparser/expression/SpannerInterleaveIn.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/*- | ||
* #%L | ||
* JSQLParser library | ||
* %% | ||
* Copyright (C) 2004 - 2021 JSQLParser | ||
* %% | ||
* Dual licensed under GNU LGPL 2.1 or Apache License 2.0 | ||
* #L% | ||
*/ | ||
package net.sf.jsqlparser.expression; | ||
|
||
import net.sf.jsqlparser.schema.Table; | ||
|
||
import java.util.Collections; | ||
import java.util.List; | ||
|
||
public class SpannerInterleaveIn { | ||
|
||
public enum OnDelete { | ||
CASCADE, | ||
NO_ACTION | ||
} | ||
|
||
private Table table; | ||
private OnDelete onDelete; | ||
|
||
public SpannerInterleaveIn() { | ||
|
||
} | ||
|
||
public SpannerInterleaveIn(Table table, OnDelete action) { | ||
setTable(table); | ||
setOnDelete(action); | ||
} | ||
|
||
public SpannerInterleaveIn(List<String> nameParts) { | ||
this(new Table(nameParts), null); | ||
} | ||
|
||
public SpannerInterleaveIn(String tableName) { | ||
this(Collections.singletonList(tableName)); | ||
} | ||
|
||
public Table getTable() { | ||
return table; | ||
} | ||
|
||
public void setTable(Table table) { | ||
this.table = table; | ||
} | ||
|
||
public OnDelete getOnDelete() { | ||
return onDelete; | ||
} | ||
|
||
public void setOnDelete(OnDelete action) { | ||
this.onDelete = action; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "INTERLEAVE IN PARENT " + getTable().getName() + | ||
(getOnDelete() == null ? "" : " ON DELETE " + (getOnDelete() == OnDelete.CASCADE ? "CASCADE" : "NO ACTION")); | ||
} | ||
|
||
public SpannerInterleaveIn withTable(Table table) { | ||
this.setTable(table); | ||
return this; | ||
} | ||
|
||
public SpannerInterleaveIn withOnDelete(OnDelete action) { | ||
this.setOnDelete(action); | ||
return this; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.