Documentation ¶
Index ¶
- type S2DBArrowReader
- func NewS2DBArrowReader(ctx context.Context, conf S2DBArrowReaderConfig) (S2DBArrowReader, error)
- func NewS2DBArrowReaderImpl(ctx context.Context, conf S2DBArrowReaderConfig) (S2DBArrowReader, error)
- func NewS2DBArrowReaderParallelImpl(ctx context.Context, conf S2DBArrowReaderConfig) (S2DBArrowReader, error)
- func NewS2DBServerArrowReaderImpl(ctx context.Context, conf S2DBArrowReaderConfig) (S2DBArrowReader, error)
- type S2DBArrowReaderConfig
- type S2DBArrowReaderImpl
- type S2DBArrowReaderParallelImpl
- type S2DBParallelReadConfig
- type S2DBServerArrowReaderImpl
- type S2SqlDbWrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type S2DBArrowReader ¶
type S2DBArrowReader interface { // GetNextArrowRecordBatch fetches a single arrow.Record from the server // It returns nil as the first part of the result tuple if there are no more rows to fetch // The returned Record must be Release()'d after use. GetNextArrowRecordBatch() (arrow.Record, error) // Close finalizes reading of the query results // It releases all acquired resources Close() error }
S2DBArrowReader provides an API for reading arrow data from the SingleStore database The NewS2DBArrowReader function should be used to create a new instance of the S2DBArrowReader
func NewS2DBArrowReader ¶
func NewS2DBArrowReader(ctx context.Context, conf S2DBArrowReaderConfig) (S2DBArrowReader, error)
NewS2DBArrowReader creates an instance of S2DBArrowReader It sends a query to the database server for execution
func NewS2DBArrowReaderImpl ¶
func NewS2DBArrowReaderImpl(ctx context.Context, conf S2DBArrowReaderConfig) (S2DBArrowReader, error)
func NewS2DBArrowReaderParallelImpl ¶
func NewS2DBArrowReaderParallelImpl(ctx context.Context, conf S2DBArrowReaderConfig) (S2DBArrowReader, error)
func NewS2DBServerArrowReaderImpl ¶
func NewS2DBServerArrowReaderImpl(ctx context.Context, conf S2DBArrowReaderConfig) (S2DBArrowReader, error)
type S2DBArrowReaderConfig ¶
type S2DBArrowReaderConfig struct { // Conn is a sql.DB object which will be used to communicate with the database Conn S2SqlDbWrapper // Query is a SQL query that will be executed Query string // Args are arguments for placeholder parameters in the query Args []interface{} // RecordSize identifies maximum number of rows in the resulting records // By default it is 10000 RecordSize int64 // UseClientConvesion indicates if the data should be converted to Arrow Record // format on the client. For production use, it should be false UseClientConvesion bool // ParallelReadConfig specifies aditional configurations for parallel read // By default it is nil and it means that parallel read is not used ParallelReadConfig *S2DBParallelReadConfig // EnableQueryLogging controls whether the driver should generate debug logs // Debug logs are printed to the standard output EnableQueryLogging bool }
type S2DBArrowReaderImpl ¶
type S2DBArrowReaderImpl struct {
// contains filtered or unexported fields
}
S2DBArrow implements S2DBArrowReader
func (*S2DBArrowReaderImpl) Close ¶
func (s2db *S2DBArrowReaderImpl) Close() error
func (*S2DBArrowReaderImpl) GetNextArrowRecordBatch ¶
func (s2db *S2DBArrowReaderImpl) GetNextArrowRecordBatch() (arrow.Record, error)
type S2DBArrowReaderParallelImpl ¶
type S2DBArrowReaderParallelImpl struct {
// contains filtered or unexported fields
}
func (*S2DBArrowReaderParallelImpl) Close ¶
func (s2db *S2DBArrowReaderParallelImpl) Close() error
func (*S2DBArrowReaderParallelImpl) GetNextArrowRecordBatch ¶
func (s2db *S2DBArrowReaderParallelImpl) GetNextArrowRecordBatch() (arrow.Record, error)
type S2DBParallelReadConfig ¶
type S2DBParallelReadConfig struct { // DatabaseName is a name of the SingleStore database // It is needed to get number of partitions from the database for parallel read DatabaseName string // ChannelSize specifies size of the channel buffer // Channel is used to store references to Arrow Records while reading is happening // and transfer them to the main goroutine // The default value is 10000 ChannelSize int64 // Controls whether to profile the query // Profiling result is printed to the standart output EnableDebugProfiling bool }
type S2DBServerArrowReaderImpl ¶
type S2DBServerArrowReaderImpl struct {
// contains filtered or unexported fields
}
S2DBServerArrowReaderImpl implements S2DBArrowReader
func (*S2DBServerArrowReaderImpl) Close ¶
func (s2db *S2DBServerArrowReaderImpl) Close() error
func (*S2DBServerArrowReaderImpl) GetNextArrowRecordBatch ¶
func (s2db *S2DBServerArrowReaderImpl) GetNextArrowRecordBatch() (arrow.Record, error)
type S2SqlDbWrapper ¶
type S2SqlDbWrapper interface { Stats() sql.DBStats Close() error Conn(ctx context.Context) (*sql.Conn, error) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error) }
S2DB is a utility wrapper around sql.DB, used only by the driver
Source Files ¶
Click to show internal directories.
Click to hide internal directories.