MySQL 9.3.0
Source Code Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
shcore::polyglot::PolyResult Class Reference

#include <polyglot_result.h>

Inheritance diagram for shcore::polyglot::PolyResult:
[legend]

Public Member Functions

 PolyResult (const std::shared_ptr< jit_executor::db::IResult > &result)
 
 ~PolyResult () override=default
 
std::string class_name () const override
 
Value call (const std::string &name, const Argument_list &args) override
 Calls the named method with the given args. More...
 
- Public Member Functions inherited from shcore::polyglot::Object_bridge
virtual ~Object_bridge ()=default
 
virtual std::string & append_descr (std::string &s_out, int indent=-1, int quote_strings=0) const
 
virtual std::string & append_repr (std::string &s_out) const
 
virtual void append_json (shcore::JSON_dumper &dumper) const
 
virtual std::vector< std::string > get_members () const
 Returns the list of members that this object has. More...
 
virtual bool has_member (const std::string &prop) const
 Verifies if the object has a member. More...
 
virtual void set_member (const std::string &, Value)
 Sets the value of a member. More...
 
virtual bool is_indexed () const
 Returns the value of a member. More...
 
virtual Value get_member (size_t) const
 Returns the value of a member. More...
 
virtual void set_member (size_t, Value)
 Sets the value of a member. More...
 
virtual size_t length () const
 Returns the number of indexable members. More...
 
bool has_method (const std::string &name) const
 Returns true if a method with the given name exists. More...
 
virtual Value get_member (const std::string &) const
 Returns the value of a member. More...
 

Private Member Functions

std::vector< std::string > * methods () const override
 
std::vector< std::string > get_column_names () const
 
std::shared_ptr< Rowfetch_one () const
 
shcore::Array_t fetch_all () const
 
shcore::Dictionary_t fetch_one_object () const
 
bool next_result ()
 
void reset_column_cache ()
 
void update_column_cache () const
 

Private Attributes

std::shared_ptr< jit_executor::db::IResultm_result
 
shcore::Array_t m_columns
 
std::vector< std::string > m_column_names
 

Static Private Attributes

static std::vector< std::string > m_methods
 

Constructor & Destructor Documentation

◆ PolyResult()

shcore::polyglot::PolyResult::PolyResult ( const std::shared_ptr< jit_executor::db::IResult > &  result)
explicit

◆ ~PolyResult()

shcore::polyglot::PolyResult::~PolyResult ( )
overridedefault

Member Function Documentation

◆ call()

Value shcore::polyglot::PolyResult::call ( const std::string &  ,
const Argument_list  
)
overridevirtual

Calls the named method with the given args.

Reimplemented from shcore::polyglot::Object_bridge.

◆ class_name()

std::string shcore::polyglot::PolyResult::class_name ( ) const
inlineoverridevirtual

◆ fetch_all()

shcore::Array_t shcore::polyglot::PolyResult::fetch_all ( ) const
private

◆ fetch_one()

std::shared_ptr< Row > shcore::polyglot::PolyResult::fetch_one ( ) const
private

◆ fetch_one_object()

shcore::Dictionary_t shcore::polyglot::PolyResult::fetch_one_object ( ) const
private

◆ get_column_names()

std::vector< std::string > shcore::polyglot::PolyResult::get_column_names ( ) const
private

◆ methods()

std::vector< std::string > * shcore::polyglot::PolyResult::methods ( ) const
inlineoverrideprivatevirtual

Reimplemented from shcore::polyglot::Object_bridge.

◆ next_result()

bool shcore::polyglot::PolyResult::next_result ( )
private

◆ reset_column_cache()

void shcore::polyglot::PolyResult::reset_column_cache ( )
private

◆ update_column_cache()

void shcore::polyglot::PolyResult::update_column_cache ( ) const
private

Member Data Documentation

◆ m_column_names

std::vector<std::string> shcore::polyglot::PolyResult::m_column_names
mutableprivate

◆ m_columns

shcore::Array_t shcore::polyglot::PolyResult::m_columns
mutableprivate

◆ m_methods

std::vector< std::string > shcore::polyglot::PolyResult::m_methods
staticprivate
Initial value:
= {
constexpr const char * k_fetch_one_object
Definition: polyglot_result.cc:40
constexpr const char * k_fetch_one
Definition: polyglot_result.cc:38
constexpr const char * k_next_result
Definition: polyglot_result.cc:41
constexpr const char * k_fetch_all
Definition: polyglot_result.cc:39

◆ m_result

std::shared_ptr<jit_executor::db::IResult> shcore::polyglot::PolyResult::m_result
private

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