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::Relation Class Referenceabstract
Inheritance diagram for duckdb::Relation:
Collaboration diagram for duckdb::Relation:

Public Member Functions

 Relation (const shared_ptr< ClientContext > &context_p, const RelationType type)
 
 Relation (const shared_ptr< ClientContextWrapper > &context, RelationType type, const string &alias_p="")
 
 Relation (const shared_ptr< RelationContextWrapper > &context, RelationType type, const string &alias_p="")
 
virtual DUCKDB_API const vector< ColumnDefinition > & Columns ()=0
 
virtual DUCKDB_API unique_ptr< QueryNodeGetQueryNode ()=0
 
virtual DUCKDB_API string GetQuery ()
 
virtual DUCKDB_API BoundStatement Bind (Binder &binder)
 
virtual DUCKDB_API string GetAlias ()
 
DUCKDB_API unique_ptr< QueryResultExecuteOrThrow ()
 
DUCKDB_API unique_ptr< QueryResultExecute ()
 
DUCKDB_API string ToString ()
 
virtual DUCKDB_API string ToString (idx_t depth)=0
 
DUCKDB_API void Print ()
 
DUCKDB_API void Head (idx_t limit=10)
 
DUCKDB_API shared_ptr< RelationCreateView (const string &name, bool replace=true, bool temporary=false)
 
DUCKDB_API shared_ptr< RelationCreateView (const string &schema_name, const string &name, bool replace=true, bool temporary=false)
 
DUCKDB_API unique_ptr< QueryResultQuery (const string &sql) const
 
DUCKDB_API unique_ptr< QueryResultQuery (const string &name, const string &sql)
 
DUCKDB_API unique_ptr< QueryResultExplain (ExplainType type=ExplainType::EXPLAIN_STANDARD, ExplainFormat explain_format=ExplainFormat::DEFAULT)
 Explain the query plan of this relation.
 
virtual DUCKDB_API unique_ptr< TableRefGetTableRef ()
 
virtual bool IsReadOnly ()
 
DUCKDB_API void TryBindRelation (vector< ColumnDefinition > &columns)
 
DUCKDB_API shared_ptr< RelationProject (const string &select_list)
 
DUCKDB_API shared_ptr< RelationProject (const string &expression, const string &alias)
 
DUCKDB_API shared_ptr< RelationProject (const string &select_list, const vector< string > &aliases)
 
DUCKDB_API shared_ptr< RelationProject (const vector< string > &expressions)
 
DUCKDB_API shared_ptr< RelationProject (const vector< string > &expressions, const vector< string > &aliases)
 
DUCKDB_API shared_ptr< RelationProject (vector< unique_ptr< ParsedExpression > > expressions, const vector< string > &aliases)
 
DUCKDB_API shared_ptr< RelationFilter (const string &expression)
 
DUCKDB_API shared_ptr< RelationFilter (unique_ptr< ParsedExpression > expression)
 
DUCKDB_API shared_ptr< RelationFilter (const vector< string > &expressions)
 
DUCKDB_API shared_ptr< RelationLimit (int64_t n, int64_t offset=0)
 
DUCKDB_API shared_ptr< RelationOrder (const string &expression)
 
DUCKDB_API shared_ptr< RelationOrder (const vector< string > &expressions)
 
DUCKDB_API shared_ptr< RelationOrder (vector< OrderByNode > expressions)
 
DUCKDB_API shared_ptr< RelationJoin (const shared_ptr< Relation > &other, const string &condition, JoinType type=JoinType::INNER, JoinRefType ref_type=JoinRefType::REGULAR)
 
shared_ptr< RelationJoin (const shared_ptr< Relation > &other, vector< unique_ptr< ParsedExpression > > condition, JoinType type=JoinType::INNER, JoinRefType ref_type=JoinRefType::REGULAR)
 
DUCKDB_API shared_ptr< RelationCrossProduct (const shared_ptr< Relation > &other, JoinRefType join_ref_type=JoinRefType::CROSS)
 
