Lbug C++ API
Loading...
Searching...
No Matches
lbug::main::PreparedStatement Class Reference

A prepared statement is a parameterized query which can avoid planning the same query for repeated execution. More...

#include <prepared_statement.h>

Public Member Functions

LBUG_API ~PreparedStatement ()
LBUG_API bool isSuccess () const
LBUG_API std::string getErrorMessage () const
LBUG_API bool isReadOnly () const
const std::unordered_set< std::string > & getUnknownParameters () const
std::unordered_set< std::string > getKnownParameters ()
void updateParameter (const std::string &name, common::Value *value)
void addParameter (const std::string &name, common::Value *value)
std::string getName () const
common::StatementType getStatementType () const

Static Public Member Functions

static std::unique_ptr< PreparedStatementgetPreparedStatementWithError (const std::string &errorMessage)

Friends

class Connection
class ClientContext

Detailed Description

A prepared statement is a parameterized query which can avoid planning the same query for repeated execution.

Constructor & Destructor Documentation

◆ ~PreparedStatement()

LBUG_API lbug::main::PreparedStatement::~PreparedStatement ( )

Member Function Documentation

◆ addParameter()

void lbug::main::PreparedStatement::addParameter ( const std::string & name,
common::Value * value )

◆ getErrorMessage()

LBUG_API std::string lbug::main::PreparedStatement::getErrorMessage ( ) const
Returns
the error message if the query is not prepared successfully.

◆ getKnownParameters()

std::unordered_set< std::string > lbug::main::PreparedStatement::getKnownParameters ( )

◆ getName()

std::string lbug::main::PreparedStatement::getName ( ) const
inline

◆ getPreparedStatementWithError()

std::unique_ptr< PreparedStatement > lbug::main::PreparedStatement::getPreparedStatementWithError ( const std::string & errorMessage)
static

◆ getStatementType()

common::StatementType lbug::main::PreparedStatement::getStatementType ( ) const

◆ getUnknownParameters()

const std::unordered_set< std::string > & lbug::main::PreparedStatement::getUnknownParameters ( ) const
inline

◆ isReadOnly()

LBUG_API bool lbug::main::PreparedStatement::isReadOnly ( ) const
Returns
the prepared statement is read-only or not.

◆ isSuccess()

LBUG_API bool lbug::main::PreparedStatement::isSuccess ( ) const
Returns
the query is prepared successfully or not.

◆ updateParameter()

void lbug::main::PreparedStatement::updateParameter ( const std::string & name,
common::Value * value )

◆ ClientContext

friend class ClientContext
friend

◆ Connection

friend class Connection
friend

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