MySQL 9.3.0
Source Code Documentation
mrs::database::QueryRestTableSingleRow Class Reference

#include <query_rest_table_single_row.h>

Inheritance diagram for mrs::database::QueryRestTableSingleRow:
[legend]

Public Types

using Object = entry::Object
 
using ObjectField = entry::ObjectField
 
using PrimaryKeyColumnValues = mrs::database::PrimaryKeyColumnValues
 
using ObjectFieldFilter = dv::ObjectFieldFilter
 
- Public Types inherited from mrs::database::QueryRestTable
using Object = entry::Object
 
using ObjectField = entry::ObjectField
 
using UserId = entry::AuthUser::UserId
 
using UniversalId = entry::UniversalId
 
using RowGroupOwnership = entry::RowGroupOwnership
 
using RowUserOwnership = entry::RowUserOwnership
 
using ObjectFieldFilter = dv::ObjectFieldFilter
 
using VectorOfRowGroupOwnershp = std::vector< RowGroupOwnership >
 

Public Member Functions

 QueryRestTableSingleRow (const JsonTemplateFactory *factory=nullptr, bool encode_bigints_as_string=false, const bool include_links=true, const RowLockType lock_rows=RowLockType::NONE, uint64_t max_execution_time_ms=0)
 
virtual void query_entry (MySQLSession *session, std::shared_ptr< database::entry::Object > object, const PrimaryKeyColumnValues &pk, const dv::ObjectFieldFilter &field_filter, const std::string &url_route, const ObjectRowOwnership &row_ownership, const FilterObjectGenerator &fog={}, const bool compute_etag=false, const std::string &metadata_gtid={}, const bool fetch_any_owner=false)
 
bool is_owned () const
 
- Public Member Functions inherited from mrs::database::QueryRestTable
 QueryRestTable (const JsonTemplateFactory *factory=nullptr, bool encode_bigints_as_strings=false, bool include_links=true, uint64_t max_execution_time_ms=0)
 
 QueryRestTable (bool encode_bigints_as_strings, bool include_links, uint64_t max_execution_time_ms=0)
 
virtual void query_entries (MySQLSession *session, std::shared_ptr< database::entry::Object > object, const ObjectFieldFilter &field_filter, const uint64_t offset, const uint64_t limit, const std::string &url, const bool is_default_limit, const ObjectRowOwnership &row_ownership={}, const FilterObjectGenerator &fog={}, const bool compute_etag=false)
 

Private Member Functions

void on_row (const ResultRow &r) override
 
void build_query (const dv::ObjectFieldFilter &field_filter, const std::string &url_route, const ObjectRowOwnership &row_ownership, const PrimaryKeyColumnValues &pk, bool fetch_any_owner, const FilterObjectGenerator &fog)
 

Private Attributes

std::string metadata_gtid_ {}
 
bool is_owned_ = true
 
RowLockType lock_rows_ = RowLockType::NONE
 

Additional Inherited Members

- Public Attributes inherited from mrs::database::QueryRestTable
std::string response
 
uint64_t items {0}
 
- Protected Types inherited from mrs::database::QueryRaw
using MySQLSession = mysqlrouter::MySQLSession
 
using Row = MySQLSession::Row
 
using ResultRow = MySQLSession::ResultRow
 
using OnResultSetEnd = MySQLSession::OnResultSetEnd
 
- Protected Member Functions inherited from mrs::database::QueryRestTable
void create_serializer ()
 
void on_metadata (unsigned number, MYSQL_FIELD *fields) override
 
const mysqlrouter::sqlstringbuild_where (const ObjectRowOwnership &row_ownership)
 
const mysqlrouter::sqlstringbuild_where (const RowUserOwnership &row_user, UserId *user_id, const std::vector< RowGroupOwnership > &row_groups, const std::set< UniversalId > &user_groups)
 
void build_query (const ObjectFieldFilter &field_filter, const uint64_t offset, const uint64_t limit, const std::string &url, const ObjectRowOwnership &row_ownership, const FilterObjectGenerator &fog)
 
void extend_where (mysqlrouter::sqlstring &where, const FilterObjectGenerator &fog)
 
- Protected Member Functions inherited from mrs::database::QueryRaw
virtual ~QueryRaw ()=default
 
virtual void execute (MySQLSession *session)
 
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)
 
- Protected Attributes inherited from mrs::database::QueryRestTable
Config config_
 
std::vector< helper::Columncolumns_
 
std::shared_ptr< database::JsonTemplateserializer_
 
std::shared_ptr< Objectobject_
 
const ObjectFieldFilterfield_filter_ {nullptr}
 
bool compute_etag_ {false}
 
mysqlrouter::sqlstring where_
 
bool metadata_received_ {false}
 
const JsonTemplateFactoryfactory_
 
bool encode_bigints_as_strings_
 
bool include_links_
 
uint64_t max_execution_time_ms_
 
- Protected Attributes inherited from mrs::database::QueryRaw
mysqlrouter::sqlstring query_
 
std::optional< std::string > sqlstate_
 
MYSQL_FIELDmetadata_ {nullptr}
 
unsigned num_of_metadata_ {0}
 

Member Typedef Documentation

◆ Object

◆ ObjectField

◆ ObjectFieldFilter

◆ PrimaryKeyColumnValues

Constructor & Destructor Documentation

◆ QueryRestTableSingleRow()

mrs::database::QueryRestTableSingleRow::QueryRestTableSingleRow ( const JsonTemplateFactory factory = nullptr,
bool  encode_bigints_as_string = false,
const bool  include_links = true,
const RowLockType  lock_rows = RowLockType::NONE,
uint64_t  max_execution_time_ms = 0 
)
explicit

Member Function Documentation

◆ build_query()

void mrs::database::QueryRestTableSingleRow::build_query ( const dv::ObjectFieldFilter field_filter,
const std::string &  url_route,
const ObjectRowOwnership row_ownership,
const PrimaryKeyColumnValues pk,
bool  fetch_any_owner,
const FilterObjectGenerator fog 
)
private

◆ is_owned()

bool mrs::database::QueryRestTableSingleRow::is_owned ( ) const
inline

◆ on_row()

void mrs::database::QueryRestTableSingleRow::on_row ( const ResultRow r)
overrideprivatevirtual

Reimplemented from mrs::database::QueryRestTable.

◆ query_entry()

void mrs::database::QueryRestTableSingleRow::query_entry ( MySQLSession session,
std::shared_ptr< database::entry::Object >  object,
const PrimaryKeyColumnValues pk,
const dv::ObjectFieldFilter field_filter,
const std::string &  url_route,
const ObjectRowOwnership row_ownership,
const FilterObjectGenerator fog = {},
const bool  compute_etag = false,
const std::string &  metadata_gtid = {},
const bool  fetch_any_owner = false 
)
virtual

Member Data Documentation

◆ is_owned_

bool mrs::database::QueryRestTableSingleRow::is_owned_ = true
private

◆ lock_rows_

RowLockType mrs::database::QueryRestTableSingleRow::lock_rows_ = RowLockType::NONE
private

◆ metadata_gtid_

std::string mrs::database::QueryRestTableSingleRow::metadata_gtid_ {}
private

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