PostgresCheckpointer

org.llm4s.agent.graph.postgres.PostgresCheckpointer
See thePostgresCheckpointer companion class

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def create(dataSource: DataSource, ownsDataSource: Boolean, config: PostgresCheckpointerConfig): Result[PostgresCheckpointer]

The store over dataSource, a pool the caller already has, closed with the store only if ownsDataSource. The schema config names is created if it is missing and brought to the current version in one transaction, under a transaction-scoped advisory lock, so any number of instances may start at once. A schema that a newer build migrated is refused with GraphError.UnsupportedStoreSchema, changing nothing; a database that cannot be reached is a ProcessingError. Either way an owned dataSource is closed.

The store over dataSource, a pool the caller already has, closed with the store only if ownsDataSource. The schema config names is created if it is missing and brought to the current version in one transaction, under a transaction-scoped advisory lock, so any number of instances may start at once. A schema that a newer build migrated is refused with GraphError.UnsupportedStoreSchema, changing nothing; a database that cannot be reached is a ProcessingError. Either way an owned dataSource is closed.

The pool's own connection timeout takes config.connectionTimeout's place in the store's bound, and its driver should set a socket timeout; the call timeout is the store's.

Attributes

def open(jdbcUrl: String, user: String, password: String, config: PostgresCheckpointerConfig): Result[PostgresCheckpointer]

Opens the store over a HikariCP pool of its own to jdbcUrl (jdbc:postgresql://host:port/database), sized and timed out by config, and brings its schema to the current version (see create). The pool is closed with the store. The driver's socket timeout is set past the call timeout, as a last resort behind the store's own bound.

Opens the store over a HikariCP pool of its own to jdbcUrl (jdbc:postgresql://host:port/database), sized and timed out by config, and brings its schema to the current version (see create). The pool is closed with the store. The driver's socket timeout is set past the call timeout, as a last resort behind the store's own bound.

Attributes