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

Function csv___WriteOptions__initialize

r/src/csv.cpp:28–41  ·  view source on GitHub ↗

[[arrow::export]]

Source from the content-addressed store, hash-verified

26
27// [[arrow::export]]
28std::shared_ptr<arrow::csv::WriteOptions> csv___WriteOptions__initialize(
29 cpp11::list options) {
30 auto res =
31 std::make_shared<arrow::csv::WriteOptions>(arrow::csv::WriteOptions::Defaults());
32 res->include_header = cpp11::as_cpp<bool>(options["include_header"]);
33 res->batch_size = cpp11::as_cpp<int>(options["batch_size"]);
34 res->delimiter = cpp11::as_cpp<char>(options["delimiter"]);
35 res->null_string = cpp11::as_cpp<std::string>(options["null_string"]);
36 res->io_context = MainRThread::GetInstance().CancellableIOContext();
37 res->eol = cpp11::as_cpp<std::string>(options["eol"]);
38 res->quoting_style =
39 cpp11::as_cpp<enum arrow::csv::QuotingStyle>(options["quoting_style"]);
40 return res;
41}
42
43// [[arrow::export]]
44std::shared_ptr<arrow::csv::ReadOptions> csv___ReadOptions__initialize(

Callers 1

Calls 2

CancellableIOContextMethod · 0.80
DefaultsFunction · 0.50

Tested by

no test coverage detected