01: package org.obe.sql;
02:
03: import java.io.IOException;
04: import java.io.Writer;
05:
06: /**
07: * @author Adrian Price
08: */
09: public class SQLLValueList extends SimpleNode {
10: public SQLLValueList(int id) {
11: super (id);
12: }
13:
14: public void write(Writer out) throws IOException {
15: boolean comma = false;
16: for (int i = 0; i < children.length; i++) {
17: if (comma)
18: out.write(',');
19: children[i].write(out);
20: comma = true;
21: }
22: }
23:
24: public Object execute(Object context) {
25: Object[] result = new Object[children.length];
26: for (int i = 0; i < children.length; i++) {
27: result[i] = children[i].execute(context);
28: }
29: return result;
30: }
31: }
|