Package org.jooq

Examples of org.jooq.RenderContext.render()


        RenderContext r_refP = r_refP();
        RenderContext r_ref = r_ref();

        assertEquals("'abc''def'", r_refI.render(i1));
        assertEquals("'abc''def'", r_refP.render(i1));
        assertEquals("'abc''def'", r_ref.render(i1));

        assertEquals("123", r_refI.render(i2));
        assertEquals("123", r_refP.render(i2));
        assertEquals("123", r_ref.render(i2));
View Full Code Here


        assertEquals("'abc''def'", r_refP.render(i1));
        assertEquals("'abc''def'", r_ref.render(i1));

        assertEquals("123", r_refI.render(i2));
        assertEquals("123", r_refP.render(i2));
        assertEquals("123", r_ref.render(i2));

        assertEquals("123.0", r_refI.render(i3));
        assertEquals("123.0", r_refP.render(i3));
        assertEquals("123.0", r_ref.render(i3));
View Full Code Here

        assertEquals("123", r_refP.render(i2));
        assertEquals("123", r_ref.render(i2));

        assertEquals("123.0", r_refI.render(i3));
        assertEquals("123.0", r_refP.render(i3));
        assertEquals("123.0", r_ref.render(i3));

        assertEquals("{d '1981-07-10'}", r_refI.render(i4));
        assertEquals("{d '1981-07-10'}", r_refP.render(i4));
        assertEquals("{d '1981-07-10'}", r_ref.render(i4));
    }
View Full Code Here

        assertEquals("123.0", r_refP.render(i3));
        assertEquals("123.0", r_ref.render(i3));

        assertEquals("{d '1981-07-10'}", r_refI.render(i4));
        assertEquals("{d '1981-07-10'}", r_refP.render(i4));
        assertEquals("{d '1981-07-10'}", r_ref.render(i4));
    }

    @Test
    public void testPlaceholders1() throws Exception {
View Full Code Here

        r_refP.configuration().settings().setRenderNameStyle(RenderNameStyle.AS_IS);
        r_ref.configuration().settings().setRenderNameStyle(RenderNameStyle.AS_IS);

        assertEquals("select 1 from TABLE1 where TABLE1.ID1 = 2", r_refI.render(q));
        assertEquals("select :1 from TABLE1 where TABLE1.ID1 = :2", r_refP.render(q));
        assertEquals("select ? from TABLE1 where TABLE1.ID1 = ?", r_ref.render(q));

        r_refI.configuration().settings().setRenderNameStyle(RenderNameStyle.LOWER);
        r_refP.configuration().settings().setRenderNameStyle(RenderNameStyle.LOWER);
        r_ref.configuration().settings().setRenderNameStyle(RenderNameStyle.LOWER);
View Full Code Here

        r_refP.configuration().settings().setRenderNameStyle(RenderNameStyle.LOWER);
        r_ref.configuration().settings().setRenderNameStyle(RenderNameStyle.LOWER);

        assertEquals("select 1 from table1 where table1.id1 = 2", r_refI.render(q));
        assertEquals("select :1 from table1 where table1.id1 = :2", r_refP.render(q));
        assertEquals("select ? from table1 where table1.id1 = ?", r_ref.render(q));

        r_refI.configuration().settings().setRenderNameStyle(RenderNameStyle.UPPER);
        r_refP.configuration().settings().setRenderNameStyle(RenderNameStyle.UPPER);
        r_ref.configuration().settings().setRenderNameStyle(RenderNameStyle.UPPER);
View Full Code Here

        r_refP.configuration().settings().setRenderNameStyle(RenderNameStyle.UPPER);
        r_ref.configuration().settings().setRenderNameStyle(RenderNameStyle.UPPER);

        assertEquals("select 1 from TABLE1 where TABLE1.ID1 = 2", r_refI.render(q));
        assertEquals("select :1 from TABLE1 where TABLE1.ID1 = :2", r_refP.render(q));
        assertEquals("select ? from TABLE1 where TABLE1.ID1 = ?", r_ref.render(q));

        r_refI.configuration().settings().setRenderNameStyle(RenderNameStyle.QUOTED);
        r_refP.configuration().settings().setRenderNameStyle(RenderNameStyle.QUOTED);
        r_ref.configuration().settings().setRenderNameStyle(RenderNameStyle.QUOTED);
View Full Code Here

        r_refP.configuration().settings().setRenderNameStyle(RenderNameStyle.QUOTED);
        r_ref.configuration().settings().setRenderNameStyle(RenderNameStyle.QUOTED);

        assertEquals("select 1 from `TABLE1` where `TABLE1`.`ID1` = 2", r_refI.render(q));
        assertEquals("select :1 from `TABLE1` where `TABLE1`.`ID1` = :2", r_refP.render(q));
        assertEquals("select ? from `TABLE1` where `TABLE1`.`ID1` = ?", r_ref.render(q));
    }

    @Test
    public void testRenderNameStyleWithSpecialCharacters() {
        Query q = create.select(val(1).as("Aa `Bb` Cc")).from(TABLE1.as("Xx ''Yy''\\ Zz"));
View Full Code Here

        Query q = create.select(val(1).as("Aa `Bb` Cc")).from(TABLE1.as("Xx ''Yy''\\ Zz"));

        RenderContext r_refI = r_refI();

        r_refI.configuration().settings().setRenderNameStyle(RenderNameStyle.AS_IS);
        assertEquals("select 1 as Aa `Bb` Cc from TABLE1 as Xx ''Yy''\\ Zz", r_refI.render(q));

        r_refI.configuration().settings().setRenderNameStyle(RenderNameStyle.LOWER);
        assertEquals("select 1 as aa `bb` cc from table1 as xx ''yy''\\ zz", r_refI.render(q));

        r_refI.configuration().settings().setRenderNameStyle(RenderNameStyle.UPPER);
View Full Code Here

        r_refI.configuration().settings().setRenderNameStyle(RenderNameStyle.AS_IS);
        assertEquals("select 1 as Aa `Bb` Cc from TABLE1 as Xx ''Yy''\\ Zz", r_refI.render(q));

        r_refI.configuration().settings().setRenderNameStyle(RenderNameStyle.LOWER);
        assertEquals("select 1 as aa `bb` cc from table1 as xx ''yy''\\ zz", r_refI.render(q));

        r_refI.configuration().settings().setRenderNameStyle(RenderNameStyle.UPPER);
        assertEquals("select 1 as AA `BB` CC from TABLE1 as XX ''YY''\\ ZZ", r_refI.render(q));

        r_refI.configuration().settings().setRenderNameStyle(RenderNameStyle.QUOTED);
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.