1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//! PostgreSQL integration for the Synaptic framework.
//!
//! This crate provides PostgreSQL-backed implementations of Synaptic traits:
//!
//! - [`PgVectorStore`] — [`VectorStore`](synaptic_core::VectorStore) using the
//! [pgvector](https://github.com/pgvector/pgvector) extension for cosine-distance
//! similarity search.
//! - [`PgStore`] — [`Store`](synaptic_core::Store) for key-value storage with JSONB
//! values and optional full-text search via `tsvector`.
//! - [`PgCache`] — [`LlmCache`](synaptic_core::LlmCache) for caching LLM responses
//! with optional TTL expiration.
//! - [`PgCheckpointer`] — Graph checkpoint persistence (requires `checkpointer` feature).
//!
//! # Quick start
//!
//! ```rust,no_run
//! use sqlx::postgres::PgPoolOptions;
//! use synaptic_postgres::{PgVectorConfig, PgVectorStore};
//!
//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
//! let pool = PgPoolOptions::new()
//! .max_connections(5)
//! .connect("postgres://user:pass@localhost/mydb")
//! .await?;
//!
//! let config = PgVectorConfig::new("documents", 1536);
//! let store = PgVectorStore::new(pool, config);
//! store.initialize().await?;
//! # Ok(())
//! # }
//! ```
pub use ;
pub use PgCheckpointer;
pub use ;
pub use ;
// Re-export core traits/types for convenience.
pub use ;