Class OracleUtilities
- java.lang.Object
-
- jetbrains.buildServer.serverSide.db.oracle.OracleUtilities
-
public final class OracleUtilities extends Object
Utilities specific to Oracle.
- Since:
- 2017.1.3
- Author:
- Andrey Shcheglov <mailto:andrey.shcheglov@jetbrains.com>
-
-
Field Summary
Fields Modifier and Type Field Description static String
SQL_HINT_APPEND
SQL hint to enable the direct-pathINSERT
mode when using theINSERT
with sub-query syntax.static String
SQL_HINT_APPEND_VALUES
SQL hint to enable the direct-pathINSERT
mode.static String
USE_DIRECT_PATH_INSERT_PROPERTY
The name of the internal property holding the boolean flag which enables the direct-pathINSERT
mode.static String
USE_INSERT_ALL_SQL_SYNTAX
The name of the internal property used to select theINSERT ALL
SQL syntax (slower) instead of the traditionalINSERT
with sub-query, which is the default.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isDirectPathInsertEnabled()
Returns whether direct-pathINSERT
is globally enabled (the default isfalse
).static QueryWithMetaData
newMultiRowInsertSql(String tableName, List<TableFieldDef> fields, int bulkRows, boolean directPathInsertEnabled)
Builds a new multi-rowINSERT
SQL.
-
-
-
Field Detail
-
USE_DIRECT_PATH_INSERT_PROPERTY
@NotNull public static final String USE_DIRECT_PATH_INSERT_PROPERTY
The name of the internal property holding the boolean flag which enables the direct-path
INSERT
mode.- See Also:
- TW-50799, Constant Field Values
-
USE_INSERT_ALL_SQL_SYNTAX
@NotNull public static final String USE_INSERT_ALL_SQL_SYNTAX
The name of the internal property used to select the
INSERT ALL
SQL syntax (slower) instead of the traditionalINSERT
with sub-query, which is the default.- See Also:
- Constant Field Values
-
SQL_HINT_APPEND
@NotNull public static final String SQL_HINT_APPEND
SQL hint to enable the direct-path
INSERT
mode when using theINSERT
with sub-query syntax. ForINSERT ... INTO ... VALUES (...)
syntax,SQL_HINT_APPEND_VALUES
should be used instead.- See Also:
SQL_HINT_APPEND_VALUES
, Constant Field Values
-
SQL_HINT_APPEND_VALUES
@NotNull public static final String SQL_HINT_APPEND_VALUES
SQL hint to enable the direct-path
INSERT
mode.- See Also:
SQL_HINT_APPEND
, Constant Field Values
-
-
Method Detail
-
isDirectPathInsertEnabled
public static boolean isDirectPathInsertEnabled()
Returns whether direct-path
INSERT
is globally enabled (the default isfalse
).- Returns:
- whether direct-path
INSERT
is globally enabled. - See Also:
QueryWithMetaData.isDirectPathInsert()
, Direct-Load INSERT
-
newMultiRowInsertSql
@NotNull public static QueryWithMetaData newMultiRowInsertSql(@NotNull String tableName, @NotNull List<TableFieldDef> fields, @Nonnegative int bulkRows, boolean directPathInsertEnabled)
Builds a new multi-row
INSERT
SQL.- Parameters:
tableName
- the name of the table.fields
- the fields of the table which will be affected by the query.bulkRows
- the number of rows being inserted.directPathInsertEnabled
- whether direct-pathINSERT
should be enabled for the query.- Returns:
- the SQL query built.
-
-