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

Defines a function. More...

#include <Schema.hpp>

Collaboration diagram for m::Function:
[legend]

Public Types

enum  fnid_t { FN_UDF }
 

Public Member Functions

 M_DECLARE_ENUM (kind_t) kind
 the function kind: Scalar, Aggregate, etc.
 
 Function (ThreadSafePooledString name, fnid_t fnid, kind_t kind)
 
bool is_UDF () const
 Returns true iff this is a user-defined function.
 
bool is_scalar () const
 Returns true iff this function is scalar, i.e. if it is evaluated per tuple.
 
bool is_aggregate () const
 Returns true iff this function is an aggregation, i.e. if it is evaluated on all tuples.
 
void dump (std::ostream &out) const
 
void dump () const
 

Data Fields

ThreadSafePooledString name
 the name of the function
 
fnid_t fnid
 the function id
 

Static Private Attributes

static constexpr const char * FNID_TO_STR_ []
 
static constexpr const char * KIND_TO_STR_ [] = { M_ENUM_TO_STR(kind_t) }
 

Detailed Description

Defines a function.

There are functions pre-defined in the SQL standard and user-defined functions.

Definition at line 827 of file Schema.hpp.

Member Enumeration Documentation

◆ fnid_t

Enumerator
FN_UDF 

Definition at line 833 of file Schema.hpp.

Constructor & Destructor Documentation

◆ Function()

m::Function::Function ( ThreadSafePooledString  name,
fnid_t  fnid,
kind_t  kind 
)
inline

Definition at line 844 of file Schema.hpp.

Member Function Documentation

◆ dump() [1/2]

void m::Function::dump ( ) const

◆ dump() [2/2]

M_LCOV_EXCL_START void Function::dump ( std::ostream &  out) const

Definition at line 292 of file Schema.cpp.

References fnid, FNID_TO_STR_, KIND_TO_STR_, and name.

◆ is_aggregate()

bool m::Function::is_aggregate ( ) const
inline

Returns true iff this function is an aggregation, i.e. if it is evaluated on all tuples.

Definition at line 852 of file Schema.hpp.

◆ is_scalar()

bool m::Function::is_scalar ( ) const
inline

Returns true iff this function is scalar, i.e. if it is evaluated per tuple.

Definition at line 850 of file Schema.hpp.

◆ is_UDF()

bool m::Function::is_UDF ( ) const
inline

Returns true iff this is a user-defined function.

Definition at line 847 of file Schema.hpp.

◆ M_DECLARE_ENUM()

m::Function::M_DECLARE_ENUM ( kind_t  )

the function kind: Scalar, Aggregate, etc.

Field Documentation

◆ fnid

fnid_t m::Function::fnid

the function id

Definition at line 841 of file Schema.hpp.

Referenced by dump(), and m::wasm::ExprCompiler::operator()().

◆ FNID_TO_STR_

constexpr const char * Function::FNID_TO_STR_
staticconstexprprivate
Initial value:
= {
#define M_FUNCTION(NAME, KIND)
"FN_UDF",
}

Definition at line 858 of file Schema.hpp.

Referenced by dump().

◆ KIND_TO_STR_

constexpr const char * Function::KIND_TO_STR_ = { M_ENUM_TO_STR(kind_t) }
staticconstexprprivate

Definition at line 864 of file Schema.hpp.

Referenced by dump().

◆ name

ThreadSafePooledString m::Function::name

the name of the function

Definition at line 840 of file Schema.hpp.

Referenced by dump().


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