类 PostgreDdlGenerator

java.lang.Object
com.baomidou.mybatisplus.extension.ddl.history.PostgreDdlGenerator
所有已实现的接口:
IDdlGenerator

public class PostgreDdlGenerator extends Object implements IDdlGenerator
PostgreSQL DDL 生成器
从以下版本开始:
2021-06-22
作者:
hubin
  • 构造器详细资料

    • PostgreDdlGenerator

      @Deprecated public PostgreDdlGenerator()
      已过时。
    • PostgreDdlGenerator

      public PostgreDdlGenerator(String schema)
      创建PostgreDdlGenerator实例
      参数:
      schema - schema (可为null,当为null时为自动识别数据库连接的schema)
      从以下版本开始:
      3.5.13
  • 方法详细资料

    • newInstance

      public static IDdlGenerator newInstance()
      默认实例 (基于public模式)
      返回:
      PostgreDdlGenerator
    • newInstanceWithSchema

      public static IDdlGenerator newInstanceWithSchema(String schema)
      手动指定schema
      参数:
      schema - schema
      返回:
      PostgreDdlGenerator
      从以下版本开始:
      3.5.13
    • newInstanceWithAutoSchema

      public static IDdlGenerator newInstanceWithAutoSchema()
      基于数据库连接自动识别schema
      返回:
      PostgreDdlGenerator
      从以下版本开始:
      3.5.13
    • existTable

      public boolean existTable(String databaseName, Function<String,Boolean> executeFunction)
      从接口复制的说明: IDdlGenerator
      表是否存在
      指定者:
      existTable 在接口中 IDdlGenerator
      参数:
      databaseName - 数据库名称
      executeFunction - 执行判断函数
      返回:
      exist or no
    • existTable

      public boolean existTable(Connection connection) throws SQLException
      从接口复制的说明: IDdlGenerator
      检查IDdlGenerator.getDdlHistory()表是否存在
      指定者:
      existTable 在接口中 IDdlGenerator
      参数:
      connection - 数据库连接
      返回:
      是否存在
      抛出:
      SQLException - SQLException
    • getDdlHistory

      public String getDdlHistory()
      从接口复制的说明: IDdlGenerator
      返回 DDL_HISTORY 表名
      指定者:
      getDdlHistory 在接口中 IDdlGenerator
      返回:
      SQL
    • createDdlHistory

      public String createDdlHistory()
      从接口复制的说明: IDdlGenerator
      ddl_history sql
      指定者:
      createDdlHistory 在接口中 IDdlGenerator
      返回:
      SQL
    • getSchema

      @Deprecated protected String getSchema()
      已过时。
      3.5.13 指定请使用 setSchema(String)
      返回:
      scheme
    • setSchema

      public void setSchema(String schema)
      schema模式(默认:public)

      为了兼容,默认使用public,但指定为null时,使用jdbc指定的schema

      从以下版本开始:
      3.5.13