Every SQL statement can be decomposed in the SqlStatement tree structure. More...
List of all members.
Public Member Functions |
| | SqlStatement () |
| | SqlStatement (GdaSqlStatement* gobject, bool make_a_copy=true) |
| | SqlStatement (const SqlStatement& other) |
| SqlStatement& | operator= (const SqlStatement& other) |
| | ~SqlStatement () |
| void | swap (SqlStatement& other) |
| GdaSqlStatement* | gobj () |
| | Provides access to the underlying C instance.
|
| const GdaSqlStatement* | gobj () const |
| | Provides access to the underlying C instance.
|
| GdaSqlStatement* | gobj_copy () const |
| | Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
|
| | SqlStatement (SqlStatementType type=SQL_STATEMENT_SELECT) |
| bool | empty () const |
| serialize () const |
| | Creates a string representation of stmt.
|
| bool | check_structure () const |
| | Checks for any error in stmt's structure to make sure the statement is valid (for example a SELECT statement must at least return a column, a DELETE statement must specify which table is targeted).
|
| bool | check_validity (const Connection >& cnc) |
| | If cnc is not 0, then checks that all the database objects referenced in the statement actually exist in the connection's database (for example the table being updated in a UPDATE statement must exist in the connection's database for the check to succeed).
|
| void | check_clean () |
| | Cleans any data set by a previous call to gda_sql_statement_check_validity().
|
| bool | normalize (const Connection >& cnc) |
| | "Normalizes" (in place) some parts of stmt, which means stmt may be modified.
|
Static Public Member Functions |
| static SqlStatementType | string_to_type (const type) |
| | Converts a string to a Gda::SqlStatementType value, see also gda_sql_statement_type_to_string()
|
Protected Attributes |
| GdaSqlStatement* | gobject_ |
Related Functions |
(Note that these are not member functions.)
|
| void | swap (SqlStatement& lhs, SqlStatement& rhs) |
| Gnome::Gda::SqlStatement | wrap (GdaSqlStatement* object, bool take_copy=false) |
| | A
|
Detailed Description
Every SQL statement can be decomposed in the SqlStatement tree structure.
See the documentation for the underlying GdaSqlStatement.
Constructor & Destructor Documentation
| Gnome::Gda::SqlStatement::SqlStatement |
( |
| ) |
|
| Gnome::Gda::SqlStatement::SqlStatement |
( |
GdaSqlStatement * |
gobject, |
|
|
bool |
make_a_copy = true |
|
) |
| [explicit] |
| Gnome::Gda::SqlStatement::SqlStatement |
( |
const SqlStatement& |
other | ) |
|
| Gnome::Gda::SqlStatement::~SqlStatement |
( |
| ) |
|
| Gnome::Gda::SqlStatement::SqlStatement |
( |
SqlStatementType |
type = SQL_STATEMENT_SELECT | ) |
[explicit] |
Member Function Documentation
| void Gnome::Gda::SqlStatement::check_clean |
( |
| ) |
|
Cleans any data set by a previous call to gda_sql_statement_check_validity().
| bool Gnome::Gda::SqlStatement::check_structure |
( |
| ) |
const |
Checks for any error in stmt's structure to make sure the statement is valid (for example a SELECT statement must at least return a column, a DELETE statement must specify which table is targeted).
- Returns:
true if no error occurred.
| bool Gnome::Gda::SqlStatement::check_validity |
( |
const Connection >& |
cnc | ) |
|
If cnc is not 0, then checks that all the database objects referenced in the statement actually exist in the connection's database (for example the table being updated in a UPDATE statement must exist in the connection's database for the check to succeed).
This method fills the stmt->validity_meta_struct attribute.
If cnc is 0, then remove any information from a previous call to this method stored in stmt. In this case, the stmt->validity_meta_struct attribute is cleared.
Also note that some parts of stmt may be modified: for example leading and trailing spaces in aliases or objects names will be removed.
- Parameters:
-
- Returns:
true if no error occurred.
| bool Gnome::Gda::SqlStatement::empty |
( |
| ) |
const |
| GdaSqlStatement* Gnome::Gda::SqlStatement::gobj |
( |
| ) |
[inline] |
Provides access to the underlying C instance.
| const GdaSqlStatement* Gnome::Gda::SqlStatement::gobj |
( |
| ) |
const [inline] |
Provides access to the underlying C instance.
| GdaSqlStatement* Gnome::Gda::SqlStatement::gobj_copy |
( |
| ) |
const |
Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
| bool Gnome::Gda::SqlStatement::normalize |
( |
const Connection >& |
cnc | ) |
|
"Normalizes" (in place) some parts of stmt, which means stmt may be modified.
At the moment any "*" field in a SELECT statement will be replaced by one Gda::SqlSelectField structure for each field in the referenced table.
- Parameters:
-
- Returns:
true if no error occurred.
Creates a string representation of stmt.
- Returns:
- A new string.
Friends And Related Function Documentation
- Parameters:
-
| lhs | The left-hand side |
| rhs | The right-hand side |
A Glib::wrap() method for this object.
- Parameters:
-
| object | The C instance. |
| take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |
- Returns:
- A C++ instance that wraps this C instance.
Member Data Documentation
The documentation for this class was generated from the following file: