Skip to main content

Crate cognee_database

Crate cognee_database 

Source
Expand description

Relational metadata persistence (SeaORM/SQLite) for ingestion, search history, and deletion.

Re-exports§

pub use ops::tutorial_seeder::TUTORIAL_BASICS_ID;
pub use ops::tutorial_seeder::TUTORIAL_PYTHON_DEV_ID;
pub use ops::tutorial_seeder::seed_tutorials_if_first_call;
pub use ops::checkpoint::CheckpointStore;
pub use ops::checkpoint::SeaOrmCheckpointStore;
pub use pipelines::sea_orm_impl::SeaOrmPipelineRunRepository;
pub use pipelines::NoopPipelineRunRepository;
pub use pipelines::PipelineRunRepository;
pub use pipelines::PipelineRunWithAttributionRow;
pub use sync::SeaOrmSyncOperationRepository;
pub use sync::SyncOperationRepository;
pub use sync::SyncOperationRow;
pub use sync::SyncOperationStatus;

Modules§

entities
migrator
ops
pipelines
sync
sync_operations repository surface.
uuid_hex
UUID ↔ 32-char hex string conversions.

Structs§

CostByModelRow
Single per-model row for GET /api/v1/sessions/cost-by-model. Parity with the Python response items at cognee/api/v1/sessions/routers/get_sessions_router.py:241-251.
DatasetConfiguration
DatasetConfigurationPatch
GraphEdge
GraphMetrics
GraphNode
Notebook
A single row from the notebooks table.
NotebookUpdatePatch
Fields that can be updated in a PUT /{notebook_id} call.
PipelineRun
SearchHistoryEntry
SessionListFilters
Filters for SessionLifecycleDb::list_session_rows. Field-for-field parity with Python’s list_session_rows keyword arguments at cognee/modules/session_lifecycle/metrics.py:365-374.
SessionListPage
Paginated envelope returned by list_session_rows. Parity with Python’s SessionListPage dataclass at metrics.py:351-362.
SessionRowWithStatus
Wraps a stored session_records row plus the read-time effective status (abandoned for stale running rows). Mirrors Python’s SessionRowWithStatus dataclass at cognee/modules/session_lifecycle/metrics.py:336-348.
SessionStats
Aggregate counters for GET /api/v1/sessions/stats. Field-for-field parity with the Python response body at cognee/api/v1/sessions/routers/get_sessions_router.py:179-196.
TaskRun

Enums§

DatabaseConnection
Handle a database connection depending on the backend enabled by the feature flags. This creates a database pool. This will be Clone unless the feature flag mock is enabled.
DatabaseError
PipelineRunStatus
SearchHistoryEntryType

Traits§

AclDb
Access control list database trait.
DatasetConfigDb
DeleteDb
IngestDb
NotebookDb
CRUD operations for the notebooks table.
SearchHistoryDb
SessionLifecycleDb
Repository trait for /api/v1/sessions/*. See module docs.

Functions§

connect
Open a connection to the relational database.
database_system_label
Map the active SeaORM backend to a cognee.db.system string matching the values used by the vector / graph adapters.
initialize
Run all pending migrations on an existing connection.