mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved support hints.
This commit is contained in:
@@ -15,9 +15,12 @@
|
||||
*/
|
||||
package com.alibaba.druid.sql.ast.statement;
|
||||
|
||||
import com.alibaba.druid.sql.ast.SQLCommentHint;
|
||||
import com.alibaba.druid.sql.ast.SQLDataTypeImpl;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class SQLCharacterDataType extends SQLDataTypeImpl {
|
||||
|
||||
private String charSetName;
|
||||
@@ -26,6 +29,8 @@ public class SQLCharacterDataType extends SQLDataTypeImpl {
|
||||
private String charType;
|
||||
private boolean hasBinary;
|
||||
|
||||
public List<SQLCommentHint> hints;
|
||||
|
||||
public final static String CHAR_TYPE_BYTE = "BYTE";
|
||||
public final static String CHAR_TYPE_CHAR = "CHAR";
|
||||
|
||||
@@ -65,6 +70,14 @@ public class SQLCharacterDataType extends SQLDataTypeImpl {
|
||||
this.charType = charType;
|
||||
}
|
||||
|
||||
public List<SQLCommentHint> getHints() {
|
||||
return hints;
|
||||
}
|
||||
|
||||
public void setHints(List<SQLCommentHint> hints) {
|
||||
this.hints = hints;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void accept0(SQLASTVisitor visitor) {
|
||||
if (visitor.visit(this)) {
|
||||
|
||||
@@ -15,18 +15,33 @@
|
||||
*/
|
||||
package com.alibaba.druid.sql.ast.statement;
|
||||
|
||||
import com.alibaba.druid.sql.ast.SQLCommentHint;
|
||||
import com.alibaba.druid.sql.ast.SQLName;
|
||||
import com.alibaba.druid.sql.ast.SQLObjectImpl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public abstract class SQLConstraintImpl extends SQLObjectImpl implements SQLConstraint {
|
||||
|
||||
private SQLName name;
|
||||
private Boolean enable;
|
||||
|
||||
public List<SQLCommentHint> hints;
|
||||
|
||||
public SQLConstraintImpl(){
|
||||
|
||||
}
|
||||
|
||||
|
||||
public List<SQLCommentHint> getHints() {
|
||||
return hints;
|
||||
}
|
||||
|
||||
public void setHints(List<SQLCommentHint> hints) {
|
||||
this.hints = hints;
|
||||
}
|
||||
|
||||
|
||||
public SQLName getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@@ -15,10 +15,15 @@
|
||||
*/
|
||||
package com.alibaba.druid.sql.ast.statement;
|
||||
|
||||
import com.alibaba.druid.sql.ast.SQLCommentHint;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class SQLNotNullConstraint extends SQLConstraintImpl implements SQLColumnConstraint {
|
||||
|
||||
|
||||
|
||||
public SQLNotNullConstraint(){
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user