CockroachEngine

Configuration

# piccolo_conf.py
from piccolo.engine.cockroach import CockroachEngine


DB = CockroachEngine(config={
    'host': 'localhost',
    'database': 'piccolo',
    'user': 'root',
    'password': '',
    'port': '26257',
})

config

The config dictionary is passed directly to the underlying database adapter, asyncpg. See the asyncpg docs to learn more.


Connection Pool

See Connection Pool.


Source

class piccolo.engine.cockroach.CockroachEngine(config: dict[str, Any], extensions: Sequence[str] = (), log_queries: bool = False, log_responses: bool = False, extra_nodes: dict[str, CockroachEngine] | None = None)

An extension of PostgresEngine.