-
Notifications
You must be signed in to change notification settings - Fork 88
Expand file tree
/
Copy pathpython_replacement_scan.hpp
More file actions
23 lines (19 loc) · 1012 Bytes
/
python_replacement_scan.hpp
File metadata and controls
23 lines (19 loc) · 1012 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#pragma once
#include "duckdb/main/client_context_state.hpp"
#include "duckdb/common/case_insensitive_map.hpp"
#include "duckdb/parser/tableref.hpp"
#include "duckdb/function/replacement_scan.hpp"
#include "duckdb_python/pybind11/pybind_wrapper.hpp"
namespace duckdb {
struct PythonReplacementScan {
public:
static unique_ptr<TableRef> Replace(ClientContext &client_context, ReplacementScanInput &input,
optional_ptr<ReplacementScanData> data);
//! Try to perform a replacement, returns NULL on error
static unique_ptr<TableRef> TryReplacementObject(const py::object &entry, const string &name,
ClientContext &client_context, bool relation = false);
//! Perform a replacement or throw if it failed
static unique_ptr<TableRef> ReplacementObject(const py::object &entry, const string &name,
ClientContext &client_context, bool relation = false);
};
} // namespace duckdb