Package org.jooq

Examples of org.jooq.Case


        assertEquals(1, j);
    }

    @Test
    public void testCaseValueFunction() throws Exception {
        Case decode = decode();
        CaseValueStep<Integer> value = decode.value(FIELD_ID1);
        CaseWhenStep<Integer, String> c = value.when(1, "one");

        assertEquals("case \"TABLE1\".\"ID1\" when 1 then 'one' end", r_refI().render(c));
        assertEquals("case \"TABLE1\".\"ID1\" when ? then ? end", r_ref().render(c));
        assertEquals("case \"TABLE1\".\"ID1\" when 1 then 'one' end", r_decI().render(c));
View Full Code Here


        context.assertIsSatisfied();
    }

    @Test
    public void testCaseConditionFunction() throws Exception {
        Case decode = decode();
        CaseConditionStep<String> c = decode.when(FIELD_ID1.equal(1), "one");

        assertEquals("case when \"TABLE1\".\"ID1\" = 1 then 'one' end", r_refI().render(c));
        assertEquals("case when \"TABLE1\".\"ID1\" = ? then ? end", r_ref().render(c));
        assertEquals("case when \"TABLE1\".\"ID1\" = 1 then 'one' end", r_decI().render(c));
        assertEquals("case when \"TABLE1\".\"ID1\" = ? then ? end", r_dec().render(c));
View Full Code Here

TOP

Related Classes of org.jooq.Case

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.