Skip to content

Rename DatabaseError to OpenError #1095

@xpe

Description

@xpe

DatabaseError is a confusing name. Its doc comment says "Errors related to opening a database", but the name suggests it covers all database operations.

I suggest renaming to OpenError since:

  • The namespace already provides context (redb::OpenError)
  • Its variants (DatabaseAlreadyOpen, RepairAborted, UpgradeRequired) are all open-time errors
  • Distinguishes it clearly from Error (the general superset enum for all redb errors)

Currently, having both DatabaseError (specific to opening) and Error (general) is confusing. OpenError makes the distinction obvious and follows Rust conventions of keeping names concise when the namespace provides context.

This is a breaking change but would clarify the API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions