Skip to content

人大金仓

人大金仓(KingbaseES)是国产数据库,兼容 PostgreSQL 语法。

依赖

xml
<dependency>
    <groupId>org.dromara.autotable</groupId>
    <artifactId>auto-table-strategy-kingbase</artifactId>
    <version>2.5.10</version>
</dependency>

测试版本

  • V009R001C002B0014

配置项

yaml
auto-table:
  kingbase:
    admin-user:
    admin-password:

连接配置

yaml
spring:
  datasource:
    url: jdbc:kingbase8://localhost:54321/database
    driver-class-name: com.kingbase8.Driver
    username: system
    password:

Schema 支持

与 PostgreSQL 类似,支持 schema:

java
@AutoTable(schema = "my_schema")
public class User {
}

类型映射

人大金仓兼容 PostgreSQL,类型映射与 PostgreSQL 一致。

Java 类型人大金仓类型
Stringvarchar(255)
Integerinteger
Longbigint
Booleanboolean
Doubledouble precision
BigDecimalnumeric(10,2)
LocalDateTimetimestamp
LocalDatedate
byte[]bytea

致谢

人大金仓数据库策略由社区成员 @minfc 贡献开发。

Released under the Apache 2.0 License.