# Interface CADatabaseType

All Superinterfaces:
  `AutoCloseable`, `com.io7m.repetoir.core.RPServiceType`

All Known Implementing Classes:
  `CADatabase`

public interface CADatabaseType extends AutoCloseable, com.io7m.repetoir.core.RPServiceType
An open database.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `CADatabaseConnectionType`
  `openConnection(CADatabaseRole role)`
  Open a database connection using the given role.

  ### Methods inherited from interface com.io7m.repetoir.core.RPServiceType

  `description`

- ## Method Details

  - ### close

    void close() throws CADatabaseException
    Specified by:
      `close` in interface `AutoCloseable`
    Throws:
      `CADatabaseException`

  - ### openConnection

    CADatabaseConnectionType openConnection(CADatabaseRole role) throws CADatabaseException
    Open a database connection using the given role.
    Parameters:
      `role` - The role
    Returns:
      A database connection
    Throws:
      `CADatabaseException` - On errors