Skip to content

Commit f23c657

Browse files
authored
Merge pull request #1 from CovenantSQL/develop
Support CREATE VIRTUAL TABLE and MATCH in where
2 parents 4527548 + 6ac80be commit f23c657

4 files changed

Lines changed: 1526 additions & 1481 deletions

File tree

‎ast.go‎

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -689,19 +689,21 @@ type DDL struct {
689689
PartitionSpec *PartitionSpec
690690
VindexSpec *VindexSpec
691691
VindexCols []ColIdent
692+
Options string
692693
}
693694

694695
// DDL strings.
695696
const (
696-
CreateStr = "create"
697-
AlterStr = "alter"
698-
DropStr = "drop"
699-
RenameStr = "rename"
700-
DropIndexStr = "drop index"
701-
CreateIndexStr = "create index"
702-
CreateVindexStr = "create vindex"
703-
AddColVindexStr = "add vindex"
704-
DropColVindexStr = "drop vindex"
697+
CreateStr = "create"
698+
AlterStr = "alter"
699+
DropStr = "drop"
700+
RenameStr = "rename"
701+
DropIndexStr = "drop index"
702+
CreateIndexStr = "create index"
703+
CreateVirtualTableStr = "create virtual table"
704+
CreateVindexStr = "create vindex"
705+
AddColVindexStr = "add vindex"
706+
DropColVindexStr = "drop vindex"
705707

706708
// Vindex DDL param to specify the owner of a vindex
707709
VindexOwnerStr = "owner"
@@ -724,6 +726,8 @@ func (node *DDL) Format(buf *TrackedBuffer) {
724726
buf.Myprintf("%s table%s %v", node.Action, exists, node.Table)
725727
case CreateIndexStr:
726728
buf.Myprintf("%s on %v", node.Action, node.Table)
729+
case CreateVirtualTableStr:
730+
buf.Myprintf("%s virtual table %v", node.Action, node.Table)
727731
case DropIndexStr:
728732
exists := ""
729733
if node.IfExists {
@@ -1997,6 +2001,8 @@ const (
19972001
NotLikeStr = "not like"
19982002
RegexpStr = "regexp"
19992003
NotRegexpStr = "not regexp"
2004+
MatchStr = "match"
2005+
NotMatchStr = "not match"
20002006
)
20012007

20022008
// Format formats the node.

0 commit comments

Comments
 (0)