MySQL 9.3.0
Source Code Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
mrs::database::entry::Table Class Reference

#include <object.h>

Inheritance diagram for mrs::database::entry::Table:
[legend]

Public Member Functions

virtual ~Table ()=default
 
bool with_insert () const
 
bool with_update () const
 
bool with_update (const Column &column) const
 
bool with_update_any_column () const
 
bool with_delete () const
 
bool with_check (const Column &column) const
 
bool needs_etag () const
 
std::shared_ptr< ObjectFieldget_field (std::string_view name) const
 
std::shared_ptr< ObjectFieldget_field_or_throw (std::string_view name) const
 
std::shared_ptr< Columnget_column (const entry::UniversalId &id) const
 
std::shared_ptr< Columnget_column (std::string_view column_name) const
 
std::shared_ptr< Columnget_column_or_throw (std::string_view column_name) const
 
std::string table_key () const
 
std::shared_ptr< Columnget_column_with_field_name (const std::string &name) const
 
std::vector< const Column * > primary_key () const
 
const Columntry_get_generated_id_column () const
 
const Columntry_get_row_ownership_column () const
 
template<typename T , typename R >
foreach_field (std::function< R(T &)> fn) const
 
template<typename T , typename R >
foreach_field (std::function< R(const T &)> fn) const
 
template<typename R >
foreach_field (std::function< R(const Column &)> column_fn, std::function< R(const ForeignKeyReference &)> fk_fn) const
 
const ForeignKeyReferenceget_reference_to_parent (const Table &parent) const
 
bool is_editable (bool &has_unnested_1n) const
 

Public Attributes

std::string schema
 
std::string table
 
std::string table_alias
 
std::vector< std::shared_ptr< ObjectField > > fields
 
std::optional< OwnerUserFielduser_ownership_field
 
Operation::ValueType crud_operations
 
bool with_check_ = true
 
bool unnests_to_value = false
 

Protected Member Functions

std::string as_graphql (int depth, bool extended) const
 

Protected Attributes

std::optional< bool > needs_etag_
 

Constructor & Destructor Documentation

◆ ~Table()

virtual mrs::database::entry::Table::~Table ( )
virtualdefault

Member Function Documentation

◆ as_graphql()

std::string mrs::database::entry::Table::as_graphql ( int  depth,
bool  extended 
) const
protected

◆ foreach_field() [1/3]

template<typename R >
R mrs::database::entry::Table::foreach_field ( std::function< R(const Column &)>  column_fn,
std::function< R(const ForeignKeyReference &)>  fk_fn 
) const
inline

◆ foreach_field() [2/3]

template<typename T , typename R >
R mrs::database::entry::Table::foreach_field ( std::function< R(const T &)>  fn) const
inline

◆ foreach_field() [3/3]

template<typename T , typename R >
R mrs::database::entry::Table::foreach_field ( std::function< R(T &)>  fn) const
inline

◆ get_column() [1/2]

std::shared_ptr< Column > mrs::database::entry::Table::get_column ( const entry::UniversalId &  id) const
inline

◆ get_column() [2/2]

std::shared_ptr< Column > mrs::database::entry::Table::get_column ( std::string_view  column_name) const
inline

◆ get_column_or_throw()

std::shared_ptr< Column > mrs::database::entry::Table::get_column_or_throw ( std::string_view  column_name) const
inline

◆ get_column_with_field_name()

std::shared_ptr< Column > mrs::database::entry::Table::get_column_with_field_name ( const std::string &  name) const
inline

◆ get_field()

std::shared_ptr< ObjectField > mrs::database::entry::Table::get_field ( std::string_view  name) const
inline

◆ get_field_or_throw()

std::shared_ptr< ObjectField > mrs::database::entry::Table::get_field_or_throw ( std::string_view  name) const
inline

◆ get_reference_to_parent()

const ForeignKeyReference & mrs::database::entry::Table::get_reference_to_parent ( const Table parent) const
inline

◆ is_editable()

bool mrs::database::entry::Table::is_editable ( bool &  has_unnested_1n) const

◆ needs_etag()

bool mrs::database::entry::Table::needs_etag ( ) const

◆ primary_key()

std::vector< const Column * > mrs::database::entry::Table::primary_key ( ) const
inline

◆ table_key()

std::string mrs::database::entry::Table::table_key ( ) const
inline

◆ try_get_generated_id_column()

const Column * mrs::database::entry::Table::try_get_generated_id_column ( ) const
inline

◆ try_get_row_ownership_column()

const Column * mrs::database::entry::Table::try_get_row_ownership_column ( ) const
inline

◆ with_check()

bool mrs::database::entry::Table::with_check ( const Column column) const
inline

◆ with_delete()

bool mrs::database::entry::Table::with_delete ( ) const
inline

◆ with_insert()

bool mrs::database::entry::Table::with_insert ( ) const
inline

◆ with_update() [1/2]

bool mrs::database::entry::Table::with_update ( ) const
inline

◆ with_update() [2/2]

bool mrs::database::entry::Table::with_update ( const Column column) const
inline

◆ with_update_any_column()

bool mrs::database::entry::Table::with_update_any_column ( ) const
inline

Member Data Documentation

◆ crud_operations

Operation::ValueType mrs::database::entry::Table::crud_operations

◆ fields

std::vector<std::shared_ptr<ObjectField> > mrs::database::entry::Table::fields

◆ needs_etag_

std::optional<bool> mrs::database::entry::Table::needs_etag_
mutableprotected

◆ schema

std::string mrs::database::entry::Table::schema

◆ table

std::string mrs::database::entry::Table::table

◆ table_alias

std::string mrs::database::entry::Table::table_alias

◆ unnests_to_value

bool mrs::database::entry::Table::unnests_to_value = false

◆ user_ownership_field

std::optional<OwnerUserField> mrs::database::entry::Table::user_ownership_field

◆ with_check_

bool mrs::database::entry::Table::with_check_ = true

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