MySQL 9.3.0
Source Code Documentation
shcore::polyglot::Row Class Reference

#include <polyglot_row.h>

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

Public Member Functions

 Row (const std::vector< std::string > &names, const jit_executor::db::IRow &row)
 
std::string class_name () const override
 
shcore::Value get_field (const std::string &field) const
 
bool has_member (const std::string &prop) const override
 Verifies if the object has a member. More...
 
shcore::Value get_member (const std::string &prop) const override
 Returns the value of a member. More...
 
shcore::Value get_member (size_t index) const override
 Returns the value of a member. More...
 
size_t length () const override
 Returns the number of indexable members. More...
 
bool is_indexed () const override
 Returns the value of a member. More...
 
shcore::Dictionary_t as_object ()
 
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 void set_member (const std::string &, Value)
 Sets the value of a member. More...
 
virtual void set_member (size_t, Value)
 Sets the value of a member. More...
 
bool has_method (const std::string &name) const
 Returns true if a method with the given name exists. More...
 

Private Member Functions

const std::vector< std::string > * methods () const override
 
const std::vector< std::string > * properties () const override
 

Private Attributes

std::vector< std::string > m_names
 
std::vector< shcore::Valuem_value_array
 

Static Private Attributes

static std::vector< std::string > m_methods = {k_get_field}
 

Constructor & Destructor Documentation

◆ Row()

Row< T >::Row ( const std::vector< std::string > &  names,
const jit_executor::db::IRow row 
)

Member Function Documentation

◆ as_object()

shcore::Dictionary_t Row< T >::as_object ( )

◆ call()

Value Row< T >::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::Row::class_name ( ) const
inlineoverridevirtual

◆ get_field()

shcore::Value Row< T >::get_field ( const std::string &  field) const

◆ get_member() [1/2]

shcore::Value Row< T >::get_member ( const std::string &  ) const
overridevirtual

Returns the value of a member.

Reimplemented from shcore::polyglot::Object_bridge.

◆ get_member() [2/2]

shcore::Value Row< T >::get_member ( size_t  ) const
overridevirtual

Returns the value of a member.

Reimplemented from shcore::polyglot::Object_bridge.

◆ has_member()

bool Row< T >::has_member ( const std::string &  prop) const
overridevirtual

Verifies if the object has a member.

Reimplemented from shcore::polyglot::Object_bridge.

◆ is_indexed()

bool shcore::polyglot::Row::is_indexed ( ) const
inlineoverridevirtual

Returns the value of a member.

Reimplemented from shcore::polyglot::Object_bridge.

◆ length()

size_t shcore::polyglot::Row::length ( ) const
inlineoverridevirtual

Returns the number of indexable members.

Reimplemented from shcore::polyglot::Object_bridge.

◆ methods()

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

Reimplemented from shcore::polyglot::Object_bridge.

◆ properties()

const std::vector< std::string > * shcore::polyglot::Row::properties ( ) const
inlineoverrideprivatevirtual

Reimplemented from shcore::polyglot::Object_bridge.

Member Data Documentation

◆ m_methods

std::vector< std::string > Row< T >::m_methods = {k_get_field}
staticprivate

◆ m_names

std::vector<std::string> shcore::polyglot::Row::m_names
private

◆ m_value_array

std::vector<shcore::Value> shcore::polyglot::Row::m_value_array
private

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