From 48da60f625b53dccbc4a34737eba55eb0eda181b Mon Sep 17 00:00:00 2001 From: Sotaro SUZUKI Date: Wed, 1 Oct 2014 16:17:34 +0900 Subject: add support stackable condition: ex. X and (Y or Z) see samples in src/test/java/com/iciql/test/StackableConditionsTest.java --- src/main/java/com/iciql/ConditionOpenClose.java | 33 +++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/main/java/com/iciql/ConditionOpenClose.java (limited to 'src/main/java/com/iciql/ConditionOpenClose.java') diff --git a/src/main/java/com/iciql/ConditionOpenClose.java b/src/main/java/com/iciql/ConditionOpenClose.java new file mode 100644 index 0000000..5284abd --- /dev/null +++ b/src/main/java/com/iciql/ConditionOpenClose.java @@ -0,0 +1,33 @@ +/* + * Copyright 2004-2011 H2 Group. + * Copyright 2011 James Moger. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.iciql; + +enum ConditionOpenClose implements Token { + OPEN("("), CLOSE(")"); + + private String text; + + ConditionOpenClose(String text) { + this.text = text; + } + + public void appendSQL(SQLStatement stat, Query query) { + stat.appendSQL(text); + } + +} -- cgit v1.2.3