Documentation ¶
Overview ¶
A tiedot collection is made of chunks, each chunk is independent fully featured collection.
Index ¶
- Constants
- func StrHash(thing interface{}) uint64
- type ChunkCol
- func (col *ChunkCol) Close()
- func (col *ChunkCol) Delete(id uint64)
- func (col *ChunkCol) DeserializeAll(template interface{}, fun func() bool)
- func (col *ChunkCol) Flush() (err error)
- func (col *ChunkCol) ForAll(fun func(id uint64, doc map[string]interface{}) bool)
- func (col *ChunkCol) GetPhysicalID(id uint64) (physID uint64, err error)
- func (col *ChunkCol) Insert(doc map[string]interface{}) (id uint64, err error)
- func (col *ChunkCol) Read(id uint64, doc interface{}) error
- func (col *ChunkCol) Update(id uint64, doc map[string]interface{}) (newID uint64, err error)
Constants ¶
View Source
const ( DAT_FILENAME_MAGIC = "_data" // Name of collection data file PK_FILENAME_MAGIC = "_pk" // Name of PK (primary index) file )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ChunkCol ¶
type ChunkCol struct { Number int // Number of the chunk in collection BaseDir string // File system directory path of the chunk Data *chunkfile.ColFile // Collection document data file PK *chunkfile.HashTable // PK hash table }
func (*ChunkCol) DeserializeAll ¶
Deserialize each document into template (pointer to an initialized struct), invoke the function on the deserialized document (Collection Scan).
func (*ChunkCol) ForAll ¶
Deserialize each document and invoke the function on the deserialized document (Collection Scan).
func (*ChunkCol) GetPhysicalID ¶
Return the physical ID of document specified by primary key ID.
Click to show internal directories.
Click to hide internal directories.