Documentation ¶
Overview ¶
Package ds exposes the qri dataset document model into skylark
Index ¶
- type Dataset
- func (d *Dataset) Dataset() *dataset.Dataset
- func (d *Dataset) GetBody(thread *skylark.Thread, _ *skylark.Builtin, args skylark.Tuple, ...) (skylark.Value, error)
- func (d *Dataset) Infile() cafs.File
- func (d *Dataset) Methods() *skylarkstruct.Struct
- func (d *Dataset) SetBody(thread *skylark.Thread, _ *skylark.Builtin, args skylark.Tuple, ...) (skylark.Value, error)
- func (d *Dataset) SetMeta(thread *skylark.Thread, _ *skylark.Builtin, args skylark.Tuple, ...) (skylark.Value, error)
- func (d *Dataset) SetSchema(thread *skylark.Thread, _ *skylark.Builtin, args skylark.Tuple, ...) (skylark.Value, error)
- type EntryReader
- type SkylarkEntryWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dataset ¶
type Dataset struct {
// contains filtered or unexported fields
}
Dataset is a qri dataset skylark type
func NewDataset ¶
NewDataset creates a dataset object
func (*Dataset) GetBody ¶
func (d *Dataset) GetBody(thread *skylark.Thread, _ *skylark.Builtin, args skylark.Tuple, kwargs []skylark.Tuple) (skylark.Value, error)
GetBody returns the body of the dataset we're transforming
func (*Dataset) Methods ¶
func (d *Dataset) Methods() *skylarkstruct.Struct
Methods exposes dataset methods as skylark values
func (*Dataset) SetBody ¶
func (d *Dataset) SetBody(thread *skylark.Thread, _ *skylark.Builtin, args skylark.Tuple, kwargs []skylark.Tuple) (skylark.Value, error)
SetBody assigns the dataset body
type EntryReader ¶
type EntryReader struct {
// contains filtered or unexported fields
}
EntryReader implements the dsio.EntryReader interface for skylark.Iterable's
func NewEntryReader ¶
func NewEntryReader(st *dataset.Structure, iter skylark.Iterable) *EntryReader
NewEntryReader creates a new Entry Reader
func (*EntryReader) ReadEntry ¶
func (r *EntryReader) ReadEntry() (e dsio.Entry, err error)
ReadEntry reads one entry from the reader
func (*EntryReader) Structure ¶
func (r *EntryReader) Structure() *dataset.Structure
Structure gives this reader's structure
type SkylarkEntryWriter ¶
SkylarkEntryWriter creates a skylark.Value as an EntryWriter
func NewSkylarkEntryWriter ¶
func NewSkylarkEntryWriter(st *dataset.Structure) (*SkylarkEntryWriter, error)
NewSkylarkEntryWriter returns a new SkylarkEntryWriter
func (*SkylarkEntryWriter) Structure ¶
func (w *SkylarkEntryWriter) Structure() *dataset.Structure
Structure returns the EntryWriter's dataset structure
func (*SkylarkEntryWriter) Value ¶
func (w *SkylarkEntryWriter) Value() skylark.Value
Value returns the underlying skylark.Value
func (*SkylarkEntryWriter) WriteEntry ¶
func (w *SkylarkEntryWriter) WriteEntry(ent dsio.Entry) error
WriteEntry adds an entry to the underlying skylark.Value