Skip to content

Commit

Permalink
example
Browse files Browse the repository at this point in the history
  • Loading branch information
hulutech-web committed Dec 25, 2024
1 parent 7978d0b commit b74fae3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,15 @@ db.WhereBetween("users","created_at", `2024-08-22 00:00:00`, `2024-08-23 23:59:5
- 选择orm菜单,进入orm tinker环境 // 2-上下箭头选择选项,回车进入
- 输入命令:``shebang`` // 进入shebang多行命令行模式
- 进入多行语法环境模式 // 3-进入go 语言环境
```go

```go
users := []models.User{} //4-编写完成后回车
query.Model(&models.User{}).Where("name LIKE ?", "%市场%").Find(&users) //5-编写完成后回车
:save //6-输入:save 后回车保存查看执行结果

user:=models.User{} //1-编写完成后回车
query.Model(&models.User{}).Where("name LIKE ?", "%%").FindOne(&user) //2-编写完成后回车
:save //3-输入:save 后回车保存查看执行结果
```
```

#### 文件扫描,tinker 环境下,扩展会观察app/models下的模型文件,当有变化时,会自动执行makefile文件,这个过程需要一定时间,请耐心等待

0 comments on commit b74fae3

Please sign in to comment.