|
|
DUCKDB_API | ClientContext (shared_ptr< DatabaseInstance > db) |
| |
| MetaTransaction & | ActiveTransaction () |
| |
|
DUCKDB_API void | Interrupt () |
| | Interrupt execution of a query.
|
| |
|
DUCKDB_API bool | IsInterrupted () const |
| |
|
DUCKDB_API void | ClearInterrupt () |
| |
|
DUCKDB_API void | CancelTransaction () |
| |
|
DUCKDB_API void | EnableProfiling () |
| | Enable query profiling.
|
| |
|
DUCKDB_API void | DisableProfiling () |
| | Disable query profiling.
|
| |
| DUCKDB_API unique_ptr< QueryResult > | Query (const string &query, QueryParameters query_parameters) |
| |
|
DUCKDB_API unique_ptr< QueryResult > | Query (unique_ptr< SQLStatement > statement, QueryParameters query_parameters) |
| |
| DUCKDB_API unique_ptr< PendingQueryResult > | PendingQuery (const string &query, QueryParameters query_parameters) |
| |
|
DUCKDB_API unique_ptr< PendingQueryResult > | PendingQuery (unique_ptr< SQLStatement > statement, QueryParameters query_parameters) |
| | Issues a query to the database and returns a Pending Query Result.
|
| |
|
DUCKDB_API unique_ptr< PendingQueryResult > | PendingQuery (unique_ptr< SQLStatement > statement, case_insensitive_map_t< BoundParameterData > &values, QueryParameters query_parameters) |
| | Create a pending query with a list of parameters.
|
| |
|
DUCKDB_API unique_ptr< PendingQueryResult > | PendingQuery (const string &query, case_insensitive_map_t< BoundParameterData > &values, QueryParameters query_parameters) |
| |
|
DUCKDB_API unique_ptr< PendingQueryResult > | PendingQuery (const string &query, PendingQueryParameters parameters) |
| |
|
DUCKDB_API void | Destroy () |
| | Destroy the client context.
|
| |
|
DUCKDB_API unique_ptr< TableDescription > | TableInfo (const string &database_name, const string &schema_name, const string &table_name) |
| | Get the table info of a specific table, or nullptr if it cannot be found.
|
| |
|
DUCKDB_API unique_ptr< TableDescription > | TableInfo (const string &schema_name, const string &table_name) |
| | Get the table info of a specific table, or nullptr if it cannot be found. Uses INVALID_CATALOG.
|
| |
|
DUCKDB_API void | Append (unique_ptr< SQLStatement > stmt) |
| | Executes a query with the given collection "attached" to the query using a CTE.
|
| |
|
DUCKDB_API void | Append (TableDescription &description, ColumnDataCollection &collection) |
| | Appends a ColumnDataCollection to the described table.
|
| |
| DUCKDB_API void | TryBindRelation (Relation &relation, vector< ColumnDefinition > &result_columns) |
| |
|
DUCKDB_API void | InternalTryBindRelation (Relation &relation, vector< ColumnDefinition > &result_columns) |
| | Internal function for try bind relation. It does not require a client-context lock.
|
| |
|
DUCKDB_API unique_ptr< PendingQueryResult > | PendingQuery (const shared_ptr< Relation > &relation, QueryParameters query_parameters) |
| | Execute a relation.
|
| |
|
DUCKDB_API unique_ptr< QueryResult > | Execute (const shared_ptr< Relation > &relation) |
| |
|
DUCKDB_API unique_ptr< PreparedStatement > | Prepare (const string &query) |
| | Prepare a query.
|
| |
|
DUCKDB_API unique_ptr< PreparedStatement > | Prepare (unique_ptr< SQLStatement > statement) |
| | Directly prepare a SQL statement.
|
| |
| DUCKDB_API unique_ptr< PendingQueryResult > | PendingQuery (const string &query, shared_ptr< PreparedStatementData > &prepared, const PendingQueryParameters ¶meters) |
| |
| DUCKDB_API unique_ptr< QueryResult > | Execute (const string &query, shared_ptr< PreparedStatementData > &prepared, case_insensitive_map_t< BoundParameterData > &values, QueryParameters query_parameters=QueryResultOutputType::ALLOW_STREAMING) |
| |
|
DUCKDB_API unique_ptr< QueryResult > | Execute (const string &query, shared_ptr< PreparedStatementData > &prepared, const PendingQueryParameters ¶meters) |
| |
|
DUCKDB_API QueryProgress | GetQueryProgress () |
| | Gets current percentage of the query's progress, returns 0 in case the progress bar is disabled.
|
| |
|
DUCKDB_API void | RegisterFunction (CreateFunctionInfo &info) |
| | Register function in the temporary schema.
|
| |
|
DUCKDB_API vector< unique_ptr< SQLStatement > > | ParseStatements (const string &query) |
| | Parse statements from a query.
|
| |
|
DUCKDB_API unique_ptr< LogicalOperator > | ExtractPlan (const string &query) |
| | Extract the logical plan of a query.
|
| |
|
DUCKDB_API void | PreprocessStatements (vector< unique_ptr< SQLStatement > > &statements) |
| |
| DUCKDB_API void | RunFunctionInTransaction (const std::function< void(void)> &fun, bool requires_valid_transaction=true) |
| |
|
DUCKDB_API void | RunFunctionInTransactionInternal (ClientContextLock &lock, const std::function< void(void)> &fun, bool requires_valid_transaction=true) |
| | Same as RunFunctionInTransaction, but does not obtain a lock on the client context or check for validation.
|
| |
|
DUCKDB_API SettingLookupResult | TryGetCurrentSetting (const string &key, Value &result) const |
| | Equivalent to CURRENT_SETTING(key) SQL function.
|
| |
|
DUCKDB_API SettingLookupResult | TryGetCurrentUserSetting (idx_t setting_index, Value &result) const |
| | Returns the value of the current setting set by the user - if the user has set it.
|
| |
|
DUCKDB_API ParserOptions | GetParserOptions () const |
| | Returns the parser options for this client context.
|
| |
|
DUCKDB_API bool | IsActiveResult (ClientContextLock &lock, BaseQueryResult &result) |
| | Whether or not the given result object (streaming query result or pending query result) is active.
|
| |
|
Executor & | GetExecutor () |
| | Returns the current executor.
|
| |
|
Logger & | GetLogger () const |
| | Return the current logger.
|
| |
|
const string & | GetCurrentQuery () |
| | Returns the current query string (if any)
|
| |
|
connection_t | GetConnectionId () const |
| |
| DUCKDB_API unordered_set< string > | GetTableNames (const string &query, const bool qualified=false) |
| |
|
DUCKDB_API ClientProperties | GetClientProperties () |
| |
|
DUCKDB_API bool | ExecutionIsFinished () |
| | Returns true if execution of the current query is finished.
|
| |
|
DUCKDB_API void | ProcessError (ErrorData &error, const string &query) const |
| | Process an error for display to the user.
|
| |
|
DUCKDB_API LogicalType | ParseLogicalType (const string &type) |
| |
| shared_ptr< ClientContext > | shared_from_this () |
| |
| shared_ptr< ClientContext const > | shared_from_this () const |
| |
|
|
vector< unique_ptr< SQLStatement > > | ParseStatements (ClientContextLock &lock, const string &query) |
| | Parse statements and resolve pragmas from a query.
|
| |
|
unique_ptr< PendingQueryResult > | PendingQueryInternal (ClientContextLock &lock, unique_ptr< SQLStatement > statement, const PendingQueryParameters ¶meters, bool verify=true) |
| | Issues a query to the database and returns a Pending Query Result.
|
| |
|
unique_ptr< QueryResult > | ExecutePendingQueryInternal (ClientContextLock &lock, PendingQueryResult &query) |
| |
|
vector< unique_ptr< SQLStatement > > | ParseStatementsInternal (ClientContextLock &lock, const string &query) |
| | Parse statements from a query.
|
| |
| ErrorData | VerifyQuery (ClientContextLock &lock, const string &query, unique_ptr< SQLStatement > statement, PendingQueryParameters parameters) |
| |
|
void | InitialCleanup (ClientContextLock &lock) |
| |
|
void | CleanupInternal (ClientContextLock &lock, BaseQueryResult *result=nullptr, bool invalidate_transaction=false) |
| | Internal clean up, does not lock. Caller must hold the context_lock.
|
| |
|
unique_ptr< PendingQueryResult > | PendingStatementOrPreparedStatement (ClientContextLock &lock, const string &query, unique_ptr< SQLStatement > statement, shared_ptr< PreparedStatementData > &prepared, const PendingQueryParameters ¶meters) |
| |
|
unique_ptr< PendingQueryResult > | PendingPreparedStatement (ClientContextLock &lock, const string &query, shared_ptr< PreparedStatementData > statement_p, const PendingQueryParameters ¶meters) |
| |
|
unique_ptr< PendingQueryResult > | PendingPreparedStatementInternal (ClientContextLock &lock, shared_ptr< PreparedStatementData > statement_data_p, const PendingQueryParameters ¶meters) |
| |
|
void | CheckIfPreparedStatementIsExecutable (PreparedStatementData &statement) |
| |
|
shared_ptr< PreparedStatementData > | CreatePreparedStatement (ClientContextLock &lock, const string &query, unique_ptr< SQLStatement > statement, PendingQueryParameters parameters, PreparedStatementMode mode=PreparedStatementMode::PREPARE_ONLY) |
| | Internally prepare a SQL statement. Caller must hold the context_lock.
|
| |
|
unique_ptr< PendingQueryResult > | PendingStatementInternal (ClientContextLock &lock, const string &query, unique_ptr< SQLStatement > statement, const PendingQueryParameters ¶meters) |
| |
|
unique_ptr< QueryResult > | RunStatementInternal (ClientContextLock &lock, const string &query, unique_ptr< SQLStatement > statement, const PendingQueryParameters ¶meters, bool verify=true) |
| |
|
unique_ptr< PreparedStatement > | PrepareInternal (ClientContextLock &lock, unique_ptr< SQLStatement > statement) |
| |
|
void | LogQueryInternal (ClientContextLock &lock, const string &query) |
| |
|
unique_ptr< QueryResult > | FetchResultInternal (ClientContextLock &lock, PendingQueryResult &pending) |
| |
|
unique_ptr< ClientContextLock > | LockContext () |
| |
|
void | BeginQueryInternal (ClientContextLock &lock, const string &query) |
| |
|
ErrorData | EndQueryInternal (ClientContextLock &lock, bool success, bool invalidate_transaction, optional_ptr< ErrorData > previous_error) |
| |
|
void | WaitForTask (ClientContextLock &lock, BaseQueryResult &result) |
| | Wait until a task is available to execute.
|
| |
|
PendingExecutionResult | ExecuteTaskInternal (ClientContextLock &lock, BaseQueryResult &result, bool dry_run=false) |
| |
|
unique_ptr< PendingQueryResult > | PendingStatementOrPreparedStatementInternal (ClientContextLock &lock, const string &query, unique_ptr< SQLStatement > statement, shared_ptr< PreparedStatementData > &prepared, const PendingQueryParameters ¶meters) |
| |
|
unique_ptr< PendingQueryResult > | PendingQueryPreparedInternal (ClientContextLock &lock, const string &query, shared_ptr< PreparedStatementData > &prepared, const PendingQueryParameters ¶meters) |
| |
|
unique_ptr< PendingQueryResult > | PendingQueryInternal (ClientContextLock &, const shared_ptr< Relation > &relation, QueryParameters query_parameters) |
| |
|
void | RebindPreparedStatement (ClientContextLock &lock, const string &query, shared_ptr< PreparedStatementData > &prepared, const PendingQueryParameters ¶meters) |
| |
|
template<class T > |
| unique_ptr< T > | ErrorResult (ErrorData error, const string &query=string()) |
| |
|
shared_ptr< PreparedStatementData > | CreatePreparedStatementInternal (ClientContextLock &lock, const string &query, unique_ptr< SQLStatement > statement, PendingQueryParameters parameters) |
| |
|
bool | ErrorInvalidatesTransaction (ExceptionType type) |
| |
The ClientContext holds information relevant to the current client session during execution