Documentation
¶
Index ¶
- type Storage
- func (s *Storage[PK, Col]) AddRow(primaryKey PK)
- func (s *Storage[PK, Col]) AddRows(primaryKeys []PK)
- func (s *Storage[PK, Col]) AddRowsWithValues(primaryKeys []PK, values map[Col][]any)
- func (s *Storage[PK, Col]) DelRow(primaryKey PK)
- func (s *Storage[PK, Col]) DelRows(primaryKeys []PK)
- func (s *Storage[PK, Col]) Get(primaryKey PK, col Col) any
- func (s *Storage[PK, Col]) GetRow(primaryKey PK) map[Col]any
- func (s *Storage[PK, Col]) Migrate(target storage.Storage[PK, Col], primaryKes ...PK)
- func (s *Storage[PK, Col]) SetColumn(col Col, defaultGetter func() any)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage[PK, Col comparable] struct { // contains filtered or unexported fields }
Storage 基于列式存储布局的存储器
func New ¶
func New[PK, Col comparable]() *Storage[PK, Col]
func (*Storage[PK, Col]) AddRow ¶
func (s *Storage[PK, Col]) AddRow(primaryKey PK)
AddRow 添加一行以默认值填充的数据
func (*Storage[PK, Col]) AddRows ¶
func (s *Storage[PK, Col]) AddRows(primaryKeys []PK)
AddRows 批量添加数据
func (*Storage[PK, Col]) AddRowsWithValues ¶
AddRowsWithValues 批量添加数据
func (*Storage[PK, Col]) DelRows ¶
func (s *Storage[PK, Col]) DelRows(primaryKeys []PK)
DelRows 批量删除数据
Click to show internal directories.
Click to hide internal directories.