MCPcopy Create free account
hub / github.com/duckdb/duckdb / CheckConversionErrorQuery

Function CheckConversionErrorQuery

test/api/test_pending_with_parameters.cpp:39–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39static void CheckConversionErrorQuery(Connection &con) {
40 // Check query with invalid prepared value
41 duckdb::vector<Value> values = {Value("fawakaaniffoo")};
42 auto pending_result = con.PendingQuery("SELECT COUNT(*) FROM a WHERE i=?", values, true);
43 REQUIRE(!pending_result->HasError());
44 auto result = pending_result->Execute();
45 REQUIRE((result->HasError() && result->GetErrorType() == ExceptionType::CONVERSION));
46}
47
48static void CheckSimpleQueryAfterModification(Connection &con) {
49 duckdb::vector<Value> values = {Value(14)};

Calls 4

ValueClass · 0.50
PendingQueryMethod · 0.45
HasErrorMethod · 0.45
ExecuteMethod · 0.45

Tested by

no test coverage detected