duckdb 0.3.3-dev452.0 → 0.3.3-dev477.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/duckdb.hpp CHANGED
@@ -11,8 +11,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
11
11
  #pragma once
12
12
  #define DUCKDB_AMALGAMATION 1
13
13
  #define DUCKDB_AMALGAMATION_EXTENDED 1
14
- #define DUCKDB_SOURCE_ID "079877f47"
15
- #define DUCKDB_VERSION "v0.3.3-dev452"
14
+ #define DUCKDB_SOURCE_ID "660ba3a6e"
15
+ #define DUCKDB_VERSION "v0.3.3-dev477"
16
16
  //===----------------------------------------------------------------------===//
17
17
  // DuckDB
18
18
  //
@@ -2,6 +2,7 @@
2
2
  #define NODE_ADDON_API_DISABLE_DEPRECATED
3
3
  #include <napi.h>
4
4
  #include <queue>
5
+ #include <unordered_map>
5
6
 
6
7
  #include "duckdb.hpp"
7
8
 
@@ -76,6 +77,11 @@ private:
76
77
  static Napi::FunctionReference constructor;
77
78
  };
78
79
 
80
+ struct JSArgs;
81
+ void DuckDBNodeUDFLauncher(Napi::Env env, Napi::Function jsudf, nullptr_t *, JSArgs *data);
82
+
83
+ typedef Napi::TypedThreadSafeFunction<nullptr_t, JSArgs, DuckDBNodeUDFLauncher> DuckDBNodeUDFFUnction;
84
+
79
85
  class Connection : public Napi::ObjectWrap<Connection> {
80
86
  public:
81
87
  Connection(const Napi::CallbackInfo &info);
@@ -85,6 +91,8 @@ public:
85
91
  public:
86
92
  Napi::Value Prepare(const Napi::CallbackInfo &info);
87
93
  Napi::Value Exec(const Napi::CallbackInfo &info);
94
+ Napi::Value Register(const Napi::CallbackInfo &info);
95
+ Napi::Value Unregister(const Napi::CallbackInfo &info);
88
96
 
89
97
  static bool HasInstance(Napi::Value val) {
90
98
  Napi::Env env = val.Env();
@@ -99,6 +107,7 @@ public:
99
107
  static Napi::FunctionReference constructor;
100
108
  std::unique_ptr<duckdb::Connection> connection;
101
109
  Database *database_ref;
110
+ std::unordered_map<std::string, DuckDBNodeUDFFUnction> udfs;
102
111
  };
103
112
 
104
113
  struct StatementParam;