MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / validateParam

Function validateParam

src/main/prepared_statement.cpp:68–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68static void validateParam(const std::string& paramName, Value* newVal, Value* oldVal) {
69 if (newVal->getDataType().getLogicalTypeID() == LogicalTypeID::POINTER &&
70 newVal->getValue<uint8_t*>() != oldVal->getValue<uint8_t*>()) {
71 throw BinderException(std::format(
72 "When preparing the current statement the dataframe passed into parameter "
73 "'{}' was different from the one provided during prepare. Dataframes parameters "
74 "are only used during prepare; please make sure that they are either not passed into "
75 "execute or they match the one passed during prepare.",
76 paramName));
77 }
78}
79
80std::unordered_set<std::string> PreparedStatement::getKnownParameters() {
81 std::unordered_set<std::string> result;

Callers 2

updateParameterMethod · 0.85
setParameterMethod · 0.85

Calls 2

getLogicalTypeIDMethod · 0.80
getDataTypeMethod · 0.80

Tested by

no test coverage detected