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
loggerFields inherited from interface org.umlg.sqlg.sql.dialect.SqlDialect
INDEX_POSTFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddDbVersionToGraph(DatabaseMetaData metadata) voidalterSequenceCacheSize(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) longcurrSequenceVal(SqlgGraph sqlgGraph, SchemaTable schemaTable, String prefix) existIndexQuery(SchemaTable schemaTable, String prefix, String indexName) getArrayDriverType(PropertyType arrayType) <T> TvoidbooleanisH2()booleanisSystemIndex(String indexName) booleanisTimestampz(String typeName) voidlockTable(SqlgGraph sqlgGraph, SchemaTable schemaTable, String prefix) booleanlongnextSequenceVal(SqlgGraph sqlgGraph, SchemaTable schemaTable, String prefix) int[]propertyTypeToJavaSqlType(PropertyType propertyType) String[]propertyTypeToSqlDefinition(PropertyType propertyType) voidputJsonMetaObject(com.fasterxml.jackson.databind.ObjectMapper mapper, com.fasterxml.jackson.databind.node.ArrayNode metaNodeArray, String columnName, int sqlType, Object o) voidputJsonObject(com.fasterxml.jackson.databind.node.ObjectNode obj, String columnName, int sqlType, Object o) sequenceName(SqlgGraph sqlgGraph, SchemaTable outSchemaTable, String prefix) voidsetArray(PreparedStatement statement, int index, PropertyType type, Object[] values) voidsetGeographyPoint(PreparedStatement preparedStatement, int parameterStartIndex, Object point) voidsetLineString(PreparedStatement preparedStatement, int parameterStartIndex, Object lineString) voidsetPoint(PreparedStatement preparedStatement, int parameterStartIndex, Object point) voidsetPolygon(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) booleanbooleanbooleanbooleanbooleanbooleanbooleansupportsType(PropertyType propertyType) toSelectString(boolean partOfDuplicateQuery, ColumnList.Column column, String alias) voidvalidateProperty(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, validateColumnNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.umlg.sqlg.sql.dialect.SqlBulkDialect
bulkAddEdges, constructCompleteCopyCommandSqlEdge, constructCompleteCopyCommandSqlVertex, constructCompleteCopyCommandSqlVertex, constructCompleteCopyCommandTemporarySqlVertex, getBatchNull, streamSql, temporaryTableCopyCommandSqlVertex, writeStreamingEdge, writeStreamingVertex, writeTemporaryStreamingVertexMethods 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, validateTableNameMethods 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
-