mirror of
https://gitee.com/johng/gf.git
synced 2024-12-02 04:07:47 +08:00
parent
aa4dca11f0
commit
6863928b06
@ -456,6 +456,7 @@ func (md *Model) All() (Result, error) {
|
|||||||
|
|
||||||
// 链式操作,查询单条记录
|
// 链式操作,查询单条记录
|
||||||
func (md *Model) One() (Record, error) {
|
func (md *Model) One() (Record, error) {
|
||||||
|
md.limit = 1
|
||||||
list, err := md.All()
|
list, err := md.All()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
Loading…
Reference in New Issue
Block a user