1 Star 1 Fork 0

bigbase/pg

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
orm.go 1.24 KB
一键复制 编辑 原始数据 按行查看 历史
package orm
import (
"context"
"io"
)
// ColumnScanner is used to scan column values.
type ColumnScanner interface {
// Scan assigns a column value from a row.
//
// An error should be returned if the value can not be stored
// without loss of information.
ScanColumn(colIdx int, colName string, b []byte) error
}
type QueryAppender interface {
Copy() QueryAppender
Query() *Query
AppendQuery(dst []byte) ([]byte, error)
}
type QueryFormatter interface {
FormatQuery(b []byte, query string, params ...interface{}) []byte
}
// DB is a common interface for pg.DB and pg.Tx types.
type DB interface {
Model(model ...interface{}) *Query
Select(model interface{}) error
Insert(model ...interface{}) error
Update(model ...interface{}) error
Delete(model interface{}) error
Exec(query interface{}, params ...interface{}) (Result, error)
ExecOne(query interface{}, params ...interface{}) (Result, error)
Query(coll, query interface{}, params ...interface{}) (Result, error)
QueryOne(model, query interface{}, params ...interface{}) (Result, error)
CopyFrom(r io.Reader, query interface{}, params ...interface{}) (Result, error)
CopyTo(w io.Writer, query interface{}, params ...interface{}) (Result, error)
Context() context.Context
QueryFormatter
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/bigbase/pg.git
git@gitee.com:bigbase/pg.git
bigbase
pg
pg
v6.7.2

搜索帮助