MCPcopy Create free account
hub / github.com/apache/arrow / Create

Method Create

cpp/src/arrow/flight/sql/example/sqlite_statement_batch_reader.cc:88–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86 already_executed_(false) {}
87
88arrow::Result<std::shared_ptr<SqliteStatementBatchReader>>
89SqliteStatementBatchReader::Create(const std::shared_ptr<SqliteStatement>& statement_) {
90 ARROW_RETURN_NOT_OK(statement_->Reset());
91 if (!statement_->parameters().empty()) {
92 // If there are parameters, infer the schema after binding the first row
93 ARROW_RETURN_NOT_OK(statement_->Bind(0, 0));
94 }
95 ARROW_RETURN_NOT_OK(statement_->Step());
96 ARROW_ASSIGN_OR_RAISE(auto schema, statement_->GetSchema());
97
98 std::shared_ptr<SqliteStatementBatchReader> result(
99 new SqliteStatementBatchReader(statement_, schema));
100
101 return result;
102}
103
104arrow::Result<std::shared_ptr<SqliteStatementBatchReader>>
105SqliteStatementBatchReader::Create(const std::shared_ptr<SqliteStatement>& statement,

Callers

nothing calls this directly

Calls 4

StepMethod · 0.80
ResetMethod · 0.45
emptyMethod · 0.45
BindMethod · 0.45

Tested by

no test coverage detected