@earth-app/collegedb
    Preparing search index...

    Interface CollegeDBConfig

    Configuration for the collegedb sharded database

    interface CollegeDBConfig {
        coordinator?: DurableObjectNamespace<undefined>;
        debug?: boolean;
        disableAutoMigration?: boolean;
        hashShardMappings?: boolean;
        knownShardsCacheTtlMs?: number;
        kv: KVStorage;
        mappingCacheTtlMs?: number;
        maxDatabaseSize?: number;
        migrationConcurrency?: number;
        shardLocations?: Record<string, D1Region | ShardLocation>;
        shards: Record<string, SQLDatabase>;
        sizeCacheTtlMs?: number;
        strategy?: ShardingStrategy | MixedShardingStrategy;
        targetRegion?: D1Region;
    }
    Index

    Properties

    coordinator?: DurableObjectNamespace<undefined>

    Shard coordinator Durable Object

    debug?: boolean

    Enable debug logging for development and troubleshooting

    false
    

    1.0.6

    disableAutoMigration?: boolean

    Disable automatic migration detection and background migration (useful for testing)

    1.0.2

    hashShardMappings?: boolean

    Whether to hash shard mapping keys with SHA-256 for security and privacy. When enabled, primary keys are hashed before storing in KV, protecting sensitive data like emails from being visible in KV keys.

    true
    

    1.0.3

    knownShardsCacheTtlMs?: number

    In-memory TTL for known shard list cache.

    10000
    

    1.1.0

    Key-value provider for storing shard mappings

    mappingCacheTtlMs?: number

    In-memory TTL for primary key to shard mapping cache.

    30000
    

    1.1.0

    maxDatabaseSize?: number

    Maximum database size in bytes. When set, shards that exceed this size are excluded from new allocations (existing mappings remain intact).

    When omitted, size-based filtering is disabled to avoid extra sizing queries. This significantly reduces routing latency for write-heavy workloads.

    1.0.8

    migrationConcurrency?: number

    Concurrency limit for migration mapping operations.

    25
    

    1.1.0

    shardLocations?: Record<string, D1Region | ShardLocation>

    Geographic locations of each shard (required for location strategy)

    shards: Record<string, SQLDatabase>

    Available SQL shard providers

    sizeCacheTtlMs?: number

    In-memory TTL for shard size checks when maxDatabaseSize is enabled.

    30000
    

    1.1.0

    Default shard allocation strategy (can be single strategy or mixed strategy object)

    targetRegion?: D1Region

    Target region for location-based sharding