Documentation
¶
Overview ¶
Package server provides a production-grade DuckDB-backed Arrow Flight SQL server.
Index ¶
- Variables
- type BatchGuard
- type Config
- type Engine
- type Server
- func (s *Server) AsFlightServer() flight.FlightServer
- func (s *Server) Close() error
- func (s *Server) ClosePreparedStatement(_ context.Context, req fsql.ActionClosePreparedStatementRequest) error
- func (s *Server) CreatePreparedStatement(ctx context.Context, req fsql.ActionCreatePreparedStatementRequest) (fsql.ActionCreatePreparedStatementResult, error)
- func (s *Server) DoExchange(ctx context.Context, stream flight.FlightService_DoExchangeServer) error
- func (s *Server) DoGetPreparedStatement(ctx context.Context, cmd fsql.PreparedStatementQuery) (*arrow.Schema, <-chan flight.StreamChunk, error)
- func (s *Server) DoGetStatement(ctx context.Context, ticket fsql.StatementQueryTicket) (*arrow.Schema, <-chan flight.StreamChunk, error)
- func (s *Server) DoPutCommandStatementIngest(ctx context.Context, cmd fsql.StatementIngest, reader flight.MessageReader) (int64, error)
- func (s *Server) DoPutCommandStatementUpdate(ctx context.Context, cmd fsql.StatementUpdate) (int64, error)
- func (s *Server) DoPutPreparedStatementQuery(_ context.Context, cmd fsql.PreparedStatementQuery, ...) ([]byte, error)
- func (s *Server) GetFlightInfoPreparedStatement(ctx context.Context, cmd fsql.PreparedStatementQuery, ...) (*flight.FlightInfo, error)
- func (s *Server) GetFlightInfoStatement(ctx context.Context, cmd fsql.StatementQuery, desc *flight.FlightDescriptor) (*flight.FlightInfo, error)
- func (s *Server) GetSchemaPreparedStatement(ctx context.Context, cmd fsql.PreparedStatementQuery, ...) (*flight.SchemaResult, error)
- func (s *Server) GetSchemaStatement(ctx context.Context, cmd fsql.StatementQuery, _ *flight.FlightDescriptor) (*flight.SchemaResult, error)
- func (s *Server) Shutdown(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEmptyQuery = status.Error(codes.InvalidArgument, "empty query provided") ErrNotFound = status.Error(codes.NotFound, "statement handle not found or expired") ErrInternal = status.Error(codes.Internal, "internal server error") ErrCancelled = status.Error(codes.Canceled, "execution cancelled by client") ErrInvalidSQL = status.Error(codes.InvalidArgument, "invalid SQL statement") )
View Source
var NewBatchGuard = engine.NewBatchGuard
NewBatchGuard is an alias for the engine's NewBatchGuard for backward compatibility.
Functions ¶
This section is empty.
Types ¶
type BatchGuard ¶ added in v0.15.0
type BatchGuard = engine.BatchGuard
BatchGuard is an alias for the engine's BatchGuard for backward compatibility.
type Server ¶
type Server struct {
fsql.BaseServer
Engine Engine
Alloc memory.Allocator
Logger *slog.Logger
Telemetry telemetry.Publisher
// contains filtered or unexported fields
}
func (*Server) AsFlightServer ¶
func (s *Server) AsFlightServer() flight.FlightServer
func (*Server) ClosePreparedStatement ¶
func (*Server) CreatePreparedStatement ¶
func (s *Server) CreatePreparedStatement( ctx context.Context, req fsql.ActionCreatePreparedStatementRequest, ) (fsql.ActionCreatePreparedStatementResult, error)
func (*Server) DoExchange ¶
func (s *Server) DoExchange( ctx context.Context, stream flight.FlightService_DoExchangeServer, ) error
DoExchange operates outside the BaseServer routing and allows us to bypass channels entirely for true, zero-copy, synchronous streaming.
func (*Server) DoGetPreparedStatement ¶
func (s *Server) DoGetPreparedStatement( ctx context.Context, cmd fsql.PreparedStatementQuery, ) (*arrow.Schema, <-chan flight.StreamChunk, error)
func (*Server) DoGetStatement ¶
func (s *Server) DoGetStatement( ctx context.Context, ticket fsql.StatementQueryTicket, ) (*arrow.Schema, <-chan flight.StreamChunk, error)
func (*Server) DoPutCommandStatementIngest ¶ added in v0.21.0
func (s *Server) DoPutCommandStatementIngest( ctx context.Context, cmd fsql.StatementIngest, reader flight.MessageReader, ) (int64, error)
func (*Server) DoPutCommandStatementUpdate ¶
func (*Server) DoPutPreparedStatementQuery ¶
func (s *Server) DoPutPreparedStatementQuery( _ context.Context, cmd fsql.PreparedStatementQuery, reader flight.MessageReader, _ flight.MetadataWriter, ) ([]byte, error)
func (*Server) GetFlightInfoPreparedStatement ¶
func (s *Server) GetFlightInfoPreparedStatement( ctx context.Context, cmd fsql.PreparedStatementQuery, desc *flight.FlightDescriptor, ) (*flight.FlightInfo, error)
func (*Server) GetFlightInfoStatement ¶
func (s *Server) GetFlightInfoStatement( ctx context.Context, cmd fsql.StatementQuery, desc *flight.FlightDescriptor, ) (*flight.FlightInfo, error)
func (*Server) GetSchemaPreparedStatement ¶
func (s *Server) GetSchemaPreparedStatement( ctx context.Context, cmd fsql.PreparedStatementQuery, _ *flight.FlightDescriptor, ) (*flight.SchemaResult, error)
func (*Server) GetSchemaStatement ¶
func (s *Server) GetSchemaStatement( ctx context.Context, cmd fsql.StatementQuery, _ *flight.FlightDescriptor, ) (*flight.SchemaResult, error)
Click to show internal directories.
Click to hide internal directories.