Class PostgresDialect
java.lang.Object
cloud.opencode.base.flow.persistence.jdbc.PostgresDialect
- All Implemented Interfaces:
JdbcDialect
PostgreSQL dialect.
PostgreSQL 方言。
Column-type mapping (design v4 §6):
- JSON columns →
JSONB(indexable, deduped storage) - Timestamp columns →
TIMESTAMP(6) WITH TIME ZONE - Boolean columns →
BOOLEAN
列类型映射(设计 v4 §6):
- JSON 列 →
JSONB(可索引、去重存储) - TIMESTAMP 列 →
TIMESTAMP(6) WITH TIME ZONE - boolean 列 →
BOOLEAN
- Since:
- JDK 25, opencode-base-flow V1.0.5
- Author:
- Leon Soo
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionColumn type for boolean columns (e.g.jsonType()Column type forvariables_json/dsl_json/extra_json.Short identifier used to pick the matchingV1__init_*.sqlscript (one of"mysql"/"postgres"/"h2").Column type forTIMESTAMPcolumns (with microsecond precision, including time-zone where the dialect supports it).
-
Constructor Details
-
PostgresDialect
public PostgresDialect()Creates a stateless PostgreSQL dialect. 构造无状态 PostgreSQL 方言实例。- Since:
- JDK 25, opencode-base-flow V1.0.5
-
-
Method Details
-
jsonType
Description copied from interface:JdbcDialectColumn type forvariables_json/dsl_json/extra_json.variables_json/dsl_json/extra_json列类型。- Specified by:
jsonTypein interfaceJdbcDialect- Returns:
- vendor-specific JSON column type — 方言相关 JSON 类型
-
timestampType
Description copied from interface:JdbcDialectColumn type forTIMESTAMPcolumns (with microsecond precision, including time-zone where the dialect supports it).TIMESTAMP列类型(微秒精度,方言支持时含时区)。- Specified by:
timestampTypein interfaceJdbcDialect- Returns:
- vendor-specific timestamp column type — 方言相关 TIMESTAMP 类型
-
booleanType
Description copied from interface:JdbcDialectColumn type for boolean columns (e.g.flow_comment_template.enabled). boolean 列类型(如flow_comment_template.enabled)。- Specified by:
booleanTypein interfaceJdbcDialect- Returns:
- vendor-specific boolean column type — 方言相关 boolean 类型
-
shortName
Description copied from interface:JdbcDialectShort identifier used to pick the matchingV1__init_*.sqlscript (one of"mysql"/"postgres"/"h2"). 用于挑选V1__init_*.sql脚本的短标识("mysql"/"postgres"/"h2")。- Specified by:
shortNamein interfaceJdbcDialect- Returns:
- short identifier — 短标识
-