
Public Types | |
| enum | { FM_FIRST = 1, FM_LAST, FM_ABSOLUTE, FM_RELATIVE, FM_ALL, FM_FORWARD, FM_FORWARD_ALL, FM_BACKWARD, FM_BACKWARD_ALL } |
| Fetch and move actions. More... | |
Public Member Functions | |
| Query (Database *db) | |
| Create new query object for database. | |
| virtual | ~Query () |
| Destroy query object, free resources. | |
| virtual void | clear () |
| Closes query and frees resources. | |
| virtual bool | open (const wxString &sql) |
| Open query - execute sql statement. | |
| const wxString | last_err () const |
| Returns message for last error. | |
| virtual bool | fetch (int rows, int flag=FM_FORWARD) |
| Fetch data of some rows. | |
| virtual bool | move (int rows, int flag=FM_FORWARD) |
| Move cursor to different row without fetching data. | |
Public Attributes | |
| const wxString | PORTAL_NAME |
| Name of portal, used by this query. | |
| anonymous enum |
Fetch and move actions.
| wxPg::Query::Query | ( | Database * | db | ) | [explicit] |
Create new query object for database.
| db | - database connection. |
| virtual wxPg::Query::~Query | ( | ) | [virtual] |
Destroy query object, free resources.
| virtual void wxPg::Query::clear | ( | ) | [virtual] |
| virtual bool wxPg::Query::open | ( | const wxString & | sql | ) | [virtual] |
Open query - execute sql statement.
Call last_err() for error message. Call fetch() to get all or part of returned result.
| sql | specifies an SQL statement. |
Reimplemented in wxPg::Query_browser.
| const wxString wxPg::Query::last_err | ( | ) | const |
Returns message for last error.
| virtual bool wxPg::Query::fetch | ( | int | rows, | |
| int | flag = FM_FORWARD | |||
| ) | [virtual] |
Fetch data of some rows.
You need to call this method to obtain any data from query.
| rows | - number of rows to be fetched. Ignored for some flags. | |
| flag | sould be one of fetch and move actions. |
Reimplemented in wxPg::Query_browser.
| virtual bool wxPg::Query::move | ( | int | rows, | |
| int | flag = FM_FORWARD | |||
| ) | [virtual] |
Move cursor to different row without fetching data.
| rows | specifiels number of rows to move. Ignored for some flags. | |
| flag | sould be one of fetch and move actions. Not all are accepted. |
Reimplemented in wxPg::Query_browser.
| const wxString wxPg::Query::PORTAL_NAME |
Name of portal, used by this query.
Used internally.
1.5.6