Interface QBackendModuleInterface

All Known Implementing Classes:
APIBackendModule, EnumerationBackendModule, FilesystemBackendModule, MemoryBackendModule, MockBackendModule, MongoDBBackendModule, PostgreSQLBackendModule, RDBMSBackendModule, S3BackendModule, SFTPBackendModule, SQLiteBackendModule

public interface QBackendModuleInterface
Interface that a QBackendModule must implement. Note, all methods have a default version, which throws a 'not implemented' exception.
  • Method Details

    • getHealthCheck

      default HealthCheck getHealthCheck(QBackendMetaData backend)
      Optional backend readiness probe, registered by central health monitoring.
    • supportsSubQueries

      default boolean supportsSubQueries(QBackendMetaData backend)
      Whether query, count and aggregate can translate same-backend sub-queries.
    • getBackendType

      String getBackendType()
      Method where a backend module must be able to provide its type (name).
    • getBackendMetaDataClass

      default Class<? extends QBackendMetaData> getBackendMetaDataClass()
      Method to identify the class used for backend meta data for this module.
    • getUnsupportedCapabilities

      default Set<Capability> getUnsupportedCapabilities()
      Capabilities this module can never provide (for example, writes on a read-only module). The instance enricher disables them on every backend of this type, unless the backend explicitly enables them, so tables, their generated bulk processes, permissions and frontends all agree.
    • getTableBackendDetailsClass

      default Class<? extends QTableBackendDetails> getTableBackendDetailsClass()
      Method to identify the class used for table-backend details for this module.
    • getCountInterface

      default CountInterface getCountInterface()
    • getQueryInterface

      default QueryInterface getQueryInterface()
    • getGetInterface

      default GetInterface getGetInterface()
    • getInsertInterface

      default InsertInterface getInsertInterface()
    • getUpdateInterface

      default UpdateInterface getUpdateInterface()
    • getDeleteInterface

      default DeleteInterface getDeleteInterface()
    • getAggregateInterface

      default AggregateInterface getAggregateInterface()
    • getConditionalUpdateInterface

      default ConditionalUpdateInterface getConditionalUpdateInterface()
      The CONDITIONAL_UPDATE capability (atomic compare-and-set update), or null when the backend does not support it (the default).
    • supportsQueryLockMode

      default boolean supportsQueryLockMode(QBackendMetaData backendMetaData, QueryLockMode lockMode)
      Whether queries against this backend can take the given row locks (QueryInput.lockMode). False by default.
    • getStorageInterface

      default QStorageInterface getStorageInterface()
    • openTransaction

      default QBackendTransaction openTransaction(AbstractTableActionInput input) throws QException
      Throws:
      QException
    • openConsistentReadTransaction

      default Optional<QBackendTransaction> openConsistentReadTransaction(ConsistentReadInput input) throws QException
      Open a read-only transaction through which every table read (passed as the transaction on the read's input) reflects one instant - see ConsistencyScope and ConsistencyGuarantee (QBackendTransaction.getConsistencyGuarantee). Where the backend can share the snapshot, the transaction's getExportedSnapshotId is set, and other transactions may attach to it via ConsistentReadInput.importSnapshotId (while this one stays open). The default - for backends with no such support - is Optional.empty(). The caller owns the returned transaction, and must close it.
      Throws:
      QException
    • resyncKeySequences

      default List<SequenceResyncResult> resyncKeySequences(QBackendMetaData backend, Collection<QTableMetaData> tables) throws QException
      Advance each table's generated-key sequence past the largest key now in the table, so the next generated insert gets max+1. Needed after rows were inserted with explicit (preserved) primary keys, e.g., a restore or a data migration. The default does nothing, and returns an empty list: backends without generated key sequences have nothing to resync.
      Throws:
      QException