Package com.redspr.redquerybuilder.core.client.expression

Examples of com.redspr.redquerybuilder.core.client.expression.Comparison


                .getTableFilter(ref.getTable());

        TableFilter refTableFilter = session.createTableFilter(ref
                .getRefTable());

        Comparison joinCond = new Comparison(session, Operator.EQUAL,
                new ExpressionColumn(session, null, tableFilter.getAlias(), ref
                        .getColumns()[0].getName()), new ExpressionColumn(
                        session, null, refTableFilter.getAlias(), ref
                                .getRefColumns()[0].getName()));
        tableFilter.addJoin(refTableFilter, false, joinCond);
View Full Code Here


        vp.add(xcondition);
    }

    // XXX scope for testing
    public Comparison addFirstCondition() {
        Comparison c = new Comparison(session);
        addCondition(c);
        return c;
    }
View Full Code Here

public class GwtTestBasics extends AbstractTest {
    @Test
    public void testComparison() throws Exception {
        Parser p = new Parser(getSession());
        Comparison c = (Comparison) p.parseExpression("id = ?");
        ExpressionColumn left = (ExpressionColumn) c.getLeft();
        Parameter param = (Parameter) c.getRight();
    }
View Full Code Here

        assertEquals(1, s.getFilters().size());
        TableFilter tf = s.getFilters().get(0);
        assertTrue(tf != null);
        assertEquals("PERSON", tf.getTable().getName());

        Comparison c = (Comparison) s.getCondition();

        assertEquals("SELECT ID\nFROM PERSON\nWHERE (SEX = ?)", s.getSQL(new ArrayList()));
    }
View Full Code Here

        Parser p = new Parser(sess);

        Prepared prep = p.parseOnly("SELECT id FROM Person x1 WHERE x1.sex IS NULL");

        Select s = (Select) prep;
        Comparison c = (Comparison) s.getCondition();

        // test output
        List outArgs = new ArrayList();
        String outSql = s.getSQL(new ArrayList());
        assertEquals("SELECT ID\nFROM PERSON X1\nWHERE (X1.SEX IS NULL)", outSql);
View Full Code Here

        TableFilter tf = s.getFilters().get(0);
        assertTrue(tf != null);
        assertEquals("PERSON", tf.getTable().getName());
        assertEquals("X1", tf.getAlias());

        Comparison c = (Comparison) s.getCondition();

        // test output
        List outArgs = new ArrayList();
        String outSql = s.getSQL(outArgs);
        assertEquals("SELECT ID\nFROM PERSON X1\nWHERE (X1.SEX = ?)", outSql);
View Full Code Here

        TableFilter tf = s.getFilters().get(0);
        assertTrue(tf != null);
        assertEquals("PERSON", tf.getTable().getName());
        assertEquals("X1", tf.getAlias());

        Comparison c = (Comparison) s.getCondition();

        // test output
        List outArgs = new ArrayList();
        String outSql = s.getSQL(outArgs);
        assertEquals("SELECT ID\nFROM PERSON X1\nWHERE (X1.SEX = ?)", outSql);
View Full Code Here

        CommandBuilder cb = new CommandBuilder(s);
        cb.getSelect().updateTable(
                s.getDatabase().getMainSchema().findTableOrView("PERSON"));
        cb.getSelect().getSQL(new ArrayList());

        Comparison c = new Comparison(s);

        cb.getSelect().addCondition(c);
        cb.fireDirty();

        cb.getSelect().remove(c);
View Full Code Here

        CommandBuilder cb = new CommandBuilder(s);
        cb.getSelect().updateTable(
                s.getDatabase().getMainSchema().findTableOrView("Log"));
        cb.getSelect().getSQL(new ArrayList());

        Comparison c = new Comparison(s);

        cb.getSelect().addCondition(c);
        cb.fireDirty();

        cb.getSelect().remove(c);
View Full Code Here

        // RootPanel.get().add(cb);
        cb.getSelect().updateTable(
                s.getDatabase().getMainSchema().findTableOrView("PERSON"));
        cb.fireDirty();

        Comparison c = new Comparison(s);

        cb.getSelect().addCondition(c);
        cb.fireDirty();

        cb.getSelect().updateTable(
View Full Code Here

TOP

Related Classes of com.redspr.redquerybuilder.core.client.expression.Comparison

Copyright © 2018 www.massapicom. 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.