Class H2SqlStatements
- java.lang.Object
-
- io.apicurio.registry.storage.impl.sql.CommonSqlStatements
-
- io.apicurio.registry.storage.impl.sql.H2SqlStatements
-
- All Implemented Interfaces:
SqlStatements
public class H2SqlStatements extends CommonSqlStatements
H2 implementation of the sql statements interface. Provides sql statements that are specific to H2, where applicable.- Author:
- eric.wittmann@gmail.com
-
-
Constructor Summary
Constructors Constructor Description H2SqlStatements()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
dbType()
Gets the database type associated with these statements.String
isDatabaseInitialized()
A statement that returns 'true' if the database has already been initialized.boolean
isForeignKeyViolation(Exception error)
Returns true if the given exception represents a foreign key violation.boolean
isPrimaryKeyViolation(Exception error)
Returns true if the given exception represents a primary key violation.String
resetSequence(String sequence)
String
upsertContent()
A statement to "upsert" a row in the "content" table.String
upsertLogConfiguration()
A statement to "upsert" a row in the "logconfiguration" table-
Methods inherited from class io.apicurio.registry.storage.impl.sql.CommonSqlStatements
autoUpdateVersionForGlobalId, databaseInitialization, databaseUpgrade, deleteArtifact, deleteArtifactRule, deleteArtifactRules, deleteArtifactRulesByGroupId, deleteArtifactsByGroupId, deleteGlobalRule, deleteGlobalRules, deleteGroup, deleteLabels, deleteLabelsByGlobalId, deleteLabelsByGroupId, deleteLogConfiguration, deleteProperties, deletePropertiesByGlobalId, deletePropertiesByGroupId, deleteVersion, deleteVersionLabels, deleteVersionProperties, deleteVersions, deleteVersionsByGroupId, exportArtifactRules, exportArtifactVersions, exportContent, exportGlobalRules, exportGroups, getDatabaseVersion, importArtifactRule, importArtifactVersion, importContent, importGlobalRule, importGroup, insertArtifact, insertArtifactRule, insertGlobalRule, insertGroup, insertLabel, insertProperty, insertVersion, selectAllArtifactVersions, selectAllArtifactVersionsCount, selectAllLogConfigurations, selectArtifactCountById, selectArtifactIds, selectArtifactMetaDataByGlobalId, selectArtifactRuleByType, selectArtifactRuleCountByType, selectArtifactRules, selectArtifactVersionContent, selectArtifactVersionContentByGlobalId, selectArtifactVersionMetaData, selectArtifactVersionMetaDataByCanonicalHash, selectArtifactVersionMetaDataByContentHash, selectArtifactVersionMetaDataByContentId, selectArtifactVersionMetaDataByGlobalId, selectArtifactVersions, selectContentByContentHash, selectContentById, selectContentCountByHash, selectContentExists, selectContentIdByHash, selectGlobalIdExists, selectGlobalRuleByType, selectGlobalRuleCountByType, selectGlobalRules, selectGroupByGroupId, selectGroups, selectLatestArtifactContent, selectLatestArtifactMetaData, selectLogConfigurationByLogger, selectMaxContentId, selectMaxGlobalId, selectNextGlobalId, updateArtifactLatest, updateArtifactLatestGlobalId, updateArtifactRule, updateArtifactVersionMetaData, updateArtifactVersionState, updateGlobalRule, updateGroup
-
-
-
-
Method Detail
-
dbType
public String dbType()
Description copied from interface:SqlStatements
Gets the database type associated with these statements.- See Also:
SqlStatements.dbType()
-
isPrimaryKeyViolation
public boolean isPrimaryKeyViolation(Exception error)
Description copied from interface:SqlStatements
Returns true if the given exception represents a primary key violation.
-
isForeignKeyViolation
public boolean isForeignKeyViolation(Exception error)
Description copied from interface:SqlStatements
Returns true if the given exception represents a foreign key violation.
-
isDatabaseInitialized
public String isDatabaseInitialized()
Description copied from interface:SqlStatements
A statement that returns 'true' if the database has already been initialized.- See Also:
io.apicurio.registry.storage.impl.sql.SqlStatements.core.storage.jdbc.ISqlStatements#isDatabaseInitialized()
-
upsertContent
public String upsertContent()
Description copied from interface:SqlStatements
A statement to "upsert" a row in the "content" table.- See Also:
SqlStatements.upsertContent()
-
upsertLogConfiguration
public String upsertLogConfiguration()
Description copied from interface:SqlStatements
A statement to "upsert" a row in the "logconfiguration" table- See Also:
SqlStatements.upsertLogConfiguration()
-
-