MySQL 9.3.0
Source Code Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
mrs::database::dv::RowUpdateBase Class Referenceabstract

#include <update.h>

Inheritance diagram for mrs::database::dv::RowUpdateBase:
[legend]

Public Member Functions

 RowUpdateBase (std::shared_ptr< JsonMappingUpdater::Operation > parent, std::shared_ptr< Table > table, const PrimaryKeyColumnValues &pk, const ObjectRowOwnership &row_ownership)
 
 RowUpdateBase (std::shared_ptr< JsonMappingUpdater::Operation > parent, std::shared_ptr< Table > table, const ObjectRowOwnership &row_ownership)
 
void process_to_many (const ForeignKeyReference &fk, JSONInputArray input) override
 
void run (MySQLSession *session) override
 
- Public Member Functions inherited from mrs::database::dv::RowChangeOperation
bool empty () const
 
void process_to_one (const ForeignKeyReference &ref, JSONInputObject input) override
 
std::shared_ptr< RowChangeOperationadd_update_referenced_from_this (const ForeignKeyReference &fk, const PrimaryKeyColumnValues &pk)
 
virtual std::shared_ptr< RowChangeOperationadd_dummy_update_referenced_from_this (const ForeignKeyReference &fk, const PrimaryKeyColumnValues &pk)
 
std::shared_ptr< RowChangeOperationadd_update_referencing_this (const ForeignKeyReference &fk, const PrimaryKeyColumnValues &pk, bool error_if_not_found=true)
 
std::shared_ptr< RowChangeOperationadd_clear_all_referencing_this (const ForeignKeyReference &fk)
 
std::shared_ptr< RowChangeOperationadd_insert_referenced_from_this (const ForeignKeyReference &fk)
 
std::shared_ptr< RowChangeOperationadd_insert_referencing_this (const ForeignKeyReference &fk)
 
std::shared_ptr< RowChangeOperationadd_upsert_referencing_this (const ForeignKeyReference &fk)
 
std::shared_ptr< RowDeleteReferencingadd_delete_referencing_this (const ForeignKeyReference &fk, const PrimaryKeyColumnValues &pk)
 
std::shared_ptr< RowDeleteReferencingadd_delete_all_referencing_this (const ForeignKeyReference &fk)
 
void on_value (const Column &column, const JSONInputObject::MemberReference &value) override
 
virtual void on_value (const Column &column, const mysqlrouter::sqlstring &value)
 
void on_no_value (const Column &column, const JSONInputObject::MemberReference &) override
 
virtual void on_referenced_row (const ForeignKeyReference &fk, const JSONInputObject &input, std::optional< PrimaryKeyColumnValues > child_pk)
 
void on_referencing_row (const ForeignKeyReference &fk, std::shared_ptr< RowChangeOperation > ref_op)
 
virtual void set_column_sql_value (const Column &column, const mysqlrouter::sqlstring &value)
 
void set_column_value (const Column &column, const mysqlrouter::sqlstring &value)
 
void on_parent_pk_resolved (const PrimaryKeyColumnValues &parent_pk) override
 
void resolve_fk_to_parent (const ForeignKeyReference &fk, const PrimaryKeyColumnValues &parent_pk)
 
- Public Member Functions inherited from mrs::database::dv::JsonMappingUpdater::Operation
 Operation (std::shared_ptr< Operation > parent, std::shared_ptr< Table > table, const ObjectRowOwnership &row_ownership)
 
 Operation (std::shared_ptr< Operation > parent, std::shared_ptr< Table > table, const PrimaryKeyColumnValues &pk, const ObjectRowOwnership &row_ownership)
 
virtual const PrimaryKeyColumnValuesprimary_key () const
 
const std::shared_ptr< Table > & table () const
 
std::shared_ptr< Operationparent () const
 
bool is_root () const
 
size_t affected () const
 
virtual void process (JSONInputObject input)
 
virtual void append_match_condition (mysqlrouter::sqlstring &sql) const
 
- Public Member Functions inherited from mrs::database::QueryRaw
virtual ~QueryRaw ()=default
 
virtual void query (MySQLSession *session, const std::string &q)
 
