Class RDBMSBackendModule
java.lang.Object
com.kingsrook.qqq.backend.module.rdbms.RDBMSBackendModule
- All Implemented Interfaces:
QBackendModuleInterface
- Direct Known Subclasses:
PostgreSQLBackendModule,SQLiteBackendModule
QQQ Backend module for working with Relational Databases (RDBMS's).
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClass<? extends QBackendMetaData> Method to identify the class used for backend meta data for this module.Method where a backend module must be able to provide its type (name).Atomic conditional updates (CONDITIONAL_UPDATE), plus the database clock.getHealthCheck(QBackendMetaData backend) A read-only readiness probe; connection configuration never becomes details.Class<? extends QTableBackendDetails> Method to identify the class used for table-backend details for this module.Open a transaction whose reads all see one snapshot of the database - in the vendor's way (see RDBMSActionStrategyInterface.beginConsistentRead).resyncKeySequences(QBackendMetaData backend, Collection<QTableMetaData> tables) Advance each table's key sequence past its largest key, per vendor: - postgres: setval on the column's serial/identity sequencebooleansupportsQueryLockMode(QBackendMetaData backendMetaData, QueryLockMode lockMode) Row locks, as the backend's SQL dialect (action strategy) supports them.booleansupportsSubQueries(QBackendMetaData backend) RDBMS actions translate same-backend sub-queries into SQL.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.kingsrook.qqq.backend.core.modules.backend.QBackendModuleInterface
getGetInterface, getStorageInterface, getUnsupportedCapabilities
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
RDBMSBackendModule
public RDBMSBackendModule()
-
-
Method Details
-
getHealthCheck
A read-only readiness probe; connection configuration never becomes details.- Specified by:
getHealthCheckin interfaceQBackendModuleInterface
-
supportsSubQueries
RDBMS actions translate same-backend sub-queries into SQL.- Specified by:
supportsSubQueriesin interfaceQBackendModuleInterface
-
getBackendType
Method where a backend module must be able to provide its type (name).- Specified by:
getBackendTypein interfaceQBackendModuleInterface
-
getBackendMetaDataClass
Method to identify the class used for backend meta data for this module.- Specified by:
getBackendMetaDataClassin interfaceQBackendModuleInterface
-
getTableBackendDetailsClass
Method to identify the class used for table-backend details for this module.- Specified by:
getTableBackendDetailsClassin interfaceQBackendModuleInterface
-
getCountInterface
- Specified by:
getCountInterfacein interfaceQBackendModuleInterface
-
getQueryInterface
- Specified by:
getQueryInterfacein interfaceQBackendModuleInterface
-
getInsertInterface
- Specified by:
getInsertInterfacein interfaceQBackendModuleInterface
-
getUpdateInterface
- Specified by:
getUpdateInterfacein interfaceQBackendModuleInterface
-
getDeleteInterface
- Specified by:
getDeleteInterfacein interfaceQBackendModuleInterface
-
getAggregateInterface
- Specified by:
getAggregateInterfacein interfaceQBackendModuleInterface
-
openTransaction
- Specified by:
openTransactionin interfaceQBackendModuleInterface- Throws:
QException
-
openConsistentReadTransaction
public Optional<QBackendTransaction> openConsistentReadTransaction(ConsistentReadInput input) throws QException Open a transaction whose reads all see one snapshot of the database - in the vendor's way (see RDBMSActionStrategyInterface.beginConsistentRead). With useReadReplica, and a read-only backend configured, it's on that backend.- Specified by:
openConsistentReadTransactionin interfaceQBackendModuleInterface- Throws:
QException
-
resyncKeySequences
public List<SequenceResyncResult> resyncKeySequences(QBackendMetaData backend, Collection<QTableMetaData> tables) throws QException Advance each table's key sequence past its largest key, per vendor: - postgres: setval on the column's serial/identity sequence. - h2: ALTER TABLE ... RESTART WITH max+1 on an identity column. - mysql, mariadb, sqlite: the engine does this itself on explicit inserts. - anything else (or no integer key, or no sequence): not applicable.- Specified by:
resyncKeySequencesin interfaceQBackendModuleInterface- Throws:
QException
-
getConditionalUpdateInterface
Atomic conditional updates (CONDITIONAL_UPDATE), plus the database clock.- Specified by:
getConditionalUpdateInterfacein interfaceQBackendModuleInterface
-
supportsQueryLockMode
Row locks, as the backend's SQL dialect (action strategy) supports them.- Specified by:
supportsQueryLockModein interfaceQBackendModuleInterface
-