duckdb 0.3.5-dev184.0 → 0.3.5-dev211.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 "cad2bfd64"
15
- #define DUCKDB_VERSION "v0.3.5-dev184"
14
+ #define DUCKDB_SOURCE_ID "3227e359a"
15
+ #define DUCKDB_VERSION "v0.3.5-dev211"
16
16
  //===----------------------------------------------------------------------===//
17
17
  // DuckDB
18
18
  //
@@ -6436,11 +6436,14 @@ public:
6436
6436
  //! Bind a scalar function from the set of functions and input arguments. Returns the index of the chosen function,
6437
6437
  //! returns DConstants::INVALID_INDEX and sets error if none could be found
6438
6438
  DUCKDB_API static idx_t BindFunction(const string &name, vector<ScalarFunction> &functions,
6439
- vector<LogicalType> &arguments, string &error);
6439
+ vector<LogicalType> &arguments, string &error, bool &cast_parameters);
6440
6440
  DUCKDB_API static idx_t BindFunction(const string &name, vector<ScalarFunction> &functions,
6441
- vector<unique_ptr<Expression>> &arguments, string &error);
6441
+ vector<unique_ptr<Expression>> &arguments, string &error,
6442
+ bool &cast_parameters);
6442
6443
  //! Bind an aggregate function from the set of functions and input arguments. Returns the index of the chosen
6443
6444
  //! function, returns DConstants::INVALID_INDEX and sets error if none could be found
6445
+ DUCKDB_API static idx_t BindFunction(const string &name, vector<AggregateFunction> &functions,
6446
+ vector<LogicalType> &arguments, string &error, bool &cast_parameters);
6444
6447
  DUCKDB_API static idx_t BindFunction(const string &name, vector<AggregateFunction> &functions,
6445
6448
  vector<LogicalType> &arguments, string &error);
6446
6449
  DUCKDB_API static idx_t BindFunction(const string &name, vector<AggregateFunction> &functions,
@@ -6507,7 +6510,8 @@ public:
6507
6510
  DUCKDB_API hash_t Hash() const;
6508
6511
 
6509
6512
  //! Cast a set of expressions to the arguments of this function
6510
- DUCKDB_API void CastToFunctionArguments(vector<unique_ptr<Expression>> &children);
6513
+ DUCKDB_API void CastToFunctionArguments(vector<unique_ptr<Expression>> &children,
6514
+ bool cast_parameter_expressions = true);
6511
6515
 
6512
6516
  DUCKDB_API string ToString() override;
6513
6517
  };
@@ -7297,10 +7301,9 @@ public:
7297
7301
  vector<unique_ptr<Expression>> children,
7298
7302
  string &error, bool is_operator = false);
7299
7303
 
7300
- DUCKDB_API static unique_ptr<BoundFunctionExpression> BindScalarFunction(ClientContext &context,
7301
- ScalarFunction bound_function,
7302
- vector<unique_ptr<Expression>> children,
7303
- bool is_operator = false);
7304
+ DUCKDB_API static unique_ptr<BoundFunctionExpression>
7305
+ BindScalarFunction(ClientContext &context, ScalarFunction bound_function, vector<unique_ptr<Expression>> children,
7306
+ bool is_operator = false, bool cast_parameters = true);
7304
7307
 
7305
7308
  DUCKDB_API bool operator==(const ScalarFunction &rhs) const;
7306
7309
  DUCKDB_API bool operator!=(const ScalarFunction &rhs) const;
@@ -9070,7 +9073,8 @@ public:
9070
9073
  DUCKDB_API static unique_ptr<BoundAggregateExpression>
9071
9074
  BindAggregateFunction(ClientContext &context, AggregateFunction bound_function,
9072
9075
  vector<unique_ptr<Expression>> children, unique_ptr<Expression> filter = nullptr,
9073
- bool is_distinct = false, unique_ptr<BoundOrderModifier> order_bys = nullptr);
9076
+ bool is_distinct = false, unique_ptr<BoundOrderModifier> order_bys = nullptr,
9077
+ bool cast_parameters = true);
9074
9078
 
9075
9079
  DUCKDB_API static unique_ptr<FunctionData> BindSortedAggregate(AggregateFunction &bound_function,
9076
9080
  vector<unique_ptr<Expression>> &children,
@@ -13159,9 +13163,6 @@ public:
13159
13163
  static bool ContainsType(const LogicalType &type, LogicalTypeId target);
13160
13164
  static LogicalType ExchangeType(const LogicalType &type, LogicalTypeId target, LogicalType new_type);
13161
13165
 
13162
- static void ResolveParameterType(LogicalType &type);
13163
- static void ResolveParameterType(unique_ptr<Expression> &expr);
13164
-
13165
13166
  //! Bind the given expresion. Unlike Bind(), this does *not* mute the given ParsedExpression.
13166
13167
  //! Exposed to be used from sub-binders that aren't subclasses of ExpressionBinder.
13167
13168
  virtual BindResult BindExpression(unique_ptr<ParsedExpression> *expr_ptr, idx_t depth,
@@ -13183,7 +13184,6 @@ protected:
13183
13184
  BindResult BindExpression(OperatorExpression &expr, idx_t depth);
13184
13185
  BindResult BindExpression(ParameterExpression &expr, idx_t depth);
13185
13186
  BindResult BindExpression(PositionalReferenceExpression &ref, idx_t depth);
13186
- BindResult BindExpression(StarExpression &expr, idx_t depth);
13187
13187
  BindResult BindExpression(SubqueryExpression &expr, idx_t depth);
13188
13188
 
13189
13189
  protected:
@@ -13495,6 +13495,8 @@ public:
13495
13495
  vector<CorrelatedColumnInfo> correlated_columns;
13496
13496
  //! The set of parameter expressions bound by this binder
13497
13497
  vector<BoundParameterExpression *> *parameters;
13498
+ //! The types of the prepared statement parameters, if any
13499
+ vector<LogicalType> *parameter_types;
13498
13500
  //! Whether or not the bound statement is read-only
13499
13501
  bool read_only;
13500
13502
  //! Whether or not the statement requires a valid transaction to run
@@ -17447,7 +17449,8 @@ private:
17447
17449
 
17448
17450
  //! Internally prepare a SQL statement. Caller must hold the context_lock.
17449
17451
  shared_ptr<PreparedStatementData> CreatePreparedStatement(ClientContextLock &lock, const string &query,
17450
- unique_ptr<SQLStatement> statement);
17452
+ unique_ptr<SQLStatement> statement,
17453
+ vector<Value> *values = nullptr);
17451
17454
  unique_ptr<PendingQueryResult> PendingStatementInternal(ClientContextLock &lock, const string &query,
17452
17455
  unique_ptr<SQLStatement> statement);
17453
17456
  unique_ptr<QueryResult> RunStatementInternal(ClientContextLock &lock, const string &query,