클래스 FBManager
은 데이터베이스 생성 (또는 삭제)을위한 것으로 데이터베이스 생성을위한 페이지 크기입니다.
다음 방법은 FirebirdDatabaseMetaData
인터페이스에서 사용할 수 있습니다
/**
* Get the major version of the ODS (On-Disk Structure) of the database.
*
* @return The major version number of the database itself
* @exception SQLException if a database access error occurs
*/
int getOdsMajorVersion() throws SQLException;
/**
* Get the minor version of the ODS (On-Disk Structure) of the database.
*
* @return The minor version number of the database itself
* @exception SQLException if a database access error occurs
*/
int getOdsMinorVersion() throws SQLException;
/**
* Get the dialect of the database.
*
* @return The dialect of the database
* @throws SQLException if a database access error occurs
* @see #getConnectionDialect()
*/
int getDatabaseDialect() throws SQLException;
/**
* Get the dialect of the connection.
* <p>
* The connection dialect may be different from the database dialect.
* </p>
*
* @return The dialect of the connection
* @throws SQLException if a database access error occurs
* @see #getDatabaseDialect()
*/
int getConnectionDialect() throws SQLException;
는 데이터베이스의 메타 데이터 개체 랩을 해제 할 필요가 이러한 액세스하려면 : 지금까지 내가 기억 수
Connection connection = ...
FirebirdDatabaseMetaData fbmd = connection.getMetaData().unwrap(FirebirdDatabaseMetaData.class);
int odsMajorVersion = fbmd.getOdsMajorVersion();
// etc
를, 페이지 크기 아무데도 노출되지 않습니다. 수정 요청을 http://tracker.firebirdsql.org/browse/JDBC
으로 제출하십시오. 내부 구성을 실제로 사용하고 싶다면 항상 새로운 내부 API를 사용할 수 있지만 불안정한 것으로 간주되어야하며 언제든지 변경 될 수 있습니다 (액세스 할 수 없거나 변경 될 수 있음). 모듈 지원을 어떻게 구현할 것인가에 따라 차후 버전에서 Java 9에서 액세스하기가 더 어렵습니다.
경고 : 나는 컴파일 또는 테스트하지 않고이 입력 :
Connection connection = ...
FbDatabase db = connection.unwrap(FirebirdConnection.class).getFbDatabase();
byte[] info = db.getDatabaseInfo(new byte[] { ISCConstants.isc_info_page_size }, 20);
if (info[0] == ISCConstants.isc_info_page_size) {
int valueLength = VaxEncoding.iscVaxInteger2(info, 1);
int pageSize = VaxEncoding.iscVaxInteger(info, 3, valueLength);
// ...
}
또는 대안을
/**
* Request database info.
*
* @param requestItems
* Array of info items to request
* @param bufferLength
* Response buffer length to use
* @param infoProcessor
* Implementation of {@link InfoProcessor} to transform
* the info response
* @return Transformed info response of type T
* @throws SQLException
* For errors retrieving or transforming the response.
*/
<T> T getDatabaseInfo(byte[] requestItems, int bufferLength, InfoProcessor<T> infoProcessor) throws SQLException;
이 FBStatisticsManager
면책 조항에 직장에서 예를 참조 그 형제를 사용 : 나는 Jaybird을 유지한다.