mutable
A Database System for Research and Fast Prototyping
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | Friends
m::BaseTable Struct Reference

A BaseTable is a DataSource that is materialized and stored persistently by the database system. More...

#include <QueryGraph.hpp>

Inheritance diagram for m::BaseTable:
[legend]
Collaboration diagram for m::BaseTable:
[legend]

Public Member Functions

const Tabletable () const
 Returns a reference to the Table providing the tuples.
 
ThreadSafePooledOptionalString name () const override
 Returns the name of this DataSource.
 
bool is_correlated () const override
 BaseTable is never correlated.
 
std::size_t id () const
 Returns the id of this DataSource.
 
const ThreadSafePooledOptionalStringalias () const
 Returns the alias of this DataSource.
 
const cnf::CNFfilter () const
 Returns the filter of this DataSource.
 
void update_filter (cnf::CNF filter)
 Adds filter to the current filter of this DataSource by logical conjunction.
 
void add_join (Join &join)
 Adds join to the set of Joins of this DataSource.
 
const auto & joins () const
 Returns a reference to the Joins using this DataSource.
 
bool operator== (const DataSource &other) const
 
bool operator!= (const DataSource &other) const
 

Private Member Functions

 BaseTable (std::size_t id, ThreadSafePooledOptionalString alias, const Table &table)
 

‍list of designators expanded from GetPrimaryKey::compute() or GetAttributes::compute()


 
void remove_join (Join &join)
 

Private Attributes

const Tabletable_
 the table providing the tuples
 
cnf::CNF filter_
 filter condition on this data source
 
std::vector< std::reference_wrapper< Join > > joins_
 joins with this data source
 
ThreadSafePooledOptionalString alias_
 alias of this data source, may not have a value if this data source has no alias
 
std::size_t id_
 unique identifier of this data source within its query graph
 
bool decorrelated_ = true
 indicates whether this source is already decorrelated
 

Friends

struct QueryGraph
 
struct GetPrimaryKey
 

Detailed Description

A BaseTable is a DataSource that is materialized and stored persistently by the database system.

Definition at line 88 of file QueryGraph.hpp.

Constructor & Destructor Documentation

◆ BaseTable()

m::BaseTable::BaseTable ( std::size_t  id,
ThreadSafePooledOptionalString  alias,
const Table table 
)
inlineprivate

‍list of designators expanded from GetPrimaryKey::compute() or GetAttributes::compute()

Definition at line 99 of file QueryGraph.hpp.

Member Function Documentation

◆ add_join()

void m::DataSource::add_join ( Join join)
inlineinherited

Adds join to the set of Joins of this DataSource.

Definition at line 67 of file QueryGraph.hpp.

◆ alias()

const ThreadSafePooledOptionalString & m::DataSource::alias ( ) const
inlineinherited

Returns the alias of this DataSource.

May not have a value.

Definition at line 58 of file QueryGraph.hpp.

◆ filter()

const cnf::CNF & m::DataSource::filter ( ) const
inlineinherited

Returns the filter of this DataSource.

May be empty.

Definition at line 63 of file QueryGraph.hpp.

◆ id()

std::size_t m::DataSource::id ( ) const
inlineinherited

Returns the id of this DataSource.

Definition at line 56 of file QueryGraph.hpp.

◆ is_correlated()

bool m::BaseTable::is_correlated ( ) const
inlineoverridevirtual

BaseTable is never correlated.

Always returns false.

Implements m::DataSource.

Definition at line 110 of file QueryGraph.hpp.

◆ joins()

const auto & m::DataSource::joins ( ) const
inlineinherited

Returns a reference to the Joins using this DataSource.

Definition at line 69 of file QueryGraph.hpp.

◆ name()

ThreadSafePooledOptionalString m::BaseTable::name ( ) const
inlineoverridevirtual

Returns the name of this DataSource.

Either the same as alias(), if an alias is given, otherwise the name of the referenced Table. Returned value might be empty for anonymous nested queries (e.g. in a WHERE clause).

Implements m::DataSource.

Definition at line 107 of file QueryGraph.hpp.

References m::Table::name().

◆ operator!=()

bool m::DataSource::operator!= ( const DataSource other) const
inlineinherited

Definition at line 84 of file QueryGraph.hpp.

◆ operator==()

bool m::DataSource::operator== ( const DataSource other) const
inlineinherited

Definition at line 83 of file QueryGraph.hpp.

References m::DataSource::id_.

◆ remove_join()

void m::DataSource::remove_join ( Join join)
inlineprivateinherited

Definition at line 75 of file QueryGraph.hpp.

◆ table()

const Table & m::BaseTable::table ( ) const
inline

Returns a reference to the Table providing the tuples.

Definition at line 105 of file QueryGraph.hpp.

◆ update_filter()

void m::DataSource::update_filter ( cnf::CNF  filter)
inlineinherited

Adds filter to the current filter of this DataSource by logical conjunction.

Definition at line 65 of file QueryGraph.hpp.

References and().

Referenced by m::QueryGraph::add_custom_filter().

Friends And Related Function Documentation

◆ GetPrimaryKey

friend struct GetPrimaryKey
friend

Definition at line 91 of file QueryGraph.hpp.

◆ QueryGraph

friend struct QueryGraph
friend

Definition at line 90 of file QueryGraph.hpp.

Field Documentation

◆ alias_

ThreadSafePooledOptionalString m::DataSource::alias_
privateinherited

alias of this data source, may not have a value if this data source has no alias

Definition at line 41 of file QueryGraph.hpp.

◆ decorrelated_

bool m::DataSource::decorrelated_ = true
privateinherited

indicates whether this source is already decorrelated

Definition at line 44 of file QueryGraph.hpp.

◆ filter_

cnf::CNF m::DataSource::filter_
privateinherited

filter condition on this data source

Definition at line 39 of file QueryGraph.hpp.

◆ id_

std::size_t m::DataSource::id_
privateinherited

unique identifier of this data source within its query graph

Definition at line 42 of file QueryGraph.hpp.

Referenced by m::DataSource::operator==().

◆ joins_

std::vector<std::reference_wrapper<Join> > m::DataSource::joins_
privateinherited

joins with this data source

Definition at line 40 of file QueryGraph.hpp.

◆ table_

const Table& m::BaseTable::table_
private

the table providing the tuples

Definition at line 94 of file QueryGraph.hpp.


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