# Database Configuration Schema
# Common schema for database settings (RocksDB, SurrealDB, PostgreSQL)

{
  DatabaseConfig = {
    # Database backend selection (filesystem, rocksdb, surrealdb_embedded, surrealdb_server, postgres)
    backend | String,

    # Local storage path (for filesystem and rocksdb)
    path | String | optional,

    # Connection string for remote databases (SurrealDB server, PostgreSQL)
    connection_string | String | optional,

    # Database name/namespace
    database | String | optional,

    # Namespace for multi-tenant databases
    namespace | String | optional,

    # Connection pool settings
    pool_size | Number | optional,

    # Connection timeout in milliseconds
    timeout | Number | optional,

    # Enable connection retry
    retry | Bool | default = true,

    # Max retry attempts
    max_retries | String | optional,

    # Credentials for authenticated databases
    credentials | {
      username | String | optional,
      password | String | optional,
    } | optional,
  },
}
