Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::StatementProperties Struct Reference

A struct containing various properties of a SQL statement. More...

Collaboration diagram for duckdb::StatementProperties:

Classes

struct  CatalogIdentity
 
struct  ModificationInfo
 

Public Member Functions

bool IsReadOnly ()
 
void RegisterDBRead (Catalog &catalog, ClientContext &context)
 
void RegisterDBModify (Catalog &catalog, ClientContext &context, DatabaseModificationType modification)
 

Public Attributes

unordered_map< string, CatalogIdentityread_databases
 The set of databases this statement will read from.
 
unordered_map< string, ModificationInfomodified_databases
 The set of databases this statement will modify.
 
bool requires_valid_transaction
 
QueryResultOutputType output_type
 Whether or not the result can be streamed to the client.
 
bool bound_all_parameters
 Whether or not all parameters have successfully had their types determined.
 
StatementReturnType return_type
 What type of data the statement returns.
 
idx_t parameter_count
 The number of prepared statement parameters.
 
bool always_require_rebind
 Whether or not the statement ALWAYS requires a rebind.
 

Detailed Description

A struct containing various properties of a SQL statement.

Constructor & Destructor Documentation

◆ StatementProperties()

duckdb::StatementProperties::StatementProperties ( )
inline
19375 : requires_valid_transaction(true), output_type(QueryResultOutputType::FORCE_MATERIALIZED),
19376 bound_all_parameters(true), return_type(StatementReturnType::QUERY_RESULT), parameter_count(0),
19377 always_require_rebind(false) {
19378 }
QueryResultOutputType output_type
Whether or not the result can be streamed to the client.
Definition duckdb.hpp:19406
StatementReturnType return_type
What type of data the statement returns.
Definition duckdb.hpp:19410
bool bound_all_parameters
Whether or not all parameters have successfully had their types determined.
Definition duckdb.hpp:19408
bool always_require_rebind
Whether or not the statement ALWAYS requires a rebind.
Definition duckdb.hpp:19414
bool requires_valid_transaction
Definition duckdb.hpp:19404
idx_t parameter_count
The number of prepared statement parameters.
Definition duckdb.hpp:19412

Member Function Documentation

◆ IsReadOnly()

bool duckdb::StatementProperties::IsReadOnly ( )
inline
19416 {
19417 return modified_databases.empty();
19418 }
unordered_map< string, ModificationInfo > modified_databases
The set of databases this statement will modify.
Definition duckdb.hpp:19401

◆ RegisterDBRead()

void duckdb::StatementProperties::RegisterDBRead ( Catalog catalog,
ClientContext context 
)
70072 {
70073 auto catalog_identity = CatalogIdentity {catalog.GetOid(), catalog.GetCatalogVersion(context)};
70074 D_ASSERT(read_databases.count(catalog.GetName()) == 0 || read_databases[catalog.GetName()] == catalog_identity);
70075 read_databases[catalog.GetName()] = catalog_identity;
70076}
unordered_map< string, CatalogIdentity > read_databases
The set of databases this statement will read from.
Definition duckdb.hpp:19399

◆ RegisterDBModify()

void duckdb::StatementProperties::RegisterDBModify ( Catalog catalog,
ClientContext context,
DatabaseModificationType  modification 
)
70079 {
70080 auto catalog_identity = CatalogIdentity {catalog.GetOid(), catalog.GetCatalogVersion(context)};
70081 auto entry = modified_databases.insert(make_pair(catalog.GetName(), ModificationInfo()));
70082 if (entry.second) {
70083 // new entry - set the identity
70084 entry.first->second.identity = catalog_identity;
70085 } else {
70086 // existing entry - verify this has the same identity
70087 D_ASSERT(entry.first->second.identity == catalog_identity);
70088 }
70089 entry.first->second.modifications |= modification;
70090}

Member Data Documentation

◆ requires_valid_transaction

bool duckdb::StatementProperties::requires_valid_transaction

Whether or not the statement requires a valid transaction. Almost all statements require this, with the exception of ROLLBACK


The documentation for this struct was generated from the following files: