1 Star 0 Fork 0

gabbble/app

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
applflyteckeyinfomodel_imp.go 504 Bytes
一键复制 编辑 原始数据 按行查看 历史
haozhiyuan0204 提交于 2023-11-08 14:34 +08:00 . modify
package mysql
import (
"context"
"fmt"
"github.com/zeromicro/go-zero/core/stores/sqlc"
)
func (m *defaultAppLflytekKeyInfoModel) FindOneLatest(ctx context.Context) (*AppLflytekKeyInfo, error) {
query := fmt.Sprintf("select %s from %s order by ctime desc limit 1", appLflytekKeyInfoRows, m.table)
var resp AppLflytekKeyInfo
err := m.conn.QueryRowCtx(ctx, &resp, query)
switch err {
case nil:
return &resp, nil
case sqlc.ErrNotFound:
return nil, ErrNotFound
default:
return nil, err
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/gabbble/app.git
git@gitee.com:gabbble/app.git
gabbble
app
app
9a5bcbd7ccf5

搜索帮助