1 /* 2 * Copyright 2015-2018 HuntLabs.cn 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 module hunt.sql.ast.statement.SQLExternalRecordFormat; 17 18 import hunt.sql.ast.SQLExpr; 19 import hunt.sql.ast.SQLObjectImpl; 20 // import hunt.sql.dialect.oracle.ast.OracleSQLObjectImpl; 21 // import hunt.sql.dialect.oracle.visitor.OracleASTVisitor; 22 import hunt.sql.visitor.SQLASTVisitor; 23 24 public class SQLExternalRecordFormat : SQLObjectImpl { 25 private SQLExpr delimitedBy; 26 private SQLExpr terminatedBy; 27 28 override 29 public void accept0(SQLASTVisitor visitor) { 30 if (visitor.visit(this)) { 31 acceptChild(visitor, delimitedBy); 32 acceptChild(visitor, terminatedBy); 33 } 34 visitor.endVisit(this); 35 } 36 37 public SQLExpr getDelimitedBy() { 38 return delimitedBy; 39 } 40 41 public void setDelimitedBy(SQLExpr delimitedBy) { 42 if (delimitedBy !is null) { 43 delimitedBy.setParent(this); 44 } 45 this.delimitedBy = delimitedBy; 46 } 47 48 public SQLExpr getTerminatedBy() { 49 return terminatedBy; 50 } 51 52 public void setTerminatedBy(SQLExpr terminatedBy) { 53 if (terminatedBy !is null) { 54 terminatedBy.setParent(this); 55 } 56 this.terminatedBy = terminatedBy; 57 } 58 }