duckdb 0.4.1-dev2295.0 → 0.4.1-dev2299.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-dev2295.0",
4
+ "version": "0.4.1-dev2299.0",
5
5
  "description": "DuckDB node.js API",
6
6
  "gypfile": true,
7
7
  "dependencies": {
package/src/duckdb.cpp CHANGED
@@ -76004,14 +76004,20 @@ static bool StartsWithNumericDate(string &separator, const string &value) {
76004
76004
 
76005
76005
  string GenerateDateFormat(const string &separator, const char *format_template) {
76006
76006
  string format_specifier = format_template;
76007
-
76008
- // replace all dashes with the separator
76009
- for (auto pos = std::find(format_specifier.begin(), format_specifier.end(), '-'); pos != format_specifier.end();
76010
- pos = std::find(pos + separator.size(), format_specifier.end(), '-')) {
76011
- format_specifier.replace(pos, pos + 1, separator);
76007
+ auto amount_of_dashes = std::count(format_specifier.begin(), format_specifier.end(), '-');
76008
+ if (!amount_of_dashes) {
76009
+ return format_specifier;
76012
76010
  }
76013
-
76014
- return format_specifier;
76011
+ string result;
76012
+ result.reserve(format_specifier.size() - amount_of_dashes + (amount_of_dashes * separator.size()));
76013
+ for (auto &character : format_specifier) {
76014
+ if (character == '-') {
76015
+ result += separator;
76016
+ } else {
76017
+ result += character;
76018
+ }
76019
+ }
76020
+ return result;
76015
76021
  }
76016
76022
 
76017
76023
  TextSearchShiftArray::TextSearchShiftArray() {
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 "78dd2d8d3"
15
- #define DUCKDB_VERSION "v0.4.1-dev2295"
14
+ #define DUCKDB_SOURCE_ID "3075f4d29"
15
+ #define DUCKDB_VERSION "v0.4.1-dev2299"
16
16
  //===----------------------------------------------------------------------===//
17
17
  // DuckDB
18
18
  //