Documentation ¶
Index ¶
- Constants
- func AsInt64Array(val []byte) []uint64
- func ConvertDTypeToString(dType frames.DType) string
- func DeleteTable(logger logger.Logger, container v3io.Container, path, filter string, ...) error
- func NewContainer(v3ioContext v3io.Context, session *frames.Session, password string, ...) (v3io.Container, error)
- func ProcessPaths(session *frames.Session, path string, addSlash bool) (string, string, error)
- type AsyncItemsCursor
- func (ic *AsyncItemsCursor) All() ([]v3io.Item, error)
- func (ic *AsyncItemsCursor) Err() error
- func (ic *AsyncItemsCursor) GetField(name string) interface{}
- func (ic *AsyncItemsCursor) GetFieldInt(name string) (int, error)
- func (ic *AsyncItemsCursor) GetFieldString(name string) (string, error)
- func (ic *AsyncItemsCursor) GetFields() map[string]interface{}
- func (ic *AsyncItemsCursor) GetItem() v3io.Item
- func (ic *AsyncItemsCursor) Next() bool
- func (ic *AsyncItemsCursor) NextItem() (v3io.Item, error)
- func (ic *AsyncItemsCursor) Release()
- type FileContentIterator
- type FileContentLineIterator
- type FileCursor
- type FilesCursor
- type ItemsCursor
- type OldSchemaField
- type OldV3ioSchema
- func (s *OldV3ioSchema) AddColumn(name string, col frames.Column, nullable bool) error
- func (s *OldV3ioSchema) AddField(name string, val interface{}, nullable bool) error
- func (s *OldV3ioSchema) GetField(name string) (OldSchemaField, error)
- func (s *OldV3ioSchema) UpdateSchema(container v3io.Container, tablePath string, newSchema V3ioSchema) error
- type V3ioSchema
Constants ¶
const ( LongType = "long" DoubleType = "double" StringType = "string" TimeType = "timestamp" BoolType = "boolean" DefaultKeyColumn = "idx" )
Variables ¶
This section is empty.
Functions ¶
func AsInt64Array ¶
AsInt64Array convert v3io blob to Int array
func ConvertDTypeToString ¶
func DeleteTable ¶
func DeleteTable(logger logger.Logger, container v3io.Container, path, filter string, getItemsWorkers int, deleteWorkers int, ignoreMissing bool) error
DeleteTable deletes a table
func NewContainer ¶
Types ¶
type AsyncItemsCursor ¶
type AsyncItemsCursor struct { Cnt int // contains filtered or unexported fields }
AsyncItemsCursor is async item cursor
func NewAsyncItemsCursor ¶
func NewAsyncItemsCursor(container v3io.Container, input *v3io.GetItemsInput, workers int, shardingKeys []string, logger logger.Logger, limit int, partitions []string, sortKeyRangeStart string, sortKeyRangeEnd string) (*AsyncItemsCursor, error)
NewAsyncItemsCursor return new AsyncItemsCursor
func (*AsyncItemsCursor) All ¶
func (ic *AsyncItemsCursor) All() ([]v3io.Item, error)
All returns all items
func (*AsyncItemsCursor) GetField ¶
func (ic *AsyncItemsCursor) GetField(name string) interface{}
GetField returns a field
func (*AsyncItemsCursor) GetFieldInt ¶
func (ic *AsyncItemsCursor) GetFieldInt(name string) (int, error)
GetFieldInt returns a field as int
func (*AsyncItemsCursor) GetFieldString ¶
func (ic *AsyncItemsCursor) GetFieldString(name string) (string, error)
GetFieldString returns a field as string
func (*AsyncItemsCursor) GetFields ¶
func (ic *AsyncItemsCursor) GetFields() map[string]interface{}
GetFields returns all fields
func (*AsyncItemsCursor) GetItem ¶
func (ic *AsyncItemsCursor) GetItem() v3io.Item
GetItem returns item
func (*AsyncItemsCursor) Next ¶
func (ic *AsyncItemsCursor) Next() bool
Next gets the next matching item. this may potentially block as this lazy loads items from the collection
func (*AsyncItemsCursor) NextItem ¶
func (ic *AsyncItemsCursor) NextItem() (v3io.Item, error)
NextItem gets the next matching item. this may potentially block as this lazy loads items from the collection
func (*AsyncItemsCursor) Release ¶
func (ic *AsyncItemsCursor) Release()
Release releases a cursor and its underlying resources
type FileContentIterator ¶ added in v0.7.6
type FileContentIterator struct {
// contains filtered or unexported fields
}
func NewFileContentIterator ¶ added in v0.7.6
func (*FileContentIterator) At ¶ added in v0.7.6
func (iter *FileContentIterator) At() []byte
func (*FileContentIterator) Error ¶ added in v0.7.6
func (iter *FileContentIterator) Error() error
func (*FileContentIterator) Next ¶ added in v0.7.6
func (iter *FileContentIterator) Next() bool
type FileContentLineIterator ¶ added in v0.7.6
type FileContentLineIterator struct {
// contains filtered or unexported fields
}
func NewFileContentLineIterator ¶ added in v0.7.6
func (*FileContentLineIterator) At ¶ added in v0.7.6
func (iter *FileContentLineIterator) At() []byte
func (*FileContentLineIterator) Error ¶ added in v0.7.6
func (iter *FileContentLineIterator) Error() error
func (*FileContentLineIterator) Next ¶ added in v0.7.6
func (iter *FileContentLineIterator) Next() bool
type FileCursor ¶ added in v0.7.9
func NewFilesCursor ¶ added in v0.7.9
func NewFilesCursor(container v3io.Container, input *v3io.GetContainerContentsInput) (FileCursor, error)
type FilesCursor ¶ added in v0.7.9
type FilesCursor struct {
// contains filtered or unexported fields
}
func (*FilesCursor) Err ¶ added in v0.7.9
func (ic *FilesCursor) Err() error
error returns the last error
func (*FilesCursor) GetFilePath ¶ added in v0.7.9
func (ic *FilesCursor) GetFilePath() string
func (*FilesCursor) Next ¶ added in v0.7.9
func (ic *FilesCursor) Next() bool
Next gets the next matching item. this may potentially block as this lazy loads items from the collection
type ItemsCursor ¶
type ItemsCursor interface { Err() error Next() bool GetField(name string) interface{} GetFields() map[string]interface{} }
ItemsCursor iterates over items
type OldSchemaField ¶
type OldSchemaField struct { Name string `json:"name"` Type string `json:"type"` Nullable bool `json:"nullable"` }
OldSchemaField is OldV3ioSchema field
func ContainsField ¶
func ContainsField(fields []OldSchemaField, fieldName string) (bool, OldSchemaField)
type OldV3ioSchema ¶
type OldV3ioSchema struct { Fields []OldSchemaField `json:"fields"` Key string `json:"key"` SortingKey string `json:"sortingKey,omitempty"` HashingBucketNum int `json:"hashingBucketNum"` }
OldV3ioSchema is old v3io schema
func (*OldV3ioSchema) AddField ¶
func (s *OldV3ioSchema) AddField(name string, val interface{}, nullable bool) error
AddField adds a field
func (*OldV3ioSchema) GetField ¶
func (s *OldV3ioSchema) GetField(name string) (OldSchemaField, error)
func (*OldV3ioSchema) UpdateSchema ¶
func (s *OldV3ioSchema) UpdateSchema(container v3io.Container, tablePath string, newSchema V3ioSchema) error
UpdateSchema updates the schema
type V3ioSchema ¶
type V3ioSchema interface { AddColumn(name string, col frames.Column, nullable bool) error AddField(name string, val interface{}, nullable bool) error UpdateSchema(container v3io.Container, tablePath string, newSchema V3ioSchema) error }
V3ioSchema is schema for v3io
func NewSchema ¶
func NewSchema(key string, sortingKey string) V3ioSchema
NewSchema returns a new schema
func NewSchemaWithHashingBuckets ¶ added in v0.8.0
func NewSchemaWithHashingBuckets(key string, sortingKey string, hashingBucketNum int) V3ioSchema
func SchemaFromJSON ¶
func SchemaFromJSON(data []byte) (V3ioSchema, error)
SchemaFromJSON return a schema from JSON data