File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -12,13 +12,13 @@ COA核心MySQL数据库组件,包含基本数据模型、缓存数据模型、
1212- ** 功能齐全** 基础数据连接基于[ mysql] ( https://github.com/mysqljs/mysql ) ,SQL查询基于[ knex] ( https://github.com/knex/knex ) 库,注重性能,功能齐全包含原生库所有使用方式
1313- ** 简单轻量** 不超过1000行代码,不依赖于其他第三方库
1414- ** 快捷方便** 基本数据模型自带CRUD操作,无需额外代码
15- - ** 自动缓存** 缓存数据模型能自动处理数据缓存、数据淘汰逻辑 ,缓存基于[ coa-redis] ( https://github.com/coajs/coa-redis )
15+ - ** 自动缓存** 缓存数据模型能自动进行数据的缓存管理(缓存生成、缓存淘汰等逻辑) ,缓存基于[ coa-redis] ( https://github.com/coajs/coa-redis )
1616- ** TypeScript** 全部使用TypeScript书写,类型约束、IDE友好
1717
1818## 组件
1919
20- - 基本数据模型 ` MysqlCache ` 自动实现基本的CRUD等操作
21- - 缓存数据模型 ` MysqlNative ` 在基本数据模型上自动处理数据缓存机制
20+ - 基本数据模型 ` MysqlNative ` 自动实现基本的CRUD等操作
21+ - 缓存数据模型 ` MysqlCache ` 在基本数据模型上接管数据缓存逻辑
2222- 分布式ID ` MysqlUuid ` 超轻量的分布式UUID
2323
2424## 快速开始
@@ -32,7 +32,7 @@ yarn add coa-mysql
3232### 实例配置
3333
3434``` typescript
35- import { MysqlBin } from ' .. '
35+ import { MysqlBin } from ' coa-mysql '
3636
3737// MySQL配置
3838const mysqlConfig = {
@@ -55,7 +55,7 @@ const mysqlBin = new MysqlBin(mysqlConfig)
5555
5656### 基本SQL查询
5757
58- 现在用户表 ` user ` ,表结构如下
58+ 新建用户表 ` user ` ,表结构如下
5959
6060``` shell
6161CREATE TABLE ` user` (
@@ -219,7 +219,7 @@ await User.customMethodForUser()
219219
220220### 缓存数据模型
221221
222- 缓存数据模型基于 [ coa-redis] ( https://www.npmjs.com/package/coa-redis ) 实现快速高效的数据缓存 ,并** 统一对缓存进行管理、维护缓存的生命周期、保证缓存与MySQL数据的一致性**
222+ 基于 [ coa-redis] ( https://www.npmjs.com/package/coa-redis ) 实现快速高效的数据缓存逻辑 ,并** 统一对缓存进行管理、维护缓存的生命周期、保证缓存与MySQL数据的一致性**
223223
224224使用之前需安装 ` coa-redis ` ,使用方法可查看 [ 这里] ( https://github.com/coajs/coa-redis )
225225
You can’t perform that action at this time.
0 commit comments