Examples of parseExpression()


Examples of org.h2.command.Parser.parseExpression()

    private Sequence getSequence(Session session, Value v0, Value v1) {
        String schemaName, sequenceName;
        if (v1 == null) {
            Parser p = new Parser(session);
            String sql = v0.getString();
            Expression expr = p.parseExpression(sql);
            if (expr instanceof ExpressionColumn) {
                ExpressionColumn seq = (ExpressionColumn) expr;
                schemaName = seq.getOriginalTableAliasName();
                if (schemaName == null) {
                    schemaName = session.getCurrentSchemaName();
View Full Code Here

Examples of org.h2.command.Parser.parseExpression()

        ArrayList<String> columns = New.arrayList();
        ArrayList<String> data = New.arrayList();
        JdbcConnection c = (JdbcConnection) conn;
        Session session = (Session) c.getSession();
        Parser p = new Parser(session);
        Expression expr = p.parseExpression(key);
        addColumnData(columns, data, expr);
        Object[] col = new Object[columns.size()];
        columns.toArray(col);
        Object[] dat = new Object[columns.size()];
        data.toArray(dat);
View Full Code Here

Examples of org.h2.command.Parser.parseExpression()

                    int idx = q.indexOf(" WHERE ");
                    JdbcConnection c = (JdbcConnection) conn;
                    Session session = (Session) c.getSession();
                    Parser p = new Parser(session);
                    String tab = q.substring(0, idx);
                    ExpressionColumn expr = (ExpressionColumn) p.parseExpression(tab);
                    String schemaName = expr.getOriginalTableAliasName();
                    String tableName = expr.getColumnName();
                    q = q.substring(idx + " WHERE ".length());
                    Object[][] columnData = parseKey(conn, q);
                    result.addRow(
View Full Code Here

Examples of org.lealone.command.Parser.parseExpression()

            String oldName = name;
            name = asColumnName;
            sql = checkConstraint.getSQL();
            name = oldName;
        }
        Expression expr = parser.parseExpression(sql);
        return expr;
    }

    String getDefaultSQL() {
        return defaultExpression == null ? null : defaultExpression.getSQL();
View Full Code Here

Examples of org.nfunk.jep.JEP.parseExpression()

        double x = 0.0;
        JEP jep = new JEP();
        jep.addStandardConstants();
        jep.addStandardFunctions();
       
        jep.parseExpression(function);
       
        String[] vars = jep.getVariables();
        String var = "x";
           
        if(vars.length > 1)
View Full Code Here

Examples of org.springframework.binding.expression.ExpressionParser.parseExpression()

  }

  public void testStartWithMapper() {
    DefaultMapper attributeMapper = new DefaultMapper();
    ExpressionParser parser = DefaultExpressionParserFactory.getExpressionParser();
    Expression x = parser.parseExpression("attr", new FluentParserContext().evaluate(AttributeMap.class));
    Expression y = parser.parseExpression("flowScope.attr", new FluentParserContext()
        .evaluate(RequestContext.class));
    attributeMapper.addMapping(new DefaultMapping(x, y));
    flow.setInputMapper(attributeMapper);
    MockRequestControlContext context = new MockRequestControlContext(flow);
View Full Code Here

Examples of org.springframework.expression.ExpressionParser.parseExpression()

        Map<String, Object> modelEntry = (Map<String, Object>) entry.getValue();
        String name = entry.getKey();
        String expr = (String) (modelEntry.containsKey("jread") ? modelEntry.get("jread") : modelEntry
            .get("jbind"));
        if (expr != null) {
          Object value = parser.parseExpression(expr).getValue(val);
          m.put(name, value);
        }
      }
      d.add(m);
    }
View Full Code Here

Examples of org.springframework.expression.ExpressionParser.parseExpression()

    for (Map.Entry<String, Object> entry : model.entrySet()) {
      Map<String, Object> modelEntry = (Map<String, Object>) entry.getValue();
      String name = entry.getKey();
      String expr = (String) (modelEntry.containsKey("jread") ? modelEntry.get("jread") : modelEntry.get("jbind"));
      if (expr != null) {
        Object value = parser.parseExpression(expr).getValue(data);
        Map<String, Object> m = new HashMap<String, Object>();
        m.put("id", name);
        m.put("value", value);
        d.add(m);
      }
View Full Code Here

Examples of org.springframework.expression.ExpressionParser.parseExpression()

    StandardEvaluationContext context = new StandardEvaluationContext();
    context.setRootObject(new Object());
    context.addMethodResolver(new ConditionEvalMethodResolver());
    ExpressionParser parser = new SpelExpressionParser();

    Expression exp = parser.parseExpression("test('test') or paet(true)");
    System.out.println(exp.getValue(context));

  }

  @Test
View Full Code Here

Examples of org.springframework.expression.ExpressionParser.parseExpression()

  @Test
  public void test1() {
    System.out.println(new Date().toString());
    ExpressionParser parser = new SpelExpressionParser();
   
    Expression exp = parser.parseExpression("date");
    TestBean b = new TestBean();
    exp.setValue(b, "Sat Nov 20 10:52:05 CET 2010");

    System.out.println(b.getInn().getVal());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.