Skip to content

Commit

Permalink
Beta:新增Values
Browse files Browse the repository at this point in the history
  • Loading branch information
tobycroft committed Mar 7, 2023
1 parent 1150373 commit ca7b835
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion orm_query_interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type IOrmQuery interface {
Get() ([]Data, error)
// 如果你不需要完整的一行,可以使用 value 方法从结果中获取单个值,该方法会直接返回指定列的值:
Value(field string) (v interface{}, err error)
Column(field string) (v interface{}, err error)
Column(field string) (v []interface{}, err error)
// 如果想要获取包含单个列值的数组,可以使用 pluck 方法
// 还可以在返回数组中为列值指定自定义键(该自定义键必须是该表的其它字段列名,否则会报错)
Pluck(field string, fieldKey ...string) (v interface{}, err error)
Expand Down

0 comments on commit ca7b835

Please sign in to comment.