mutable
A Database System for Research and Fast Prototyping
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
m::StackMachineBuilder Struct Reference
Inheritance diagram for m::StackMachineBuilder:
[legend]
Collaboration diagram for m::StackMachineBuilder:
[legend]

Public Member Functions

 StackMachineBuilder (StackMachine &stack_machine, const ast::Expr &expr, const std::vector< Schema > &schemas, const std::vector< std::size_t > &tuple_ids)
 

Private Member Functions

std::pair< std::size_t, std::size_t > find_id (const Schema::Identifier &id) const
 Returns a pair of (tuple_id, attr_id).
 
void operator() (Const< ast::ErrorExpr > &) override
 
void operator() (Const< ast::Designator > &e) override
 
void operator() (Const< ast::Constant > &e) override
 
void operator() (Const< ast::FnApplicationExpr > &e) override
 
void operator() (Const< ast::UnaryExpr > &e) override
 
void operator() (Const< ast::BinaryExpr > &e) override
 
void operator() (Const< ast::QueryExpr > &e) override
 

Private Attributes

StackMachinestack_machine_
 
const std::vector< Schema > & schemas_
 
const std::vector< std::size_t > & tuple_ids_
 

Static Private Attributes

static std::unordered_map< std::string, std::regex > regexes_
 regexes built from patterns in LIKE expressions
 

Detailed Description

Definition at line 42 of file StackMachine.cpp.

Constructor & Destructor Documentation

◆ StackMachineBuilder()

m::StackMachineBuilder::StackMachineBuilder ( StackMachine stack_machine,
const ast::Expr expr,
const std::vector< Schema > &  schemas,
const std::vector< std::size_t > &  tuple_ids 
)
inline

Definition at line 50 of file StackMachine.cpp.

Member Function Documentation

◆ find_id()

std::pair< std::size_t, std::size_t > m::StackMachineBuilder::find_id ( const Schema::Identifier id) const
inlineprivate

Returns a pair of (tuple_id, attr_id).

Definition at line 65 of file StackMachine.cpp.

References M_unreachable, schemas_, and tuple_ids_.

Referenced by operator()().

◆ operator()() [1/7]

void StackMachineBuilder::operator() ( Const< ast::BinaryExpr > &  e)
overrideprivate

◆ operator()() [2/7]

void StackMachineBuilder::operator() ( Const< ast::Constant > &  e)
overrideprivate

Definition at line 93 of file StackMachine.cpp.

References m::StackMachine::add_and_emit_load(), and stack_machine_.

◆ operator()() [3/7]

void StackMachineBuilder::operator() ( Const< ast::Designator > &  e)
overrideprivate

Definition at line 87 of file StackMachine.cpp.

References find_id(), and stack_machine_.

◆ operator()() [4/7]

void m::StackMachineBuilder::operator() ( Const< ast::ErrorExpr > &  )
inlineoverrideprivate

Definition at line 76 of file StackMachine.cpp.

References M_unreachable.

◆ operator()() [5/7]

void StackMachineBuilder::operator() ( Const< ast::FnApplicationExpr > &  e)
overrideprivate

◆ operator()() [6/7]

void StackMachineBuilder::operator() ( Const< ast::QueryExpr > &  e)
overrideprivate

Definition at line 515 of file StackMachine.cpp.

References find_id(), m::Catalog::Get(), m::Catalog::pool(), and stack_machine_.

◆ operator()() [7/7]

void StackMachineBuilder::operator() ( Const< ast::UnaryExpr > &  e)
overrideprivate

Definition at line 154 of file StackMachine.cpp.

References M_insist, M_unreachable, and stack_machine_.

Field Documentation

◆ regexes_

std::unordered_map< std::string, std::regex > StackMachineBuilder::regexes_
staticprivate

regexes built from patterns in LIKE expressions

Definition at line 61 of file StackMachine.cpp.

Referenced by operator()().

◆ schemas_

const std::vector<Schema>& m::StackMachineBuilder::schemas_
private

Definition at line 46 of file StackMachine.cpp.

Referenced by find_id().

◆ stack_machine_

StackMachine& m::StackMachineBuilder::stack_machine_
private

Definition at line 45 of file StackMachine.cpp.

Referenced by operator()().

◆ tuple_ids_

const std::vector<std::size_t>& m::StackMachineBuilder::tuple_ids_
private

Definition at line 47 of file StackMachine.cpp.

Referenced by find_id().


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