Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
kesonan committed Jun 5, 2023
1 parent a190428 commit 6c8c641
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/tutorials/mysql/cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (cc CachedConn) QueryRowCtx(ctx context.Context, v any, key string, query Q
```
入参说明:
- ctx: context
- v: any 用于接受查询到的数据,需要传人指针
- v: any 用于接受查询到的数据,需要传入指针
- key: string redis 中的缓存key,会根据这个key到缓存中查询数据;也会将查询到的数据写入到这个缓存的key 中。
- query: QueryCtxFn 真实的查询方式,如果缓存中没有,将会执行这个查询方式。

Expand All @@ -75,7 +75,7 @@ func (cc CachedConn) QueryRowIndexCtx(ctx context.Context, v any, key string,
```
入参说明:
- ctx: context
- v: any 用于接受查询到的数据,需要传人指针
- v: any 用于接受查询到的数据,需要传入指针
- key: string redis 中的缓存key,会根据这个key到缓存中查询数据;也会将查询到的数据写入到这个缓存的key 中。
- keyer: func 需要根据查询到的对象返回对应的主键。
- indexQuery: IndexQueryCtxFn 索引查询方法
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/mysql/curd.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ var conn sqlx.SqlConn // should be created by NewConn
r, err := conn.ExecCtx(context.Background(), "delete from user where `id` = ?", 1)
```

一般我们用于输入的参数都是使用 ? 占位,接着通过 args 传人,这样可以有效防止 sql 注入等问题。
一般我们用于输入的参数都是使用 ? 占位,接着通过 args 传入,这样可以有效防止 sql 注入等问题。

本个方法如果执行的sql 出现错误,也将会触发熔断。并且会有一定机制在服务恢复正常之后自动放行。详情见熔断。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func (cc CachedConn) QueryRowCtx(ctx context.Context, v any, key string, query Q
```
入参说明:
- ctx: context
- v: any 用于接受查询到的数据,需要传人指针
- v: any 用于接受查询到的数据,需要传入指针
- key: string redis 中的缓存key,会根据这个key到缓存中查询数据;也会将查询到的数据写入到这个缓存的key 中。
- query: QueryCtxFn 真实的查询方式,如果缓存中没有,将会执行这个查询方式。

Expand All @@ -73,7 +73,7 @@ func (cc CachedConn) QueryRowIndexCtx(ctx context.Context, v any, key string,
```
入参说明:
- ctx: context
- v: any 用于接受查询到的数据,需要传人指针
- v: any 用于接受查询到的数据,需要传入指针
- key: string redis 中的缓存key,会根据这个key到缓存中查询数据;也会将查询到的数据写入到这个缓存的key 中。
- keyer: func 需要根据查询到的对象返回对应的主键。
- indexQuery: IndexQueryCtxFn 索引查询方法
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ var conn sqlx.SqlConn // should be created by NewConn
r, err := conn.ExecCtx(context.Background(), "delete from user where `id` = ?", 1)
```

一般我们用于输入的参数都是使用 ? 占位,接着通过 args 传人,这样可以有效防止 sql 注入等问题。
一般我们用于输入的参数都是使用 ? 占位,接着通过 args 传入,这样可以有效防止 sql 注入等问题。

本个方法如果执行的sql 出现错误,也将会触发熔断。并且会有一定机制在服务恢复正常之后自动放行。详情见熔断。

Expand Down

0 comments on commit 6c8c641

Please sign in to comment.