kingbase数据库

zs 8141e1d28c 修改中试平台管理 服务支撑 hace 9 meses
importData 6002d1a094 导入数据 hace 10 meses
src 8141e1d28c 修改中试平台管理 服务支撑 hace 9 meses
test 9de8eb16b5 init hace 10 meses
.editorconfig 9de8eb16b5 init hace 10 meses
.eslintrc.json 9de8eb16b5 init hace 10 meses
.gitignore 9de8eb16b5 init hace 10 meses
.prettierrc.js 9de8eb16b5 init hace 10 meses
README.md 9de8eb16b5 init hace 10 meses
README.zh-CN.md 9de8eb16b5 init hace 10 meses
bootstrap.js 9de8eb16b5 init hace 10 meses
ecosystem.config.js c0c3e5c9e2 添加pm2文件和本机启动配置文件,本机启动指令 hace 10 meses
jest.config.js 9de8eb16b5 init hace 10 meses
package-lock.json 6002d1a094 导入数据 hace 10 meses
package.json 6002d1a094 导入数据 hace 10 meses
tsconfig.json 9de8eb16b5 init hace 10 meses

README.md

sql项目转换后的注意事项

1.数据库数据类型

1.1 字符串,有长度的使用 character varying; 不加限制的使用 text

1.2 数字使用 integer; 金额使用 money

1.3 时间使用 timestamp without time zone

开始时间与结束时间都分为2个字段 表属性在Column装饰器上添加:

  transformer: { from: value => dayjs(value).format('YYYY-MM-DD HH:mm:ss'), to: value => value } 

用来格式化输出格式

1.4 不能像mongodb一样轻易使用JSON文档模式

  • 因为JSONB数据中,只有精确查询: Array<any>:[1,2,3] JSONB_CONTAINS/JSONB_EXISTS(column, :column)', { column: 1 } object: {test:'123'} JSONB_CONTAINS(column, :val)', { val: { test: '123' } } 导致文档模式查询会变得不可能,所以使用JSONB数据格式的情况,只有准确查询; 将文档模式的设计变成表关联,联查出来