java.lang.Object
org.umlg.sqlg.sql.dialect.BaseSqlDialect
org.umlg.sqlg.dialect.impl.H2Dialect
- All Implemented Interfaces:
SqlBulkDialect
,SqlDialect
,SqlSchemaChangeDialect
- Since:
- 1.3.0
- Author:
- Lukas Krejci
-
Field Summary
Fields inherited from class org.umlg.sqlg.sql.dialect.BaseSqlDialect
logger
Fields inherited from interface org.umlg.sqlg.sql.dialect.SqlDialect
INDEX_POSTFIX
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddDbVersionToGraph
(DatabaseMetaData metadata) void
alterSequenceCacheSize
(SqlgGraph sqlgGraph, SchemaTable schemaTable, String sequence, int batchSize) checkConstraintName
(SqlgGraph sqlgGraph, String schema, String table, String column, String constraint) convertArray
(PropertyType propertyType, Array array) createSchemaStatement
(String schemaName) long
currSequenceVal
(SqlgGraph sqlgGraph, SchemaTable schemaTable, String prefix) existIndexQuery
(SchemaTable schemaTable, String prefix, String indexName) getArrayDriverType
(PropertyType arrayType) <T> T
void
boolean
isH2()
boolean
isSystemIndex
(String indexName) boolean
isTimestampz
(String typeName) void
lockTable
(SqlgGraph sqlgGraph, SchemaTable schemaTable, String prefix) boolean
long
nextSequenceVal
(SqlgGraph sqlgGraph, SchemaTable schemaTable, String prefix) int[]
propertyTypeToJavaSqlType
(PropertyType propertyType) String[]
propertyTypeToSqlDefinition
(PropertyType propertyType) void
putJsonMetaObject
(com.fasterxml.jackson.databind.ObjectMapper mapper, com.fasterxml.jackson.databind.node.ArrayNode metaNodeArray, String columnName, int sqlType, Object o) void
putJsonObject
(com.fasterxml.jackson.databind.node.ObjectNode obj, String columnName, int sqlType, Object o) sequenceName
(SqlgGraph sqlgGraph, SchemaTable outSchemaTable, String prefix) void
setArray
(PreparedStatement statement, int index, PropertyType type, Object[] values) void
setGeographyPoint
(PreparedStatement preparedStatement, int parameterStartIndex, Object point) void
setLineString
(PreparedStatement preparedStatement, int parameterStartIndex, Object lineString) void
setPoint
(PreparedStatement preparedStatement, int parameterStartIndex, Object point) void
setPolygon
(PreparedStatement preparedStatement, int parameterStartIndex, Object point) sqlArrayTypeNameToPropertyType
(String typeName, SqlgGraph sqlgGraph, String schema, String table, String columnName, ListIterator<org.apache.commons.lang3.tuple.Triple<String, Integer, String>> metaDataIter) All this is because H2 does not return the TYPE_NAME for column meta data.sqlToTurnOffReferentialConstraintCheck
(String tableName) sqlToTurnOnReferentialConstraintCheck
(String tableName) sqlTypeToPropertyType
(SqlgGraph sqlgGraph, String schema, String table, String column, int sqlType, String typeName, ListIterator<org.apache.commons.lang3.tuple.Triple<String, Integer, String>> metaDataIter) boolean
boolean
boolean
boolean
boolean
boolean
boolean
supportsType
(PropertyType propertyType) toSelectString
(boolean partOfDuplicateQuery, ColumnList.Column column, String alias) void
validateProperty
(Object key, Object value) valueToValuesString
(PropertyType propertyType, Object value) Methods inherited from class org.umlg.sqlg.sql.dialect.BaseSqlDialect
escapeQuotes, flushEdgeCache, flushEdgePropertyCache, flushRemovedEdges, flushRemovedVertices, flushVertexCache, flushVertexPropertyCache, getEdgeTables, getIndexInfo, getPrimaryKeys, getSchemaNames, getTableColumns, getVertexTables, handleOther, setJson, sqlInParameterLimit, validateColumnName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.umlg.sqlg.sql.dialect.SqlBulkDialect
bulkAddEdges, constructCompleteCopyCommandSqlEdge, constructCompleteCopyCommandSqlVertex, constructCompleteCopyCommandSqlVertex, constructCompleteCopyCommandTemporarySqlVertex, getBatchNull, streamSql, temporaryTableCopyCommandSqlVertex, writeStreamingEdge, writeStreamingVertex, writeTemporaryStreamingVertex
Methods inherited from interface org.umlg.sqlg.sql.dialect.SqlDialect
addColumnStatement, addNotNullConstraint, addPartitionSchemaAbstractLabelColumns, alterForeignKeyToDeferrable, assertTableName, canUserCreateSchemas, columnsToIgnore, createTableStatement, createTemporaryTableStatement, drop, drop, drop, dropIndex, dropSchemaStatement, dropWithForeignKey, extractIndices, getArrayContainsQueryText, getArrayOverlapsQueryText, getAutoIncrement, getBlocked, getConnectionBackendPid, getDefaultFetchSize, getFullTextQueryText, getMaximumColumnNameLength, getMaximumIndexNameLength, getMaximumSchemaNameLength, getMaximumTableNameLength, getPartitions, getPrimaryKeyStartValue, getRangeClause, getShardCount, getSkipClause, hasContainerKeyToColumn, indexName, indexName, isHsqldb, isIndexPartOfCreateTable, isMariaDb, isMssqlServer, isMysql, isPostgresql, maybeWrapInQoutes, needForeignKeyIndex, needsSchemaCreationPrecommit, needsSemicolon, needsTemporaryTablePrefix, needsTemporaryTableSchema, needsTimeZone, prepareDB, renameColumn, renameTable, requiresIndexLengthLimit, requiresIndexName, schemaExists, setLquery, setLqueryArray, setLtree, setLtreeArray, sqlgSqlgSchemaCreationScript, sqlInsertEmptyValues, sqlToGetAllForeignKeys, sqlTruncate, supportsBigDecimal, supportsBigDecimalArrayValues, supportsBooleanArrayValues, supportsByteArrayValues, supportsByteValues, supportsClientInfo, supportsDeferrableForeignKey, supportsDistribution, supportsDoubleArrayValues, supportsDurationArrayValues, supportsFloatArrayValues, supportsFloatValues, supportsIfExists, supportsILike, supportsIntegerArrayValues, supportsJsonType, supportsLocalDateArrayValues, supportsLocalDateTimeArrayValues, supportsLocalTimeArrayValues, supportsLongArrayValues, supportsPartitioning, supportsPeriodArrayValues, supportsSchemaIfNotExists, supportsSchemas, supportsSharding, supportsShortArrayValues, supportsStreamingBatchMode, supportsStringArrayValues, supportsTemporaryTableOnCommitDrop, supportsTruncateMultipleTablesTogether, supportsUUID, supportsValuesExpression, supportsZonedDateTimeArrayValues, temporaryTablePrefix, toByteArray, toRDBSStringLiteral, toRDBSStringLiteral, uniqueIndexConsidersNullValuesEqual, validateSchemaName, validateTableName
Methods inherited from interface org.umlg.sqlg.sql.dialect.SqlSchemaChangeDialect
lock, notifyChange, registerListener, unregisterListener
-
Constructor Details
-
H2Dialect
public H2Dialect()
-
-
Method Details
-
supportsCascade
public boolean supportsCascade() -
isH2
public boolean isH2() -
supportsBatchMode
public boolean supportsBatchMode() -
dialectName
-
needsSchemaDropCascade
public boolean needsSchemaDropCascade() -
getInternalSchemas
-
createSchemaStatement
-
sqlTypeToPropertyType
public PropertyType sqlTypeToPropertyType(SqlgGraph sqlgGraph, String schema, String table, String column, int sqlType, String typeName, ListIterator<org.apache.commons.lang3.tuple.Triple<String, Integer, String>> metaDataIter) -
sqlArrayTypeNameToPropertyType
public PropertyType sqlArrayTypeNameToPropertyType(String typeName, SqlgGraph sqlgGraph, String schema, String table, String columnName, ListIterator<org.apache.commons.lang3.tuple.Triple<String, Integer, String>> metaDataIter) All this is because H2 does not return the TYPE_NAME for column meta data. The strategy is to actualy query the table get the column's value and interrogate it to get its type. If the column has no data then we are stuffed and an exception is thrown.- Parameters:
typeName
-sqlgGraph
-schema
-table
-columnName
-metaDataIter
-- Returns:
-
validateProperty
-
getColumnEscapeKey
-
getPrimaryKeyType
-
getAutoIncrementPrimaryKeyConstruct
-
propertyTypeToSqlDefinition
-
propertyTypeToJavaSqlType
-
getForeignKeyTypeDefinition
-
getArrayDriverType
-
putJsonObject
-
putJsonMetaObject
-
existIndexQuery
-
getSpacialRefTable
-
getGisSchemas
-
setPoint
-
setLineString
public void setLineString(PreparedStatement preparedStatement, int parameterStartIndex, Object lineString) -
setPolygon
-
setGeographyPoint
public void setGeographyPoint(PreparedStatement preparedStatement, int parameterStartIndex, Object point) -
getGis
-
lockTable
-
alterSequenceCacheSize
public void alterSequenceCacheSize(SqlgGraph sqlgGraph, SchemaTable schemaTable, String sequence, int batchSize) -
nextSequenceVal
-
currSequenceVal
-
sequenceName
-
supportsBulkWithinOut
public boolean supportsBulkWithinOut() -
supportsTransactionalSchema
public boolean supportsTransactionalSchema() -
afterCreateTemporaryTableStatement
-
sqlgTopologyCreationScripts
-
sqlgCreateTopologyGraph
-
sqlgAddIndexEdgeSequenceColumn
-
convertArray
- Throws:
SQLException
-
setArray
public void setArray(PreparedStatement statement, int index, PropertyType type, Object[] values) throws SQLException - Throws:
SQLException
-
getPublicSchema
-
isSystemIndex
-
supportsFullValueExpression
public boolean supportsFullValueExpression() -
valueToValuesString
-
supportsType
-
supportsJsonArrayValues
public boolean supportsJsonArrayValues() -
sqlToTurnOffReferentialConstraintCheck
-
sqlToTurnOnReferentialConstraintCheck
-
addPartitionTables
-
addHashPartitionColumns
-
addDbVersionToGraph
-
grantReadOnlyUserPrivilegesToSqlgSchemas
-
toSelectString
-
isTimestampz
-
addPropertyDefinitions
-
addOutEdgeDefinitions
-
addInEdgeDefinitions
-
checkConstraintName
-