(ctx context.Context, cmd flightsql.GetTables)
| 346 | return &flight.FlightInfo{ |
| 347 | Endpoint: []*flight.FlightEndpoint{{Ticket: &flight.Ticket{Ticket: tkt}}}, |
| 348 | FlightDescriptor: desc, |
| 349 | TotalRecords: -1, |
| 350 | TotalBytes: -1, |
| 351 | }, nil |
| 352 | } |
| 353 | |
| 354 | func (s *SQLiteFlightSQLServer) DoGetStatement(ctx context.Context, cmd flightsql.StatementQueryTicket) (*arrow.Schema, <-chan flight.StreamChunk, error) { |
| 355 | txnid, query, err := decodeTransactionQuery(cmd.GetStatementHandle()) |
| 356 | if err != nil { |
| 357 | return nil, nil, err |
| 358 | } |
| 359 | if txnid != "" { |
| 360 | return nil, nil, fmt.Errorf("transactions not yet supported with DuckDB") |
| 361 | } |
| 362 | if s.provider != nil { |
| 363 | return s.managedStatelessQuery(ctx, query) |
| 364 | } |
| 365 | |
| 366 | // var db dbQueryCtx = s.db |
| 367 | // if txnid != "" { |
| 368 | // tx, loaded := s.openTransactions.Load(txnid) |
| 369 | // if !loaded { |
| 370 | // return nil, nil, fmt.Errorf("%w: invalid transaction id specified: %s", arrow.ErrInvalid, txnid) |
| 371 | // } |
| 372 | // db = tx.(*sql.Tx) |
| 373 | // } |
| 374 | |
| 375 | return doGetQueryWithInitializer(ctx, s.initializeStorage, s.db, query, nil) |
| 376 | } |
| 377 | |
| 378 | func (s *SQLiteFlightSQLServer) GetFlightInfoCatalogs(_ context.Context, desc *flight.FlightDescriptor) (*flight.FlightInfo, error) { |
| 379 | return s.flightInfoForCommand(desc, schema_ref.Catalogs), nil |
| 380 | } |
| 381 | |
| 382 | func (s *SQLiteFlightSQLServer) DoGetCatalogs(context.Context) (*arrow.Schema, <-chan flight.StreamChunk, error) { |
| 383 | // https://www.sqlite.org/cli.html |
nothing calls this directly
no test coverage detected