virtual void prepare_and_execute (MySQLSession *session, const std::string &q, std::vector< MYSQL_BIND > pt, const OnResultSetEnd &on_resultset_end)
 
std::unique_ptr< MySQLSession::ResultRowquery_one (MySQLSession *session)
 
std::unique_ptr< MySQLSession::ResultRowquery_one (MySQLSession *session, const std::string &q)
 
virtual void on_row (const ResultRow &r)
 
virtual void on_metadata (unsigned number, MYSQL_FIELD *fields)
 

Protected Member Functions

virtual void do_update (MySQLSession *session)=0
 
- Protected Member Functions inherited from mrs::database::dv::RowChangeOperation
 RowChangeOperation (std::shared_ptr< Operation > parent, std::shared_ptr< Table > table, const ObjectRowOwnership &row_ownership)
 
 RowChangeOperation (std::shared_ptr< Operation > parent, std::shared_ptr< Table > table, const PrimaryKeyColumnValues &pk, const ObjectRowOwnership &row_ownership)
 
virtual void run_before (std::shared_ptr< Operation > op)
 
void cancel_before (std::shared_ptr< Operation > op)
 
virtual void run_after (std::shared_ptr< Operation > op)
 
- Protected Member Functions inherited from mrs::database::dv::JsonMappingUpdater::Operation
bool add_row_owner_check (mysqlrouter::sqlstring *sql, bool qualify_table) const
 
mysqlrouter::sqlstring join_to_parent (std::vector< std::shared_ptr< JsonMappingUpdater::Operation > > *parents) const
 
void execute (MySQLSession *session) override
 

Additional Inherited Members

- Public Types inherited from mrs::database::QueryRaw
using MySQLSession = mysqlrouter::MySQLSession
 
using Row = MySQLSession::Row
 
using ResultRow = MySQLSession::ResultRow
 
using OnResultSetEnd = MySQLSession::OnResultSetEnd
 
- Public Attributes inherited from mrs::database::dv::JsonMappingUpdater::Operation
std::weak_ptr< Operationparent_
 
std::shared_ptr< Tabletable_
 
const ObjectRowOwnershiprow_ownership_
 
- Public Attributes inherited from mrs::database::QueryRaw
mysqlrouter::sqlstring query_
 
std::optional< std::string > sqlstate_
 
MYSQL_FIELDmetadata_ {nullptr}
 
unsigned num_of_metadata_ {0}
 
- Protected Attributes inherited from mrs::database::dv::RowChangeOperation
std::vector< mysqlrouter::sqlstringcolumns_
 
std::vector< mysqlrouter::sqlstringvalues_
 
std::vector< bool > not_updatable_
 
std::optional< ForeignKeyReferencepending_fk_to_parent_
 
std::list< std::shared_ptr< Operation > > before_
 
std::list< std::shared_ptr< Operation > > after_
 
- Protected Attributes inherited from mrs::database::dv::JsonMappingUpdater::Operation
size_t affected_ = 0
 
PrimaryKeyColumnValues pk_
 

Constructor & Destructor Documentation

◆ RowUpdateBase() [1/2]

mrs::database::dv::RowUpdateBase::RowUpdateBase ( std::shared_ptr< JsonMappingUpdater::Operation parent,
std::shared_ptr< Table table,
const PrimaryKeyColumnValues pk,
const ObjectRowOwnership row_ownership 
)

◆ RowUpdateBase() [2/2]

mrs::database::dv::RowUpdateBase::RowUpdateBase ( std::shared_ptr< JsonMappingUpdater::Operation parent,
std::shared_ptr< Table table,
const ObjectRowOwnership row_ownership 
)

Member Function Documentation

◆ do_update()

virtual void mrs::database::dv::RowUpdateBase::do_update ( MySQLSession session)
protectedpure virtual

◆ process_to_many()

void mrs::database::dv::RowUpdateBase::process_to_many ( const ForeignKeyReference fk,
JSONInputArray  input 
)
overridevirtual

◆ run()

void mrs::database::dv::RowUpdateBase::run ( MySQLSession session)
overridevirtual

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