DUCKDB_API shared_ptr< RelationUnion (const shared_ptr< Relation > &other)
 
DUCKDB_API shared_ptr< RelationExcept (const shared_ptr< Relation > &other)
 
DUCKDB_API shared_ptr< RelationIntersect (const shared_ptr< Relation > &other)
 
DUCKDB_API shared_ptr< RelationDistinct ()
 
DUCKDB_API shared_ptr< RelationAggregate (const string &aggregate_list)
 
DUCKDB_API shared_ptr< RelationAggregate (const vector< string > &aggregates)
 
DUCKDB_API shared_ptr< RelationAggregate (vector< unique_ptr< ParsedExpression > > expressions)
 
DUCKDB_API shared_ptr< RelationAggregate (const string &aggregate_list, const string &group_list)
 
DUCKDB_API shared_ptr< RelationAggregate (const vector< string > &aggregates, const vector< string > &groups)
 
DUCKDB_API shared_ptr< RelationAggregate (vector< unique_ptr< ParsedExpression > > expressions, const string &group_list)
 
DUCKDB_API shared_ptr< RelationAlias (const string &alias)
 
DUCKDB_API shared_ptr< RelationInsertRel (const string &schema_name, const string &table_name)
 Insert the data from this relation into a table.
 
DUCKDB_API shared_ptr< RelationInsertRel (const string &catalog_name, const string &schema_name, const string &table_name)
 
DUCKDB_API void Insert (const string &table_name)
 
DUCKDB_API void Insert (const string &schema_name, const string &table_name)
 
DUCKDB_API void Insert (const string &catalog_name, const string &schema_name, const string &table_name)
 
virtual DUCKDB_API void Insert (const vector< vector< Value > > &values)
 Insert a row (i.e.,list of values) into a table.
 
virtual DUCKDB_API void Insert (vector< vector< unique_ptr< ParsedExpression > > > &&expressions)
 
DUCKDB_API shared_ptr< RelationCreateRel (const string &schema_name, const string &table_name, bool temporary=false, OnCreateConflict on_conflict=OnCreateConflict::ERROR_ON_CONFLICT)
 Create a table and insert the data from this relation into that table.
 
DUCKDB_API shared_ptr< RelationCreateRel (const string &catalog_name, const string &schema_name, const string &table_name, bool temporary=false, OnCreateConflict on_conflict=OnCreateConflict::ERROR_ON_CONFLICT)
 
DUCKDB_API void Create (const string &table_name, bool temporary=false, OnCreateConflict on_conflict=OnCreateConflict::ERROR_ON_CONFLICT)
 
DUCKDB_API void Create (const string &schema_name, const string &table_name, bool temporary=false, OnCreateConflict on_conflict=OnCreateConflict::ERROR_ON_CONFLICT)
 
DUCKDB_API void Create (const string &catalog_name, const string &schema_name, const string &table_name, bool temporary=false, OnCreateConflict on_conflict=OnCreateConflict::ERROR_ON_CONFLICT)
 
DUCKDB_API shared_ptr< RelationWriteCSVRel (const string &csv_file, case_insensitive_map_t< vector< Value > > options=case_insensitive_map_t< vector< Value > >())
 Write a relation to a CSV file.
 
DUCKDB_API void WriteCSV (const string &csv_file, case_insensitive_map_t< vector< Value > > options=case_insensitive_map_t< vector< Value > >())
 
DUCKDB_API shared_ptr< RelationWriteParquetRel (const string &parquet_file, case_insensitive_map_t< vector< Value > > options=case_insensitive_map_t< vector< Value > >())
 Write a relation to a Parquet file.
 
DUCKDB_API void WriteParquet (const string &parquet_file, case_insensitive_map_t< vector< Value > > options=case_insensitive_map_t< vector< Value > >())
 
virtual DUCKDB_API void Update (const string &update, const string &condition=string())
 Update a table, can only be used on a TableRelation.
 
