Package com.io7m.idstore.database.api

# Interface IdDatabaseEmailsQueriesType

All Superinterfaces:
  `IdDatabaseQueriesType`

public non-sealed interface IdDatabaseEmailsQueriesType extends IdDatabaseQueriesType
The database queries involving emails.

- ## Field Summary

  ### Fields inherited from interface com.io7m.idstore.database.api.IdDatabaseQueriesType

  `EARLIEST`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Optional<IdEmailOwner>`
  `emailExists(IdEmail email)`
  Determine if an email address already exists.
  `void`
  `emailVerificationCreate(IdEmailVerification verification)`
  Create a verification.
  `void`
  `emailVerificationDelete(IdToken token, IdEmailVerificationResolution resolution)`
  Delete a verification.
  `Optional<IdEmailVerification>`
  `emailVerificationGet(IdToken token)`
  Retrieve a verification.

- ## Method Details

  - ### emailExists

    Optional<IdEmailOwner> emailExists(IdEmail email) throws IdDatabaseException
    Determine if an email address already exists.
    Parameters:
      `email` - The email address
    Returns:
      The user ID that owns the email address, if any
    Throws:
      `IdDatabaseException` - On errors

  - ### emailVerificationCreate

    @IdDatabaseRequiresUser void emailVerificationCreate(IdEmailVerification verification) throws IdDatabaseException
    Create a verification.
    Parameters:
      `verification` - The verification
    Throws:
      `IdDatabaseException` - On errors

  - ### emailVerificationGet

    Optional<IdEmailVerification> emailVerificationGet(IdToken token) throws IdDatabaseException
    Retrieve a verification.
    Parameters:
      `token` - The verification token
    Returns:
      The verification, if one exists
    Throws:
      `IdDatabaseException` - On errors

  - ### emailVerificationDelete

    @IdDatabaseRequiresUser void emailVerificationDelete(IdToken token, IdEmailVerificationResolution resolution) throws IdDatabaseException
    Delete a verification.
    Parameters:
      `token` - The verification token
      `resolution` - The resolution
    Throws:
      `IdDatabaseException` - On errors