类 CreateTableSqlBuilder

java.lang.Object
org.dromara.autotable.strategy.h2.builder.CreateTableSqlBuilder

public class CreateTableSqlBuilder extends Object
作者:
don
  • 构造器详细资料

    • CreateTableSqlBuilder

      public CreateTableSqlBuilder()
  • 方法详细资料

    • buildColumnSql

      public static List<String> buildColumnSql(org.dromara.autotable.core.strategy.DefaultTableMetadata tableMetadata)
      构建创建新表的SQL
      参数:
      tableMetadata - 参数
      返回:
      sql
    • getCreateIndexSql

      public static List<String> getCreateIndexSql(String schema, String tableName, List<org.dromara.autotable.core.strategy.IndexMetadata> indexMetadataList)
      CREATE UNIQUE INDEX "uni_name" ON "表名" ( "name" );
    • getAllCommentSql

      public static List<String> getAllCommentSql(String schema, String tableName, String tableComment, Map<String,String> columnCommentMap, Map<String,String> indexCommentMap)
    • buildColumnSql

      public static String buildColumnSql(org.dromara.autotable.core.strategy.ColumnMetadata columnMetadata)
      生成字段相关的SQL片段
      参数:
      columnMetadata - 列元数据
      返回:
      列相关的sql