This commit is contained in:
2023-02-15 22:17:14 +08:00
parent c5bf4c46e4
commit acc610280e
7 changed files with 178 additions and 22 deletions
+15 -1
View File
@@ -86,7 +86,8 @@ extern "C" int __DLLEXPORT__ binary_info() {
#endif
}
__AQEXPORT__(bool) have_hge(){
__AQEXPORT__(bool)
have_hge() {
#if defined(__MONETDB_CONN_H__)
return Server::havehge();
#else
@@ -94,6 +95,19 @@ __AQEXPORT__(bool) have_hge(){
#endif
}
__AQEXPORT__(StoredProcedure)
get_procedure(Context* cxt, const char* name) {
auto res = cxt->stored_proc.find(name);
if (res == cxt->stored_proc.end())
return { .cnt = 0,
.postproc_modules = 0,
.queries = nullptr,
.name = nullptr,
.__rt_loaded_modules = nullptr
};
return res->second;
}
using prt_fn_t = char* (*)(void*, char*);
// This function contains heap allocations, free after use