#include <update_query.h>
Inheritance diagram for pqxxobject::update_query:
Public Types | |
typedef std::pair< std::string, std::string > | field_value |
Public Member Functions | |
update_query () | |
The constructor. | |
update_query (const std::string &table) | |
The constructor. | |
update_query (const update_query &rhs) | |
The copy constructor. | |
virtual | ~update_query () |
The destructor. | |
template<typename T, template< typename > class F> void | add (F< T > &field) |
Add a field to the query. | |
template<typename T, template< typename > class F> void | where (F< T > &field) |
Add a WHERE clause to the query. | |
void | where (const std::string &where_string) |
Add a WHERE clause to the query. | |
void | remove (const field_base &field) |
Remove a field from the query. | |
std::string | str () |
Get the query as a string. | |
Private Attributes | |
std::string | m_table_name |
std::list< field_value > | m_field_list |
std::string | m_where |
Convenience class to generate a database UPDATE query string.
Definition at line 59 of file update_query.h.
|
Definition at line 77 of file update_query.h. |
|
The constructor.
Definition at line 43 of file update_query.cc. |
|
The constructor.
Definition at line 51 of file update_query.cc. |
|
The copy constructor.
Definition at line 59 of file update_query.cc. |
|
The destructor.
Definition at line 67 of file update_query.cc. |
|
Add a field to the query.
Definition at line 84 of file update_query.h. References pqxxobject::query_helper< T, F >::apply(), m_field_list, and remove(). |
|
Remove a field from the query.
Definition at line 72 of file update_query.cc. References pqxxobject::field_base::get_column_name(), and m_field_list. Referenced by add(). |
|
Get the query as a string.
Definition at line 85 of file update_query.cc. References m_field_list, m_table_name, and m_where. Referenced by pqxxobject::operator<<(). |
|
Add a WHERE clause to the query.
Definition at line 111 of file update_query.h. References m_where. |
|
Add a WHERE clause to the query.
Definition at line 96 of file update_query.h. References pqxxobject::query_helper< T, F >::apply(), and m_where. |
|
Definition at line 130 of file update_query.h. |
|
Definition at line 129 of file update_query.h. Referenced by str(). |
|
Definition at line 131 of file update_query.h. |