Package org.jooq.impl

Examples of org.jooq.impl.DefaultConfiguration


    @Override
    public String version(SchemaDefinition schema) {
        return "" +
            DSL.using(
                new DefaultConfiguration()
                    .set(connection)
                    .set(new Settings().withStatementType(STATIC_STATEMENT))
            ).fetchValue(
                // [#2906] TODO Plain SQL statements do not yet support named parameters
                sql.replace(":schema_name", "?"), param("schema_name", schema.getInputName())
View Full Code Here


        }

        void run(Transactional tx) {
            // Initialise some jOOQ objects
            final DefaultConnectionProvider c = new DefaultConnectionProvider(connection);
            final Configuration configuration = new DefaultConfiguration().set(c).set(SQLDialect.H2);

            try {
                // Run the transaction and pass a jOOQ
                // DSLContext object to it
                tx.run(DSL.using(configuration));
View Full Code Here

    }

    private static final Result<?> result(Record data) {
        Configuration configuration = data instanceof AttachableInternal
            ? ((AttachableInternal) data).configuration()
            : new DefaultConfiguration();

        Result<Record> result = using(configuration).newResult(data.fields());
        result.add(data);

        return result;
View Full Code Here

  @Bean
  public org.jooq.Configuration jooqConfig(ConnectionProvider connectionProvider,
      TransactionProvider transactionProvider, ExecuteListenerProvider executeListenerProvider) {

    return new DefaultConfiguration() //
        .derive(connectionProvider) //
        .derive(transactionProvider) //
        .derive(executeListenerProvider) //
        .derive(SQLDialect.H2);
  }
View Full Code Here

      Connection c = null;
     
    try {
        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);
View Full Code Here

    final BookDao books;

    @Inject
    public Service(DataSource ds) {
        this.ds = ds;
        this.configuration = new DefaultConfiguration()
            .set(new SpringConnectionProvider(ds))
            .set(SQLDialect.H2)
            .set(new DefaultExecuteListenerProvider(new ExceptionTranslator(ds)));

        this.authors = new AuthorDao(configuration);
View Full Code Here

                System.out.println("Execution time : " + ((System.nanoTime() - time) / 1000 / 1000.0) + "ms. Query : " + ctx.sql());
            }
        };

        DSL.using(new DefaultConfiguration()
               .set(SQLDialect.H2)
               .set(new DefaultConnectionProvider(connection()))
               .set(new DefaultExecuteListenerProvider(listener))
           )
           .select(AUTHOR.ID)
View Full Code Here

TOP

Related Classes of org.jooq.impl.DefaultConfiguration

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.