Package org.jooq

Examples of org.jooq.DSLContext.render()


    public void testRenderSchema() {
        Schema schema = new SchemaImpl("S");
        Table<?> table = new TableImpl<Record>("T", schema);

        DSLContext create0 = DSL.using(SQLDialect.POSTGRES);
        assertEquals("\"S\".\"T\"", create0.render(table));

        DSLContext create1 = DSL.using(SQLDialect.POSTGRES, new Settings().withRenderSchema(false));
        assertEquals("\"T\"", create1.render(table));

        DSLContext create2 = DSL.using(SQLDialect.POSTGRES);
View Full Code Here


        DSLContext create0 = DSL.using(SQLDialect.POSTGRES);
        assertEquals("\"S\".\"T\"", create0.render(table));

        DSLContext create1 = DSL.using(SQLDialect.POSTGRES, new Settings().withRenderSchema(false));
        assertEquals("\"T\"", create1.render(table));

        DSLContext create2 = DSL.using(SQLDialect.POSTGRES);
        create2.configuration().settings().setRenderSchema(false);
        assertEquals("\"T\"", create2.render(table));
    }
View Full Code Here

        DSLContext create1 = DSL.using(SQLDialect.POSTGRES, new Settings().withRenderSchema(false));
        assertEquals("\"T\"", create1.render(table));

        DSLContext create2 = DSL.using(SQLDialect.POSTGRES);
        create2.configuration().settings().setRenderSchema(false);
        assertEquals("\"T\"", create2.render(table));
    }

    @Test
    public void testRenderMapping() {
        DSLContext create1 = DSL.using(SQLDialect.POSTGRES, new Settings().withRenderMapping(mapping()));
View Full Code Here

    }

    @Test
    public void testRenderMapping() {
        DSLContext create1 = DSL.using(SQLDialect.POSTGRES, new Settings().withRenderMapping(mapping()));
        assertEquals("\"TABLEX\"", create1.render(TABLE1));

        DSLContext create2 = DSL.using(SQLDialect.POSTGRES);
        create2.configuration().settings().setRenderMapping(mapping());
        assertEquals("\"TABLEX\"", create2.render(TABLE1));
    }
View Full Code Here

        DSLContext create1 = DSL.using(SQLDialect.POSTGRES, new Settings().withRenderMapping(mapping()));
        assertEquals("\"TABLEX\"", create1.render(TABLE1));

        DSLContext create2 = DSL.using(SQLDialect.POSTGRES);
        create2.configuration().settings().setRenderMapping(mapping());
        assertEquals("\"TABLEX\"", create2.render(TABLE1));
    }

    private RenderMapping mapping() {
        return new RenderMapping().withSchemata(
                   new MappedSchema().withInput("").withTables(
View Full Code Here

        DSLContext lower = DSL.using(MYSQL, new Settings().withRenderKeywordStyle(LOWER));
        DSLContext upper = DSL.using(MYSQL, new Settings().withRenderKeywordStyle(UPPER));

        assertEquals("abc Untouched xx Untouched abc", def.render(f));
        assertEquals("abc Untouched xx Untouched abc", lower.render(f));
        assertEquals("ABC Untouched XX Untouched ABC", upper.render(f));
    }
}
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.