public static boolean isSelectForUpateNoWaitSupported(Platform platform) { if (platform.isOracle() || platform.isSQLServer()) { return true; } warning("This database does not support NOWAIT."); return false; }
public static boolean isPessimisticWriteLockSupported(DatabasePlatform platform) { if (platform .isSybase()) { // Sybase supports getting Pessimistic Read locks but does not support // getting Perssimistic Write locks warning("This database does not support Pessimistic Write Lock."); return false; } return true; }
public static boolean supportsStoredFunctions(String puName) { DatabasePlatform platform = getDatabaseSession(puName).getPlatform(); // PostgreSQL has some level of support for "stored functions", but output parameters do not // work as of 8.2. // TODO: DB2 should be in this list. if (platform.isOracle() || platform.isMySQL()) { return true; } warning("This database does not support stored function creation."); return false; }
public static boolean supportsStoredProcedures(String puName) { DatabasePlatform platform = getDatabaseSession(puName).getPlatform(); // PostgreSQL has some level of support for "stored functions", but output parameters do not // work as of 8.2. // Sybase supports stored procedures, but has issues with output parameters and transaction mode // (INOUT and chaining). // TODO: DB2 should be in this list. if (platform.isOracle() || platform.isMySQL() || platform.isSQLServer()) { return true; } warning("This database does not support stored procedure creation."); return false; }
public static boolean isSelectForUpateSupported(DatabasePlatform platform) { // DB2, Derby, Symfoware (bug 304903) and Firebird support pessimistic locking only for a // single-table queries. // PostgreSQL supports for update, but not on outerjoins, which the test uses. // H2 supports pessimistic locking, but has table lock issues with multiple connections used in // the tests. if (platform.isFirebird() || platform.isH2() || platform.isHSQL() || platform.isAccess() || platform.isSQLAnywhere() || platform.isDerby() || platform.isPostgreSQL() || platform.isSymfoware()) { warning("This database does not support FOR UPDATE."); return false; } return true; }