Class H2JdbcSessionRepositoryDialect

java.lang.Object
org.springframework.ai.session.jdbc.H2JdbcSessionRepositoryDialect
All Implemented Interfaces:
JdbcSessionRepositoryDialect

public class H2JdbcSessionRepositoryDialect extends Object implements JdbcSessionRepositoryDialect
The dialect of H2. The upsert is a standard MERGE ... USING, so that an update leaves created_at alone as the other dialects do; H2's shorter MERGE ... KEY would overwrite every column.
Since:
2.1.0
Author:
Christian Tzolov
  • Constructor Details

    • H2JdbcSessionRepositoryDialect

      public H2JdbcSessionRepositoryDialect()
  • Method Details

    • getUpsertSessionSql

      public String getUpsertSessionSql()
      Description copied from interface: JdbcSessionRepositoryDialect
      Inserts a row into AI_SESSION or updates the existing one, refreshing only expires_at and metadata: created_at keeps its value and event_version is never touched. Parameters, in order: id, created_at, expires_at, metadata.
      Specified by:
      getUpsertSessionSql in interface JdbcSessionRepositoryDialect