SqlNode[] inputs = new SqlNode[2]; inputs[0] = fqId; inputs[1] = SqlLiteral.createCharString( Util.last(id.names), id.getParserPosition());
SqlLiteral lit = SqlLiteral.createCharString(id, "UTF16", getPos()); lit = lit.unescapeUnicode(unicodeEscapeChar); {if (true) return lit.toValue();}
SqlCharStringLiteral literal; try { literal = SqlLiteral.createCharString(p, charSet, getPos()); } catch (java.nio.charset.UnsupportedCharsetException e) { {if (true) throw SqlUtil.newContextException(getPos(), p = SqlParserUtil.parseString(token.image); try { literal = SqlLiteral.createCharString(p, charSet, getPos()); } catch (java.nio.charset.UnsupportedCharsetException e) { {if (true) throw SqlUtil.newContextException(getPos(),
SqlLiteral lit = SqlLiteral.createCharString(id, "UTF16", getPos()); lit = lit.unescapeUnicode(unicodeEscapeChar); {if (true) return lit.toValue();}
SqlCharStringLiteral literal; try { literal = SqlLiteral.createCharString(p, charSet, getPos()); } catch (java.nio.charset.UnsupportedCharsetException e) { {if (true) throw SqlUtil.newContextException(getPos(), p = SqlParserUtil.parseString(token.image); try { literal = SqlLiteral.createCharString(p, charSet, getPos()); } catch (java.nio.charset.UnsupportedCharsetException e) { {if (true) throw SqlUtil.newContextException(getPos(),
/** * Creates a string literal in the system character set. * * @param s a string (without the sql single quotes) * @param pos Parser position */ public static SqlCharStringLiteral createCharString( String s, SqlParserPos pos) { // UnsupportedCharsetException not possible return createCharString(s, null, pos); }
SqlNode createGroupExpr() { // TODO: create an expression that could have no other source return SqlLiteral.createCharString("xyz" + groupCount++, SqlParserPos.ZERO); } }
SqlNode createGroupExpr() { // TODO: create an expression that could have no other source return SqlLiteral.createCharString("xyz" + groupCount++, SqlParserPos.ZERO); } }
/** * Creates a string literal in the system character set. * * @param s a string (without the sql single quotes) * @param pos Parser position */ public static SqlCharStringLiteral createCharString( String s, SqlParserPos pos) { // UnsupportedCharsetException not possible return createCharString(s, null, pos); }
SqlLiteral lit = SqlLiteral.createCharString(id, "UTF16", getPos()); lit = lit.unescapeUnicode(unicodeEscapeChar); {if ("" != null) return lit.toValue();}
public static SqlNode getNode(SqlParserPos pos, Map<String, String> fieldMap, String queryString) { SqlNode[] operands = new SqlNode[fieldMap.size() + 1]; for (String field : fieldMap.keySet()) { int index = Integer.parseInt(fieldMap.get(field).substring(1)); operands[index] = getIdentifier(field); } SqlNode query = SqlLiteral.createCharString(queryString, pos); operands[operands.length - 1] = query; return new SqlBasicCall(OPERATOR, operands, pos); }
SqlCharStringLiteral literal; try { literal = SqlLiteral.createCharString(p, charSet, getPos()); } catch (java.nio.charset.UnsupportedCharsetException e) { {if (true) throw SqlUtil.newContextException(getPos(), p = SqlParserUtil.parseString(token.image); try { literal = SqlLiteral.createCharString(p, charSet, getPos()); } catch (java.nio.charset.UnsupportedCharsetException e) { {if (true) throw SqlUtil.newContextException(getPos(),
public SqlNode getNode(SqlNode node){ SqlLiteral literal; if(isArray){ literal = SqlLiteral.createExactNumeric(value, parserPos); }else{ literal = SqlLiteral.createCharString(value, parserPos); } return new SqlBasicCall(SqlStdOperatorTable.ITEM, new SqlNode[]{ node, literal }, parserPos); }
@Override public SqlCall createCall(SqlParserPos pos, SqlNode... operands) { assert 1 == operands.length; return super.createCall(pos, SqlTrimFunction.Flag.LEADING.symbol(SqlParserPos.ZERO), SqlLiteral.createCharString(" ", SqlParserPos.ZERO), operands[0]); } });
@Override public SqlCall createCall(SqlParserPos pos, SqlNode... operands) { assert 1 == operands.length; return super.createCall(pos, SqlTrimFunction.Flag.LEADING.symbol(SqlParserPos.ZERO), SqlLiteral.createCharString(" ", SqlParserPos.ZERO), operands[0]); } });
@Override public SqlCall createCall(SqlParserPos pos, SqlNode... operands) { assert 1 == operands.length; return super.createCall(pos, SqlTrimFunction.Flag.TRAILING.symbol(SqlParserPos.ZERO), SqlLiteral.createCharString(" ", SqlParserPos.ZERO), operands[0]); } });
@Override public SqlCall createCall(SqlParserPos pos, SqlNode... operands) { assert 1 == operands.length; return super.createCall(pos, SqlTrimFunction.Flag.TRAILING.symbol(SqlParserPos.ZERO), SqlLiteral.createCharString(" ", SqlParserPos.ZERO), operands[0]); } });
public SqlNode getNode(SqlNode node) { SqlLiteral literal; if (isArray) { literal = SqlLiteral.createExactNumeric(value, parserPos); } else { literal = SqlLiteral.createCharString(value, parserPos); } return new SqlBasicCall(SqlStdOperatorTable.ITEM, new SqlNode[]{node, literal}, parserPos); }
/** * Copies a {@link SqlCall}, replacing the time unit operand with the given * literal. * * @param call Call * @param literal Literal to replace time unit with * @param pos Parser position * @return Modified call */ public static SqlCall replaceTimeUnitOperand(SqlCall call, String literal, SqlParserPos pos) { SqlLiteral literalNode = SqlLiteral.createCharString(literal, null, pos); return call.getOperator().createCall(call.getFunctionQuantifier(), pos, call.getOperandList().get(0), literalNode); }
/** * Copies a {@link SqlCall}, replacing the time unit operand with the given * literal. * * @param call Call * @param literal Literal to replace time unit with * @param pos Parser position * @return Modified call */ public static SqlCall replaceTimeUnitOperand(SqlCall call, String literal, SqlParserPos pos) { SqlLiteral literalNode = SqlLiteral.createCharString(literal, null, pos); return call.getOperator().createCall(call.getFunctionQuantifier(), pos, call.getOperandList().get(0), literalNode); }