hailaz
f565a347c4
fix(database/gdb): Fix GetArray return type and add Bools method ( #4452 )
...
Change the return type of the GetArray method to Array for consistency
in data structure. Introduce a new Bools method to convert Vars to a
slice of bools, along with corresponding test cases to validate the
functionality.
```go
// 改进前
res, _ := db.Model(table).Fields("id").Array()
ids := make([]int64, 0, len(res))
for _, v := range res {
ids = append(ids, v.Int64())
}
g.Dump(ids)
// 改进后
res, _ := db.Model(table).Fields("id").Array()
ids := res.Int64s()
g.Dump(ids)
```
2025-09-28 17:08:37 +08:00
..
2021-09-23 19:29:20 +08:00
2025-03-06 23:04:26 +08:00
2025-09-18 16:21:02 +08:00
2024-12-01 23:47:51 +08:00
2022-03-21 21:17:48 +08:00
2024-03-24 21:18:30 +08:00
2025-08-28 16:53:19 +08:00
2024-06-25 21:11:36 +08:00
2025-09-01 15:33:50 +08:00
2025-08-28 16:53:19 +08:00
2025-08-28 16:53:19 +08:00
2024-05-22 21:14:43 +08:00
2025-09-28 17:08:37 +08:00
2022-09-26 22:11:13 +08:00
2025-08-28 16:53:19 +08:00
2022-09-26 22:11:13 +08:00
2025-08-29 10:32:30 +08:00
2025-08-28 16:53:19 +08:00
2025-08-28 16:53:19 +08:00
2025-08-28 16:53:19 +08:00
2025-08-28 16:53:19 +08:00
2025-08-28 16:53:19 +08:00
2025-08-28 16:53:19 +08:00
2025-08-28 16:53:19 +08:00
2025-08-28 16:53:19 +08:00
2025-08-28 16:53:19 +08:00
2025-08-28 16:53:19 +08:00
2023-11-20 20:47:26 +08:00
2021-01-17 21:46:25 +08:00
2022-11-01 20:12:21 +08:00
2025-08-28 16:53:19 +08:00
2025-09-28 17:08:37 +08:00
2024-12-09 23:12:20 +08:00
2025-08-28 16:53:19 +08:00
2024-12-07 14:01:31 +08:00
2025-08-28 16:53:19 +08:00
2025-08-28 16:53:19 +08:00
2025-08-28 16:53:19 +08:00
2025-08-28 16:53:19 +08:00
2025-08-28 16:53:19 +08:00
2025-08-28 16:53:19 +08:00
2025-08-28 16:53:19 +08:00
2025-08-28 16:53:19 +08:00
2023-09-04 21:23:46 +08:00
2022-02-16 00:26:06 +08:00
2025-08-28 16:53:19 +08:00
2025-08-28 16:53:19 +08:00
2025-08-29 10:32:30 +08:00
2025-09-28 17:08:37 +08:00
2025-09-18 16:21:02 +08:00
2025-09-18 16:21:02 +08:00
2025-08-22 15:29:16 +08:00
2025-03-06 23:04:26 +08:00
2025-09-28 17:08:37 +08:00