Class MySqlDialect

java.lang.Object
cloud.opencode.base.flow.persistence.jdbc.MySqlDialect
All Implemented Interfaces:
JdbcDialect

public final class MySqlDialect extends Object implements JdbcDialect
MySQL / MariaDB dialect. MySQL / MariaDB 方言。

Column-type mapping (design v4 §6):

  • JSON columns → JSON
  • Timestamp columns → TIMESTAMP(6) (microsecond precision)
  • Boolean columns → TINYINT(1) (MySQL has no native BOOLEAN)

列类型映射(设计 v4 §6):

  • JSON 列 → JSON
  • TIMESTAMP 列 → TIMESTAMP(6)(微秒精度)
  • boolean 列 → TINYINT(1)(MySQL 无原生 BOOLEAN)
Since:
JDK 25, opencode-base-flow V1.0.5
Author:
Leon Soo
  • Constructor Details

    • MySqlDialect

      public MySqlDialect()
      Creates a stateless MySQL dialect. 构造无状态 MySQL 方言实例。
      Since:
      JDK 25, opencode-base-flow V1.0.5
  • Method Details

    • jsonType

      public String jsonType()
      Description copied from interface: JdbcDialect
      Column type for variables_json / dsl_json / extra_json. variables_json / dsl_json / extra_json 列类型。
      Specified by:
      jsonType in interface JdbcDialect
      Returns:
      vendor-specific JSON column type — 方言相关 JSON 类型
    • timestampType

      public String timestampType()
      Description copied from interface: JdbcDialect
      Column type for TIMESTAMP columns (with microsecond precision, including time-zone where the dialect supports it). TIMESTAMP 列类型(微秒精度,方言支持时含时区)。
      Specified by:
      timestampType in interface JdbcDialect
      Returns:
      vendor-specific timestamp column type — 方言相关 TIMESTAMP 类型
    • booleanType

      public String booleanType()
      Description copied from interface: JdbcDialect
      Column type for boolean columns (e.g. flow_comment_template.enabled). boolean 列类型(如 flow_comment_template.enabled)。
      Specified by:
      booleanType in interface JdbcDialect
      Returns:
      vendor-specific boolean column type — 方言相关 boolean 类型
    • shortName

      public String shortName()
      Description copied from interface: JdbcDialect
      Short identifier used to pick the matching V1__init_*.sql script (one of "mysql" / "postgres" / "h2"). 用于挑选 V1__init_*.sql 脚本的短标识("mysql" / "postgres" / "h2")。
      Specified by:
      shortName in interface JdbcDialect
      Returns:
      short identifier — 短标识