csvindex

package
v0.0.0-...-2e58d69 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

This package is still experimental. Don't use.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Index

type Index struct {
	// contains filtered or unexported fields
}

This is a Non-Working Index. Don't use it.

func NewIndex

func NewIndex() *Index

func (*Index) Import

func (i *Index) Import(r io.Reader) (err error)

func (*Index) LookUp

func (i *Index) LookUp(col int, s string, r generic.RandomAccessReader, chain []generic.Transform) (str [][]string, err error)

type IndexWriter

type IndexWriter struct {
	Enc     *msgpack.Encoder
	Indeces []int
}

A Index-Writer. In fact, this is not really an Index. Instead, it is an extract from a Dataset (aka. CSV-Table).

The Index-Writer creates a MSGPACK-stream, that consist of arrays (that are used like tuples).

The format is [ColumnValue,ColumnNumber,ChunkOffset,RecordIndexInChunk].

type object struct{
	_msgpack struct{} `msgpack:",asArray"`
	Content string
	Column  int
	ChunkNo int64
	InChunk int
}

func NewIndexWriter

func NewIndexWriter(w io.Writer, i ...int) *IndexWriter

func (*IndexWriter) AddFrom

func (iw *IndexWriter) AddFrom(r generic.ScanReader, chain []generic.Transform) error

func (*IndexWriter) AddRecord

func (iw *IndexWriter) AddRecord(rec []string, chunkNo int64, inChunk int) error

func (*IndexWriter) AddRecords

func (iw *IndexWriter) AddRecords(recs [][]string, chunkNo int64) error

Jump to

Keyboard shortcuts

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