Package com.anylogic.engine.database
- java.lang.Object
- com.anylogic.engine.database.UtilitiesDatabaseBasic
@AnyLogicInternalAPI public class UtilitiesDatabaseBasic extends Object
This class is internal and shouldn't be called by user.
it may be removed/renamed in future.
it may be removed/renamed in future.
- Author:
- AnyLogic North America, LLC https://anylogic.com
Modifier and Type | Method | Description |
---|---|---|
static long | convertToRelativeTime | |
static void | copyDatabaseTable | |
static void | copyDatabaseTable | |
static void | copyDatabaseTables | |
static void | exportTables | |
static String | getIdentifierQuoteString | |
static LocalDateTime | getStartOfDay | |
static boolean | isInt |
Determines whether provided double value is integer or not.
|
static boolean | isMariaDb | |
static boolean | isMicrosoftAccess | |
static boolean | isOracleDB | |
static String | trimTableName |
@AnyLogicInternalAPI public static String getIdentifierQuoteString(Connection connection)
@AnyLogicInternalAPI public static void exportTables(ProgressConsumer monitor, Connection sourceDatabase, Connection targetDatabase, Collection<String> sqlStatements, List<String> sourceNames)
@AnyLogicInternalAPI public static String trimTableName(String s)
@AnyLogicInternalAPI public static void copyDatabaseTables(ProgressConsumer monitor, Connection sourceConnection, Connection targetConnection, List<String> sourceTableNames, List<String> targetTableNames, boolean clearTargetTable, boolean autoCommit)
@AnyLogicInternalAPI public static void copyDatabaseTable(Connection sourceConnection, Connection targetConnection, String sourceTableName, String targetTableName)
@AnyLogicInternalAPI public static void copyDatabaseTable(Connection sourceConnection, Connection targetConnection, String sourceTableName, String targetTableName, boolean clearTargetTable, boolean autoCommit) throws SQLException
- Throws:
SQLException
@AnyLogicInternalAPI public static boolean isInt(double value)
Determines whether provided double value is integer or not.
The method is implemented for importing Excel data which can already have rounding errors
because of chosen cell type (e.g. 'General' for numeric data instead of 'Number'). That is why
no comparison with epsilon is used.
- Parameters:
value
- floating point-number- Returns:
- true if value is integer, false if double
@AnyLogicInternalAPI public static LocalDateTime getStartOfDay(Timestamp t)
@AnyLogicInternalAPI public static long convertToRelativeTime(Timestamp t, LocalDateTime beginPoint, long repeatTime)
@AnyLogicInternalAPI public static boolean isMicrosoftAccess(Connection connection) throws SQLException
- Throws:
SQLException
@AnyLogicInternalAPI public static boolean isOracleDB(Connection connection) throws SQLException
- Throws:
SQLException
@AnyLogicInternalAPI public static boolean isMariaDb(Connection connection) throws SQLException
- Throws:
SQLException