Examples of statement()


Examples of org.jooq.ExecuteContext.statement()

        ExecuteContext ctx = new DefaultExecuteContext(configuration, queries);
        ExecuteListener listener = new ExecuteListeners(ctx);
        Connection connection = ctx.connection();

        try {
            ctx.statement(new SettingsEnabledPreparedStatement(connection));

            String[] batchSQL = ctx.batchSQL();
            for (int i = 0; i < queries.length; i++) {
                listener.renderStart(ctx);
                batchSQL[i] = DSL.using(configuration).renderInlined(queries[i]);
View Full Code Here

Examples of org.jooq.ExecuteContext.statement()

            }

            for (String sql : batchSQL) {
                ctx.sql(sql);
                listener.prepareStart(ctx);
                ctx.statement().addBatch(sql);
                listener.prepareEnd(ctx);
                ctx.sql(null);
            }

            listener.executeStart(ctx);
View Full Code Here

Examples of org.jooq.ExecuteContext.statement()

                ctx.sql(null);
            }

            listener.executeStart(ctx);

            int[] result = ctx.statement().executeBatch();
            int[] batchRows = ctx.batchRows();
            for (int i = 0; i < batchRows.length && i < result.length; i++)
                batchRows[i] = result[i];

            listener.executeEnd(ctx);
View Full Code Here

Examples of org.jooq.ExecuteContext.statement()

            listener.renderStart(ctx);
            ctx.sql(create(configuration).render(this));
            listener.renderEnd(ctx);

            listener.prepareStart(ctx);
            ctx.statement(connection.prepareCall(ctx.sql()));
            listener.prepareEnd(ctx);

            listener.bindStart(ctx);
            create(configuration).bind(this, ctx.statement());
            registerOutParameters(configuration, (CallableStatement) ctx.statement());
View Full Code Here

Examples of org.jooq.ExecuteContext.statement()

            listener.prepareStart(ctx);
            ctx.statement(connection.prepareCall(ctx.sql()));
            listener.prepareEnd(ctx);

            listener.bindStart(ctx);
            create(configuration).bind(this, ctx.statement());
            registerOutParameters(configuration, (CallableStatement) ctx.statement());
            listener.bindEnd(ctx);

            // Postgres requires two separate queries running in the same
            // transaction to be executed when fetching refcursor types
View Full Code Here

Examples of org.jooq.ExecuteContext.statement()

            ctx.statement(connection.prepareCall(ctx.sql()));
            listener.prepareEnd(ctx);

            listener.bindStart(ctx);
            create(configuration).bind(this, ctx.statement());
            registerOutParameters(configuration, (CallableStatement) ctx.statement());
            listener.bindEnd(ctx);

            // Postgres requires two separate queries running in the same
            // transaction to be executed when fetching refcursor types
            boolean autoCommit = connection.getAutoCommit();
View Full Code Here

Examples of org.jooq.ExecuteContext.statement()

            if (autoCommit && configuration.getDialect() == SQLDialect.POSTGRES) {
                connection.setAutoCommit(false);
            }

            listener.executeStart(ctx);
            ctx.statement().execute();
            listener.executeEnd(ctx);

            if (autoCommit && configuration.getDialect() == SQLDialect.POSTGRES) {
                connection.setAutoCommit(autoCommit);
            }
View Full Code Here

Examples of org.jooq.ExecuteContext.statement()

                listener.prepareEnd(ctx);

                // [#1145] Bind variables only for true prepared statements
                if (executePreparedStatements(getConfiguration().getSettings())) {
                    listener.bindStart(ctx);
                    create(configuration).bind(this, ctx.statement());
                    listener.bindEnd(ctx);
                }

                result = execute(ctx, listener);
                return result;
View Full Code Here

Examples of org.jooq.ExecuteContext.statement()

            listener.renderStart(ctx);
            ctx.sql(create.render(query));
            listener.renderEnd(ctx);

            listener.prepareStart(ctx);
            ctx.statement(connection.prepareStatement(ctx.sql()));
            listener.prepareEnd(ctx);

            for (Object[] bindValues : allBindValues) {
                listener.bindStart(ctx);
                new DefaultBindContext(create, ctx.statement()).bindValues(bindValues);
View Full Code Here

Examples of org.jooq.ExecuteContext.statement()

            ctx.statement(connection.prepareStatement(ctx.sql()));
            listener.prepareEnd(ctx);

            for (Object[] bindValues : allBindValues) {
                listener.bindStart(ctx);
                new DefaultBindContext(create, ctx.statement()).bindValues(bindValues);
                listener.bindEnd(ctx);

                ctx.statement().addBatch();
            }
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.