json

package
v0.40.4 Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ReadBufSize = 256 * 1024
View Source
var WriteBufSize = 256 * 1024

Functions

This section is empty.

Types

type JSONReader

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

func NewJSONReader

func NewJSONReader(vrw types.ValueReadWriter, r io.ReadCloser, sch schema.Schema) (*JSONReader, error)

func OpenJSONReader

func OpenJSONReader(vrw types.ValueReadWriter, path string, fs filesys.ReadableFS, sch schema.Schema) (*JSONReader, error)

func (*JSONReader) Close

func (r *JSONReader) Close(ctx context.Context) error

Close should release resources being held

func (*JSONReader) GetSchema

func (r *JSONReader) GetSchema() schema.Schema

GetSchema gets the schema of the rows that this reader will return

func (*JSONReader) ReadRow

func (r *JSONReader) ReadRow(ctx context.Context) (row.Row, error)

func (*JSONReader) ReadSqlRow

func (r *JSONReader) ReadSqlRow(ctx context.Context) (sql.Row, error)

func (*JSONReader) VerifySchema

func (r *JSONReader) VerifySchema(sch schema.Schema) (bool, error)

VerifySchema checks that the incoming schema matches the schema from the existing table

type JSONWriter

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

func NewJSONWriter

func NewJSONWriter(wr io.WriteCloser, outSch schema.Schema) (*JSONWriter, error)

func (*JSONWriter) Close

func (jsonw *JSONWriter) Close(ctx context.Context) error

Close should flush all writes, release resources being held

func (*JSONWriter) GetSchema

func (jsonw *JSONWriter) GetSchema() schema.Schema

func (*JSONWriter) WriteRow

func (jsonw *JSONWriter) WriteRow(ctx context.Context, r row.Row) error

WriteRow will write a row to a table

func (*JSONWriter) WriteSqlRow

func (jsonw *JSONWriter) WriteSqlRow(ctx context.Context, row sql.Row) error

Jump to

Keyboard shortcuts

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