Package org.jooq.conf

Examples of org.jooq.conf.Settings


    }

    @Test
    public void testGetSQLWithParamTypeNAMED_OR_INLINEDandStatementTypeSTATIC() {
        Query q =
        DSL.using(SQLDialect.MYSQL, new Settings().withParamType(NAMED_OR_INLINED)
                                                  .withStatementType(STATIC_STATEMENT))
           .select(param("var", 1), val("A"));

        testGetSQL0(q, "select 1, 'A' from dual");
    }
View Full Code Here


    }

    @Test
    public void testGetSQLWithParamTypeINLINED() {
        Query q =
        DSL.using(SQLDialect.MYSQL, new Settings().withParamType(INLINED))
           .select(param("var", 1), val("A"));

        testGetSQL0(q, "select 1, 'A' from dual");
    }
View Full Code Here

    }

    @Test
    public void testGetSQLWithParamTypeINLINEDandStatementTypeSTATIC() {
        Query q =
        DSL.using(SQLDialect.MYSQL, new Settings().withParamType(INLINED)
                                                  .withStatementType(STATIC_STATEMENT))
           .select(param("var", 1), val("A"));

        testGetSQL0(q, "select 1, 'A' from dual");
    }
View Full Code Here

    public void testKeywords() {
        Keyword keyword = DSL.keyword("Abc");
        Field<?> f = DSL.field("{0} Untouched {Xx} Untouched {1}", keyword, keyword);

        DSLContext def = DSL.using(MYSQL);
        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

public class Example_2_2_OptimisticLocking {

    @Test
    public void run() throws SQLException {
        Connection connection = connection();
        DSLContext dsl = DSL.using(connection, new Settings().withExecuteWithOptimisticLocking(true));

        try {
            Tools.title("Applying optimistic locking");

            BookRecord book1 = dsl.selectFrom(BOOK).where(BOOK.ID.eq(1)).fetchOne();
View Full Code Here

        Class.forName("org.postgresql.Driver");
        c = getConnection("jdbc:postgresql:postgres", "postgres", System.getProperty("pw", "test"));
        DSLContext ctx = DSL.using(new DefaultConfiguration()
            .set(new DefaultConnectionProvider(c))
            .set(SQLDialect.POSTGRES)
            .set(new Settings().withExecuteLogging(false)));
       
        return runnable.run(ctx);
      }
      catch (Exception e) {
        e.printStackTrace();
View Full Code Here

*/
public class jOOQSQLServerTestInline extends jOOQSQLServerTest {

    @Override
    protected SQLServerFactory create(Settings settings) {
        settings = (settings != null) ? settings : new Settings();
        settings.withStatementType(StatementType.STATIC_STATEMENT);
        return new SQLServerFactory(getConnection(), settings);
    }
View Full Code Here

    protected final Factory create() {
        String defaultSchema = System.getProperty("org.jooq.settings.defaultSchema", "");
        Boolean renderSchema = Boolean.valueOf(System.getProperty("org.jooq.settings.renderSchema", "true"));

        Settings settings = SettingsTools.defaultSettings()
            .withRenderSchema(renderSchema)
            .withRenderMapping(new RenderMapping()
                .withDefaultSchema(defaultSchema))
            .withExecuteListeners(
                TestStatisticsListener.class.getName(),
View Full Code Here

        T_639NumbersTableRecord,
        T_785Record> {

  @Override
    protected Factory create(Settings settings) {
      settings = (settings != null) ? settings : new Settings();
        RenderMapping mapping = SettingsTools.getRenderMapping(settings);
        List<MappedSchema> schemata = mapping.getSchemata();

        if (schemata.size() == 0) {
            schemata.add(new MappedSchema()
View Full Code Here

        return "2";
    }

    @Override
    protected MySQLFactory create(Settings settings) {
        settings = (settings != null) ? settings : new Settings();
        RenderMapping mapping = SettingsTools.getRenderMapping(settings);
        List<MappedSchema> schemata = mapping.getSchemata();

        if (schemata.size() == 0) {
            schemata.add(new MappedSchema()
View Full Code Here

TOP

Related Classes of org.jooq.conf.Settings

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.