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.dialect.mysql.ast.clause.MySqlDeclareConditionStatement;
17 
18 
19 import hunt.sql.dialect.mysql.ast.statement.MySqlStatementImpl;
20 import hunt.sql.dialect.mysql.visitor.MySqlASTVisitor;
21 import hunt.sql.dialect.mysql.ast.clause.ConditionValue;
22 
23 
24 public class MySqlDeclareConditionStatement : MySqlStatementImpl{
25 	
26 	alias accept0 = MySqlStatementImpl.accept0;
27 	/*
28 	DECLARE condition_name CONDITION FOR condition_value
29 
30 	condition_value:
31 	    SQLSTATE [VALUE] sqlstate_value
32 	  | mysql_error_code
33 	*/
34 	
35 	//condition_name
36 	private string conditionName; 
37 	//sp statement
38 	private ConditionValue conditionValue;
39 	
40 	public string getConditionName() {
41 		return conditionName;
42 	}
43 
44 	public void setConditionName(string conditionName) {
45 		this.conditionName = conditionName;
46 	}
47 
48 	public ConditionValue getConditionValue() {
49 		return conditionValue;
50 	}
51 
52 	public void setConditionValue(ConditionValue conditionValue) {
53 		this.conditionValue = conditionValue;
54 	}
55 
56 	override
57 	public void accept0(MySqlASTVisitor visitor) {
58 		// TODO Auto-generated method stub
59 		visitor.visit(this);
60 	    visitor.endVisit(this);
61 		
62 	}
63 
64 }
65