simdj

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

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

Go to latest
Published: Apr 30, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

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

Reader - JSON record reader for S3Select.

func NewElementReader

func NewElementReader(ch chan simdjson.Object, err *error, args *json.ReaderArgs) *Reader

NewElementReader - creates new JSON reader using readCloser.

func NewReader

func NewReader(readCloser io.ReadCloser, args *json.ReaderArgs) *Reader

NewReader - creates new JSON reader using readCloser.

func NewTapeReaderChan

func NewTapeReaderChan(pj chan simdjson.Stream, args *json.ReaderArgs) *Reader

NewTapeReaderChan will start a reader that will read input from the provided channel.

func (*Reader) Close

func (r *Reader) Close() error

Close - closes underlying reader.

func (*Reader) Read

func (r *Reader) Read(dst sql.Record) (sql.Record, error)

Read - reads single record.

type Record

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

Record - is JSON record.

func NewRecord

func NewRecord(f sql.SelectObjectFormat, obj simdjson.Object) *Record

NewRecord - creates new empty JSON record.

func (*Record) Clone

func (r *Record) Clone(dst sql.Record) sql.Record

Clone the record and if possible use the destination provided.

func (*Record) CloneTo

func (r *Record) CloneTo(dst *json.Record) (sql.Record, error)

CloneTo clones the record to a json Record. Values are only unmashaled on object level.

func (*Record) Get

func (r *Record) Get(name string) (*sql.Value, error)

Get - gets the value for a column name.

func (*Record) Raw

func (r *Record) Raw() (sql.SelectObjectFormat, interface{})

Raw - returns the underlying representation.

func (*Record) Replace

func (r *Record) Replace(k interface{}) error

Replace the underlying buffer of json data.

func (*Record) Reset

func (r *Record) Reset()

Reset the record.

func (*Record) Set

func (r *Record) Set(name string, value *sql.Value) (sql.Record, error)

Set - sets the value for a column name.

func (*Record) WriteCSV

func (r *Record) WriteCSV(writer io.Writer, opts sql.WriteCSVOpts) error

WriteCSV - encodes to CSV data.

func (*Record) WriteJSON

func (r *Record) WriteJSON(writer io.Writer) error

WriteJSON - encodes to JSON data.

Jump to

Keyboard shortcuts

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