haive.core.persistence.postgres_saver_overrideΒΆ
PostgreSQL persistence utilities with Pydantic support.
This module provides utilities for handling Pydantic models in PostgreSQL persistence. The main functionality is the JSON encoder configuration that ensures Pydantic models are properly serialized to JSONB columns.
The override classes are kept for backward compatibility and as a fallback when using connection strings directly. However, the preferred approach is to configure the connection pool with the configure parameter.
ClassesΒΆ
Async PostgresSaver with proper configuration. |
|
PostgresSaver that disables prepared statements and handles Pydantic models. |
FunctionsΒΆ
|
Configure a PostgreSQL connection to handle Pydantic JSON serialization. |
JSON encoder that handles Pydantic models. |
Module ContentsΒΆ
- class haive.core.persistence.postgres_saver_override.AsyncPostgresSaverNoPreparedStatements(conn, pipe=None, serde=None)[source]ΒΆ
Bases:
langgraph.checkpoint.postgres.aio.AsyncPostgresSaver
Async PostgresSaver with proper configuration.
This class is kept for backward compatibility and for cases where you need to use from_conn_string directly. The preferred approach is to configure the connection pool with the configure parameter in postgres_config.py.
- Parameters:
conn (langgraph.checkpoint.postgres._ainternal.Conn)
pipe (psycopg.AsyncPipeline | None)
serde (langgraph.checkpoint.serde.base.SerializerProtocol | None)
- class haive.core.persistence.postgres_saver_override.PostgresSaverNoPreparedStatements(conn, pipe=None, serde=None)[source]ΒΆ
Bases:
langgraph.checkpoint.postgres.PostgresSaver
PostgresSaver that disables prepared statements and handles Pydantic models.
This class is kept for backward compatibility and for cases where you need to use from_conn_string directly. The preferred approach is to configure the connection pool with the configure parameter in postgres_config.py.
- Parameters:
conn (_internal.Conn)
pipe (psycopg.Pipeline | None)
serde (langgraph.checkpoint.serde.base.SerializerProtocol | None)