Documentation ¶
Index ¶
- func BatchInsert[T any](db *gorm.DB, table string, values []*T) (int64, error)
- func Delete[T any](db *gorm.DB, table string, condition map[string]interface{}) (int64, error)
- func ExecuteRaw(db *gorm.DB, raw string, values ...interface{}) error
- func Insert[T any](db *gorm.DB, table string, value *T) (int64, error)
- func IsNotFoundErr(err error) bool
- func JSONArray(v interface{}, isNil bool) (driver.Value, error)
- func JSONScan(value, v interface{}) error
- func Select[T any](db *gorm.DB, table string, condition map[string]interface{}) ([]T, error)
- func SelectAll[T any](data T, prefix ...string) string
- func SelectById[T any](db *gorm.DB, table string, id int64, columns ...string) (T, error)
- func SelectPluck[T any, K any](db *gorm.DB, table string, condition map[string]interface{}, column string) ([]K, error)
- func SelectRaw[T any](db *gorm.DB, raw string, values ...interface{}) ([]T, error)
- func Update[T any](db *gorm.DB, table string, condition map[string]interface{}, ...) (int64, error)
- type SecTimestamp
- type Strings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BatchInsert ¶ added in v1.0.32
func ExecuteRaw ¶ added in v1.0.32
func IsNotFoundErr ¶ added in v1.0.1
func JSONScan ¶ added in v1.0.32
func JSONScan(value, v interface{}) error
JSONScan parses the JSON-encoded data and stores the result in the value pointed to by v.
func SelectById ¶ added in v1.0.32
func SelectPluck ¶ added in v1.0.32
Types ¶
type SecTimestamp ¶
type SecTimestamp int64
SecTimestamp 用于mysql的秒时间戳类型
func NewSecTimestamp ¶
func NewSecTimestamp(t time.Time) SecTimestamp
func (*SecTimestamp) Scan ¶
func (s *SecTimestamp) Scan(src interface{}) error
func (*SecTimestamp) Time ¶
func (s *SecTimestamp) Time() time.Time
Click to show internal directories.
Click to hide internal directories.