virtual DUCKDB_API void Update (vector< string > column_names, vector< unique_ptr< ParsedExpression > > &&update, unique_ptr< ParsedExpression > condition=nullptr)
 
virtual DUCKDB_API void Delete (const string &condition=string())
 Delete from a table, can only be used on a TableRelation.
 
DUCKDB_API shared_ptr< RelationTableFunction (const std::string &fname, const vector< Value > &values)
 
DUCKDB_API shared_ptr< RelationTableFunction (const std::string &fname, const vector< Value > &values, const named_parameter_map_t &named_parameters)
 
virtual bool InheritsColumnBindings ()
 Whether or not the relation inherits column bindings from its child or not, only relevant for binding.
 
virtual RelationChildRelation ()
 
void AddExternalDependency (shared_ptr< ExternalDependency > dependency)
 
DUCKDB_API vector< shared_ptr< ExternalDependency > > GetAllDependencies ()
 
template<class TARGET >
TARGETCast ()
 
template<class TARGET >
const TARGETCast () const
 
- Public Member Functions inherited from duckdb::enable_shared_from_this< Relation >
shared_ptr< Relationshared_from_this ()
 
shared_ptr< Relation constshared_from_this () const
 

Public Attributes

shared_ptr< ClientContextWrappercontext
 
RelationType type
 
const string alias
 
vector< shared_ptr< ExternalDependency > > external_dependencies
 

Static Protected Member Functions

static DUCKDB_API string RenderWhitespace (idx_t depth)
 

Additional Inherited Members

- Protected Member Functions inherited from duckdb::enable_shared_from_this< Relation >
 enable_shared_from_this (enable_shared_from_this const &) noexcept
 
enable_shared_from_thisoperator= (enable_shared_from_this const &) noexcept
 

Constructor & Destructor Documentation

◆ Relation() [1/3]

duckdb::Relation::Relation ( const shared_ptr< ClientContext > &  context_p,
const RelationType  type 
)
inline
42083 : type(type) {
42084 context = make_shared_ptr<ClientContextWrapper>(context_p);
42085 }

◆ Relation() [2/3]

duckdb::Relation::Relation ( const shared_ptr< ClientContextWrapper > &  context,
RelationType  type,
const string &  alias_p = "" 
)
inline
42087 : context(context), type(type), alias(CreateRelationAlias(type, alias_p)) {
42088 }

◆ Relation() [3/3]

duckdb::Relation::Relation ( const shared_ptr< RelationContextWrapper > &  context,
RelationType  type,
const string &  alias_p = "" 
)
inline
42091 : context(context), type(type), alias(CreateRelationAlias(type, alias_p)) {
42092 }

Member Function Documentation

◆ IsReadOnly()

virtual bool duckdb::Relation::IsReadOnly ( )
inlinevirtual
42127 {
42128 return true;
42129 }

◆ TableFunction()

DUCKDB_API shared_ptr< Relation > duckdb::Relation::TableFunction ( const std::string &  fname,
const vector< Value > &  values 
)

Create a relation from calling a table in/out function on the input relation Create a relation from calling a table in/out function on the input relation

◆ InheritsColumnBindings()

virtual bool duckdb::Relation::InheritsColumnBindings ( )
inlinevirtual

Whether or not the relation inherits column bindings from its child or not, only relevant for binding.

42237 {
42238 return false;
42239 }

◆ ChildRelation()

virtual Relation * duckdb::Relation::ChildRelation ( )
inlinevirtual
42240 {
42241 return nullptr;
42242 }

◆ Cast() [1/2]

template<class TARGET >
TARGET & duckdb::Relation::Cast ( )
inline
42251 {
42252 DynamicCastCheck<TARGET>(this);
42253 return reinterpret_cast<TARGET &>(*this);
42254 }

◆ Cast() [2/2]

template<class TARGET >
const TARGET & duckdb::Relation::Cast ( ) const
inline
42256 {
42257 DynamicCastCheck<TARGET>(this);
42258 return reinterpret_cast<const TARGET &>(*this);
42259 }

The documentation for this class was generated from the following file: