data

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

README

data

数据存储对象 data access object

  • MySQL
  • PostgreSQL
  • ...

Documentation

Overview

Package data Code generated by ikaiguang. <https://github.com/ikaiguang>

Package data Code generated by ikaiguang. <https://github.com/ikaiguang>

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNodeIdData

func NewNodeIdData(logger log.Logger, dbConn *gorm.DB) datarepos.NodeIdDataRepo

NewNodeIdData new data repo

func NewNodeSerialData

func NewNodeSerialData(logger log.Logger, dbConn *gorm.DB) datarepos.NodeSerialDataRepo

NewNodeSerialData new data repo

Types

type NodeIdSlice

type NodeIdSlice []*po.NodeId

NodeIdSlice 表切片

func (*NodeIdSlice) ConflictActionForMySQL

func (s *NodeIdSlice) ConflictActionForMySQL() (req *gormpkg.BatchInsertConflictActionReq)

ConflictActionForMySQL 更新冲突时的操作

func (*NodeIdSlice) ConflictActionForPostgres

func (s *NodeIdSlice) ConflictActionForPostgres() (req *gormpkg.BatchInsertConflictActionReq)

ConflictActionForPostgres 更新冲突时的操作

func (*NodeIdSlice) InsertColumns

func (s *NodeIdSlice) InsertColumns() (columnList []string, placeholder string)

InsertColumns 批量入库的列

func (*NodeIdSlice) InsertValues

func (s *NodeIdSlice) InsertValues(args *gormpkg.BatchInsertValueArgs) (prepareData []interface{}, placeholderSlice []string)

InsertValues 批量入库的值

func (*NodeIdSlice) Len

func (s *NodeIdSlice) Len() int

Len 长度

func (*NodeIdSlice) TableName

func (s *NodeIdSlice) TableName() string

TableName 表名

func (*NodeIdSlice) UpdateColumns

func (s *NodeIdSlice) UpdateColumns() (columnList []string)

UpdateColumns 批量入库的列

type NodeSerialSlice

type NodeSerialSlice []*po.NodeSerial

NodeSerialSlice 表切片

func (*NodeSerialSlice) ConflictActionForMySQL

func (s *NodeSerialSlice) ConflictActionForMySQL() (req *gormpkg.BatchInsertConflictActionReq)

ConflictActionForMySQL 更新冲突时的操作

func (*NodeSerialSlice) ConflictActionForPostgres

func (s *NodeSerialSlice) ConflictActionForPostgres() (req *gormpkg.BatchInsertConflictActionReq)

ConflictActionForPostgres 更新冲突时的操作

func (*NodeSerialSlice) InsertColumns

func (s *NodeSerialSlice) InsertColumns() (columnList []string, placeholder string)

InsertColumns 批量入库的列

func (*NodeSerialSlice) InsertValues

func (s *NodeSerialSlice) InsertValues(args *gormpkg.BatchInsertValueArgs) (prepareData []interface{}, placeholderSlice []string)

InsertValues 批量入库的值

func (*NodeSerialSlice) Len

func (s *NodeSerialSlice) Len() int

Len 长度

func (*NodeSerialSlice) TableName

func (s *NodeSerialSlice) TableName() string

TableName 表名

func (*NodeSerialSlice) UpdateColumns

func (s *NodeSerialSlice) UpdateColumns() (columnList []string)

UpdateColumns 批量入库的列

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL