mutable
A Database System for Research and Fast Prototyping
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Data Fields | Private Attributes
m::ast::ASTPrinter Struct Reference

Pretty-prints the AST in SQL. More...

#include <ASTPrinter.hpp>

Inheritance diagram for m::ast::ASTPrinter:
[legend]
Collaboration diagram for m::ast::ASTPrinter:
[legend]

Public Types

template<typename T >
using Const = ConstASTExprVisitor::Const< T >
 

Public Member Functions

 ASTPrinter (std::ostream &out, unsigned indent=0)
 
bool expand_nested_queries ()
 
void expand_nested_queries (bool expand)
 

Data Fields

std::ostream & out
 the output stream to write to
 

Private Attributes

unsigned indent_
 the current level of indentation
 
bool is_nested_ = false
 whether the statement is nested; determines whether a final ';' must be printed
 
bool expand_nested_queries_ = true
 determines whether nested queries are printed
 

Detailed Description

Pretty-prints the AST in SQL.

Definition at line 9 of file ASTPrinter.hpp.

Member Typedef Documentation

◆ Const

template<typename T >
using m::ast::ConstASTVisitor::Const = ConstASTExprVisitor::Const<T>
inherited

Definition at line 1081 of file AST.hpp.

Constructor & Destructor Documentation

◆ ASTPrinter()

m::ast::ASTPrinter::ASTPrinter ( std::ostream &  out,
unsigned  indent = 0 
)
inline

Definition at line 19 of file ASTPrinter.hpp.

Member Function Documentation

◆ expand_nested_queries() [1/2]

bool m::ast::ASTPrinter::expand_nested_queries ( )
inline

Definition at line 21 of file ASTPrinter.hpp.

◆ expand_nested_queries() [2/2]

void m::ast::ASTPrinter::expand_nested_queries ( bool  expand)
inline

Definition at line 22 of file ASTPrinter.hpp.

Field Documentation

◆ expand_nested_queries_

bool m::ast::ASTPrinter::expand_nested_queries_ = true
private

determines whether nested queries are printed

Definition at line 16 of file ASTPrinter.hpp.

◆ indent_

unsigned m::ast::ASTPrinter::indent_
private

the current level of indentation

Definition at line 14 of file ASTPrinter.hpp.

◆ is_nested_

bool m::ast::ASTPrinter::is_nested_ = false
private

whether the statement is nested; determines whether a final ';' must be printed

Definition at line 15 of file ASTPrinter.hpp.

◆ out

std::ostream& m::ast::ASTPrinter::out

the output stream to write to

Definition at line 12 of file ASTPrinter.hpp.


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