1 module hunt.sql.ast.SQLStatementImpl; 2 3 import hunt.sql.ast.SQLObject; 4 import hunt.sql.ast.SQLObjectImpl; 5 import hunt.sql.ast.SQLStatement; 6 import hunt.sql.ast.SQLCommentHint; 7 import hunt.sql.visitor.SQLASTVisitor; 8 import hunt.sql.SQLUtils; 9 10 import hunt.collection; 11 import hunt.Exceptions; 12 13 14 public abstract class SQLStatementImpl : SQLObjectImpl , SQLStatement { 15 protected string dbType; 16 protected bool afterSemi; 17 protected List!SQLCommentHint headHints; 18 19 public this(){ 20 21 } 22 23 public this(string dbType){ 24 this.dbType = dbType; 25 } 26 27 public string getDbType() { 28 return dbType; 29 } 30 31 public void setDbType(string dbType) { 32 this.dbType = dbType; 33 } 34 35 public override string toString() { 36 return SQLUtils.toSQLString(this, dbType); 37 } 38 39 public override string toLowerCaseString() { 40 // return SQLUtils.toSQLString(this, dbType, SQLUtils.DEFAULT_LCASE_FORMAT_OPTION);@gxc 41 implementationMissing(); 42 return string.init; 43 } 44 45 protected override void accept0(SQLASTVisitor visitor) { 46 throw new Exception("UnsupportedOperation"); 47 } 48 49 public List!SQLObject getChildren() { 50 throw new Exception("UnsupportedOperation"); 51 } 52 53 public bool isAfterSemi() { 54 return afterSemi; 55 } 56 57 public void setAfterSemi(bool afterSemi) { 58 this.afterSemi = afterSemi; 59 } 60 61 public override SQLStatement clone() { 62 throw new Exception("UnsupportedOperation"); 63 } 64 65 public List!SQLCommentHint getHeadHintsDirect() { 66 return headHints; 67 } 68 69 public void setHeadHints(List!SQLCommentHint headHints) { 70 this.headHints = headHints; 71 } 72 }