com.jporm.sql.dialect.DBFeatures Maven / Gradle / Ivy
/*******************************************************************************
* Copyright 2015 Francesco Cina'
*
* 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.
******************************************************************************/
package com.jporm.sql.dialect;
import java.sql.Statement;
public interface DBFeatures {
/**
* Return true if the DB has autogenerated key features.
*
* @return
*/
boolean isAutogeneratedKeySupport();
/**
* Whether the DB correctly returns the number of updated rows in a
* batchUpdate operation. Databases like Oracle, for example, instead of
* returning the number of updated rows, return the code "-2" indicating
* that the operation was executed successfully; in such a case, there is no
* way of knowing the number of updated rows and this method returns false.
*
* @return
*/
boolean isReturnCountsOnBatchUpdate();
/**
* Return true if the DB has sequence support and the method
* getGeneratedKeys of the {@link Statement} correctly return the sequence
* value generated using a sequence in an insert query.
*
* @return
*/
boolean isSequenceSupport();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy