duckdb 0.6.2-dev1030.0 → 0.6.2-dev1033.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
@@ -2,7 +2,7 @@
2
2
  "name": "duckdb",
3
3
  "main": "./lib/duckdb.js",
4
4
  "types": "./lib/duckdb.d.ts",
5
- "version": "0.6.2-dev1030.0",
5
+ "version": "0.6.2-dev1033.0",
6
6
  "description": "DuckDB node.js API",
7
7
  "gypfile": true,
8
8
  "dependencies": {
@@ -877,7 +877,20 @@ struct IntegerCastOperation {
877
877
 
878
878
  template <class T, bool NEGATIVE, bool ALLOW_EXPONENT, class OP = IntegerCastOperation>
879
879
  static bool IntegerCastLoop(const char *buf, idx_t len, T &result, bool strict) {
880
- idx_t start_pos = NEGATIVE || *buf == '+' ? 1 : 0;
880
+ idx_t start_pos;
881
+ if (NEGATIVE) {
882
+ start_pos = 1;
883
+ } else {
884
+ if (*buf == '+') {
885
+ if (strict) {
886
+ // leading plus is not allowed in strict mode
887
+ return false;
888
+ }
889
+ start_pos = 1;
890
+ } else {
891
+ start_pos = 0;
892
+ }
893
+ }
881
894
  idx_t pos = start_pos;
882
895
  while (pos < len) {
883
896
  if (!StringUtil::CharacterIsDigit(buf[pos])) {
@@ -1168,6 +1181,10 @@ static bool TryDoubleCast(const char *buf, idx_t len, T &result, bool strict) {
1168
1181
  return false;
1169
1182
  }
1170
1183
  if (*buf == '+') {
1184
+ if (strict) {
1185
+ // plus is not allowed in strict mode
1186
+ return false;
1187
+ }
1171
1188
  buf++;
1172
1189
  len--;
1173
1190
  }
@@ -1,8 +1,8 @@
1
1
  #ifndef DUCKDB_VERSION
2
- #define DUCKDB_VERSION "0.6.2-dev1030"
2
+ #define DUCKDB_VERSION "0.6.2-dev1033"
3
3
  #endif
4
4
  #ifndef DUCKDB_SOURCE_ID
5
- #define DUCKDB_SOURCE_ID "27846005c0"
5
+ #define DUCKDB_SOURCE_ID "000c77c261"
6
6
  #endif
7
7
  #include "duckdb/function/table/system_functions.hpp"
8
8
  #include "duckdb/main/database.hpp"