forked from alibaba/druid
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Yako
authored and
Yako
committed
Sep 23, 2014
1 parent
bfa271d
commit e7829a7
Showing
9 changed files
with
404 additions
and
1 deletion.
There are no files selected for viewing
85 changes: 85 additions & 0 deletions
85
src/main/java/com/alibaba/druid/sql/dialect/sqlserver/ast/SQLServerDeclareItem.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,85 @@ | ||
/* | ||
* Copyright 2014 Alibaba.com All right reserved. This software is the | ||
* confidential and proprietary information of Alibaba.com ("Confidential | ||
* Information"). You shall not disclose such Confidential Information and shall | ||
* use it only in accordance with the terms of the license agreement you entered | ||
* into with Alibaba.com. | ||
*/ | ||
package com.alibaba.druid.sql.dialect.sqlserver.ast; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import com.alibaba.druid.sql.ast.SQLDataType; | ||
import com.alibaba.druid.sql.ast.SQLExpr; | ||
import com.alibaba.druid.sql.ast.statement.SQLTableElement; | ||
import com.alibaba.druid.sql.dialect.sqlserver.visitor.SQLServerASTVisitor; | ||
|
||
public class SQLServerDeclareItem extends SQLServerObjectImpl { | ||
|
||
protected Type type; | ||
|
||
protected SQLExpr name; | ||
|
||
protected SQLDataType dataType; | ||
|
||
protected SQLExpr value; | ||
|
||
protected List<SQLTableElement> tableElementList = new ArrayList<SQLTableElement>(); | ||
|
||
@Override | ||
public void accept0(SQLServerASTVisitor visitor) { | ||
if (visitor.visit(this)) { | ||
acceptChild(visitor, this.name); | ||
acceptChild(visitor, this.dataType); | ||
acceptChild(visitor, this.value); | ||
acceptChild(visitor, this.tableElementList); | ||
} | ||
visitor.endVisit(this); | ||
} | ||
|
||
public SQLExpr getName() { | ||
return name; | ||
} | ||
|
||
public void setName(SQLExpr name) { | ||
this.name = name; | ||
} | ||
|
||
public SQLDataType getDataType() { | ||
return dataType; | ||
} | ||
|
||
public void setDataType(SQLDataType dataType) { | ||
this.dataType = dataType; | ||
} | ||
|
||
public SQLExpr getValue() { | ||
return value; | ||
} | ||
|
||
public void setValue(SQLExpr value) { | ||
this.value = value; | ||
} | ||
|
||
public List<SQLTableElement> getTableElementList() { | ||
return tableElementList; | ||
} | ||
|
||
public void setTableElementList(List<SQLTableElement> tableElementList) { | ||
this.tableElementList = tableElementList; | ||
} | ||
|
||
public enum Type { | ||
TABLE, LOCAL, CURSOR; | ||
} | ||
|
||
public Type getType() { | ||
return type; | ||
} | ||
|
||
public void setType(Type type) { | ||
this.type = type; | ||
} | ||
|
||
} |
38 changes: 38 additions & 0 deletions
38
...main/java/com/alibaba/druid/sql/dialect/sqlserver/ast/stmt/SQLServerDeclareStatement.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,38 @@ | ||
/* | ||
* Copyright 2014 Alibaba.com All right reserved. This software is the | ||
* confidential and proprietary information of Alibaba.com ("Confidential | ||
* Information"). You shall not disclose such Confidential Information and shall | ||
* use it only in accordance with the terms of the license agreement you entered | ||
* into with Alibaba.com. | ||
*/ | ||
package com.alibaba.druid.sql.dialect.sqlserver.ast.stmt; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import com.alibaba.druid.sql.dialect.sqlserver.ast.SQLServerDeclareItem; | ||
import com.alibaba.druid.sql.dialect.sqlserver.ast.SQLServerObjectImpl; | ||
import com.alibaba.druid.sql.dialect.sqlserver.ast.SQLServerStatement; | ||
import com.alibaba.druid.sql.dialect.sqlserver.visitor.SQLServerASTVisitor; | ||
|
||
public class SQLServerDeclareStatement extends SQLServerObjectImpl implements SQLServerStatement { | ||
|
||
protected List<SQLServerDeclareItem> items = new ArrayList<SQLServerDeclareItem>(); | ||
|
||
@Override | ||
public void accept0(SQLServerASTVisitor visitor) { | ||
if (visitor.visit(this)) { | ||
this.acceptChild(visitor, items); | ||
} | ||
visitor.endVisit(this); | ||
} | ||
|
||
public List<SQLServerDeclareItem> getItems() { | ||
return items; | ||
} | ||
|
||
public void setItems(List<SQLServerDeclareItem> items) { | ||
this.items = items; | ||
} | ||
|
||
} |
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.