org.jooq.BatchBindStep Maven / Gradle / Ivy
/*
* Copyright (c) 2009-2016, Data Geekery GmbH (http://www.datageekery.com)
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Other licenses:
* -----------------------------------------------------------------------------
* Commercial licenses for this work are available. These replace the above
* ASL 2.0 and offer limited warranties, support, maintenance, and commercial
* database integrations.
*
* For more information, please visit: http://www.jooq.org/licenses
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package org.jooq;
import java.sql.Statement;
import java.util.Map;
/**
* This type is used for the {@link Batch}'s DSL API.
*
* Use it to add bind values to a single operation in the batch statement.
*
* @author Lukas Eder
* @see Batch
* @see Statement#executeBatch()
*/
public interface BatchBindStep extends Batch {
/**
* Set indexed bind values onto the batch statement.
*
* The argument array of bindValues
will be set onto the
* indexed bind values of the batch statement:
*
* :1
-> bindValues[0]
* :2
-> bindValues[1]
* - ...
* :N
-> bindValues[N - 1]
*
*
* "Unmatched" bind values will be left unmodified:
*
* :N+1
-> unmodified
* :N+2
-> unmodified
*
*/
BatchBindStep bind(Object... bindValues);
/**
* Set several indexed bind values onto the batch statement.
*
* This is the same as calling {@link #bind(Object...)} several times.
*/
BatchBindStep bind(Object[]... bindValues);
/**
* Set named bind values onto the batch statement.
*
* The argument map of namedBindValues
will be set onto the
* named bind values of the batch statement:
*
* :name1
-> bindValues.get("name1")
* :name2
-> bindValues.get("name2")
* - ...
* :nameN
-> bindValues.get("nameN")
*
*
* "Unmatched" bind values will be left unmodified:
*
* :nameN+1
-> unmodified
* :nameN+2
-> unmodified
*
*/
BatchBindStep bind(Map namedBindValues);
/**
* Set several named bind values onto the batch statement.
*
* This is the same as calling {@link #bind(Map...)} several times.
*/
BatchBindStep bind(Map... namedBindValues);
}