duckdb 0.4.1-dev78.0 → 0.4.1-dev89.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "duckdb",
3
3
  "main": "./lib/duckdb.js",
4
- "version": "0.4.1-dev78.0",
4
+ "version": "0.4.1-dev89.0",
5
5
  "description": "DuckDB node.js API",
6
6
  "gypfile": true,
7
7
  "dependencies": {
package/src/duckdb.cpp CHANGED
@@ -17291,12 +17291,12 @@ public:
17291
17291
 
17292
17292
  #include <cstdint>
17293
17293
  #include <cstdio>
17294
+ #include <sys/stat.h>
17294
17295
 
17295
17296
  #ifndef _WIN32
17296
17297
  #include <dirent.h>
17297
17298
  #include <fcntl.h>
17298
17299
  #include <string.h>
17299
- #include <sys/stat.h>
17300
17300
  #include <sys/types.h>
17301
17301
  #include <unistd.h>
17302
17302
  #else
@@ -17335,7 +17335,6 @@ public:
17335
17335
  #include <string>
17336
17336
 
17337
17337
  #ifdef __MINGW32__
17338
- #include <sys/stat.h>
17339
17338
  // need to manually define this for mingw
17340
17339
  extern "C" WINBASEAPI BOOL WINAPI GetPhysicallyInstalledSystemMemory(PULONGLONG);
17341
17340
  #endif
@@ -17360,33 +17359,6 @@ static void AssertValidFileFlags(uint8_t flags) {
17360
17359
  #endif
17361
17360
  }
17362
17361
 
17363
- #ifdef __MINGW32__
17364
- bool LocalFileSystem::FileExists(const string &filename) {
17365
- auto unicode_path = WindowsUtil::UTF8ToUnicode(filename.c_str());
17366
- const wchar_t *wpath = unicode_path.c_str();
17367
- if (_waccess(wpath, 0) == 0) {
17368
- struct _stat64i32 status;
17369
- _wstat64i32(wpath, &status);
17370
- if (status.st_size > 0) {
17371
- return true;
17372
- }
17373
- }
17374
- return false;
17375
- }
17376
- bool LocalFileSystem::IsPipe(const string &filename) {
17377
- auto unicode_path = WindowsUtil::UTF8ToUnicode(filename.c_str());
17378
- const wchar_t *wpath = unicode_path.c_str();
17379
- if (_waccess(wpath, 0) == 0) {
17380
- struct _stat64i32 status;
17381
- _wstat64i32(wpath, &status);
17382
- if (status.st_size == 0) {
17383
- return true;
17384
- }
17385
- }
17386
- return false;
17387
- }
17388
-
17389
- #else
17390
17362
  #ifndef _WIN32
17391
17363
  bool LocalFileSystem::FileExists(const string &filename) {
17392
17364
  if (!filename.empty()) {
@@ -17421,8 +17393,8 @@ bool LocalFileSystem::FileExists(const string &filename) {
17421
17393
  auto unicode_path = WindowsUtil::UTF8ToUnicode(filename.c_str());
17422
17394
  const wchar_t *wpath = unicode_path.c_str();
17423
17395
  if (_waccess(wpath, 0) == 0) {
17424
- struct _stat64i32 status;
17425
- _wstat(wpath, &status);
17396
+ struct _stati64 status;
17397
+ _wstati64(wpath, &status);
17426
17398
  if (status.st_mode & S_IFREG) {
17427
17399
  return true;
17428
17400
  }
@@ -17433,8 +17405,8 @@ bool LocalFileSystem::IsPipe(const string &filename) {
17433
17405
  auto unicode_path = WindowsUtil::UTF8ToUnicode(filename.c_str());
17434
17406
  const wchar_t *wpath = unicode_path.c_str();
17435
17407
  if (_waccess(wpath, 0) == 0) {
17436
- struct _stat64i32 status;
17437
- _wstat(wpath, &status);
17408
+ struct _stati64 status;
17409
+ _wstati64(wpath, &status);
17438
17410
  if (status.st_mode & _S_IFCHR) {
17439
17411
  return true;
17440
17412
  }
@@ -17442,7 +17414,6 @@ bool LocalFileSystem::IsPipe(const string &filename) {
17442
17414
  return false;
17443
17415
  }
17444
17416
  #endif
17445
- #endif
17446
17417
 
17447
17418
  #ifndef _WIN32
17448
17419
  // somehow sometimes this is missing
@@ -112748,7 +112719,8 @@ duckdb_state duckdb_append_varchar_length(duckdb_appender appender, const char *
112748
112719
  return duckdb_append_internal<string_t>(appender, string_t(val, length));
112749
112720
  }
112750
112721
  duckdb_state duckdb_append_blob(duckdb_appender appender, const void *data, idx_t length) {
112751
- return duckdb_append_internal<string_t>(appender, string_t((const char *)data, length));
112722
+ auto value = duckdb::Value::BLOB((duckdb::const_data_ptr_t)data, length);
112723
+ return duckdb_append_internal<duckdb::Value>(appender, value);
112752
112724
  }
112753
112725
 
112754
112726
  duckdb_state duckdb_appender_flush(duckdb_appender appender) {
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 "c840a3b30"
15
- #define DUCKDB_VERSION "v0.4.1-dev78"
14
+ #define DUCKDB_SOURCE_ID "7e97a4a15"
15
+ #define DUCKDB_VERSION "v0.4.1-dev89"
16
16
  //===----------------------------------------------------------------------===//
17
17
  // DuckDB
18
18
  //