コード例 #1
0
 public void unparse(SqlWriter writer, SqlNode[] operands, int leftPrec, int rightPrec) {
   assert operands.length >= 2;
   final SqlWriter.Frame frame = writer.startList(SqlWriter.FrameTypeEnum.Simple);
   operands[0].unparse(writer, leftPrec, getLeftPrec());
   final boolean needsSpace = true;
   writer.setNeedWhitespace(needsSpace);
   writer.sep("AS");
   writer.setNeedWhitespace(needsSpace);
   operands[1].unparse(writer, getRightPrec(), rightPrec);
   if (operands.length > 2) {
     final SqlWriter.Frame frame1 = writer.startList(SqlWriter.FrameTypeEnum.Simple, "(", ")");
     for (int i = 2; i < operands.length; i++) {
       SqlNode operand = operands[i];
       writer.sep(",", false);
       operand.unparse(writer, 0, 0);
     }
     writer.endList(frame1);
   }
   writer.endList(frame);
 }
コード例 #2
0
 public void unparse(SqlWriter writer, int leftPrec, int rightPrec) {
   writer.print("?");
   writer.setNeedWhitespace(false);
 }