integrations

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PostgresRecordReader

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

PostgresRecordReader reads records from a PostgreSQL table.

func (*PostgresRecordReader) Close

func (r *PostgresRecordReader) Close() error

Close releases resources associated with the PostgresRecordReader.

func (*PostgresRecordReader) Read

func (r *PostgresRecordReader) Read() (arrow.Record, error)

Read reads the next record from the PostgreSQL table.

func (*PostgresRecordReader) Schema

func (r *PostgresRecordReader) Schema() *arrow.Schema

Schema returns the schema of the records being read.

type PostgresSink

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

PostgresSink handles writing records to a PostgreSQL database using ADBC.

func NewPostgresSink

func NewPostgresSink(ctx context.Context, dbURL string) (*PostgresSink, error)

NewPostgresSink creates a new PostgresSink with an open ADBC connection.

func (*PostgresSink) Close

func (p *PostgresSink) Close() error

Close closes the ADBC connection associated with PostgresSink.

func (*PostgresSink) IngestToPostgres

func (p *PostgresSink) IngestToPostgres(ctx context.Context, tableName string, schema *arrow.Schema, record arrow.Record) error

IngestToPostgres ingests records from an arrow.Record into the specified PostgreSQL table.

type PostgresSource

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

PostgresSource handles connection to a PostgreSQL database using ADBC.

func NewPostgresSource

func NewPostgresSource(ctx context.Context, dbURL string) (*PostgresSource, error)

NewPostgresSource creates a new PostgresSource with an open ADBC connection.

func (*PostgresSource) Close

func (p *PostgresSource) Close() error

Close closes the ADBC connection associated with PostgresSource.

func (*PostgresSource) GetPostgresRecordReader

func (p *PostgresSource) GetPostgresRecordReader(ctx context.Context, tableName string) (*PostgresRecordReader, error)

GetPostgresRecordReader creates a PostgresRecordReader for the specified table.

type SingleRecordReader

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

SingleRecordReader is a custom RecordReader that wraps a single arrow.Record.

func NewSingleRecordReader

func NewSingleRecordReader(record arrow.Record) *SingleRecordReader

NewSingleRecordReader creates a new SingleRecordReader.

func (*SingleRecordReader) Close

func (r *SingleRecordReader) Close() error

Close releases resources associated with the SingleRecordReader.

func (*SingleRecordReader) Err

func (r *SingleRecordReader) Err() error

Err always returns nil as there is no error state in this simple reader.

func (*SingleRecordReader) Next

func (r *SingleRecordReader) Next() bool

Next advances to the next record (in this case, only one record is available).

func (*SingleRecordReader) Record

func (r *SingleRecordReader) Record() arrow.Record

Record returns the current record.

func (*SingleRecordReader) Release

func (r *SingleRecordReader) Release()

Release releases resources associated with the reader.

func (*SingleRecordReader) Retain

func (r *SingleRecordReader) Retain()

Retain increases the reference count of the record.

func (*SingleRecordReader) Schema

func (r *SingleRecordReader) Schema() *arrow.Schema

Schema returns the schema of the record.

Jump to

Keyboard shortcuts

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