Writable cursor that allows reading and updating of rows in a persistent table.
More...
#include <service_rules_table.h>
Writable cursor that allows reading and updating of rows in a persistent table.
◆ column_id
◆ Cursor() [1/3]
rules_table_service::Cursor::Cursor |
( |
THD * |
thd | ) |
|
|
explicit |
Creates a cursor to an already-opened table.
The constructor is kept explicit because of implicit conversions from void*.
◆ Cursor() [2/3]
rules_table_service::Cursor::Cursor |
( |
| ) |
|
|
inline |
Creates a past-the-end cursor.
◆ Cursor() [3/3]
rules_table_service::Cursor::Cursor |
( |
const Cursor & |
| ) |
|
|
default |
◆ ~Cursor()
rules_table_service::Cursor::~Cursor |
( |
| ) |
|
Closes the table scan if initiated and commits the transaction.
◆ enabled_column()
column_id rules_table_service::Cursor::enabled_column |
( |
| ) |
const |
|
inline |
◆ fetch_string()
const char * rules_table_service::Cursor::fetch_string |
( |
int |
fieldno | ) |
|
Fetches the value of the column with the given number as a C string.
This interface is meant for crossing dynamic library boundaries, hence the use of C-style const char*. The function casts a column value to a C string and returns a copy, allocated in the callee's DL. The pointer must be freed using free_string().
- Parameters
-
fieldno | One of PATTERN_COLUMN, REPLACEMENT_COLUMN, ENABLED_COLUMN or MESSAGE_COLUMN. |
◆ field_index()
int rules_table_service::Cursor::field_index |
( |
const char * |
field_name | ) |
|
|
private |
◆ had_serious_read_error()
bool rules_table_service::Cursor::had_serious_read_error |
( |
| ) |
const |
True if there was an unexpected error while reading, e.g. other than EOF.
◆ make_writeable()
void rules_table_service::Cursor::make_writeable |
( |
| ) |
|
Prepares the write buffer for updating the current row.
◆ message_column()
column_id rules_table_service::Cursor::message_column |
( |
| ) |
const |
|
inline |
◆ normalized_pattern_column()
column_id rules_table_service::Cursor::normalized_pattern_column |
( |
| ) |
const |
|
inline |
◆ operator!=()
Inequality operator.
All cursors are considered different except past-the-end cursors.
◆ operator++()
Cursor & rules_table_service::Cursor::operator++ |
( |
| ) |
|
|
inline |
Advances this Cursor.
Read errors are kept, and had_serious_read_error() will tell if there was an unexpected error (e.g. not EOF) while reading.
◆ operator==()
bool rules_table_service::Cursor::operator== |
( |
const Cursor & |
other | ) |
|
|
inline |
Equality operator.
The only cursors that are equal are past-the-end cursors.
◆ pattern_column()
column_id rules_table_service::Cursor::pattern_column |
( |
| ) |
const |
|
inline |
◆ pattern_database_column()
column_id rules_table_service::Cursor::pattern_database_column |
( |
| ) |
const |
|
inline |
◆ pattern_digest_column()
column_id rules_table_service::Cursor::pattern_digest_column |
( |
| ) |
const |
|
inline |
◆ read()
int rules_table_service::Cursor::read |
( |
| ) |
|
|
private |
◆ replacement_column()
column_id rules_table_service::Cursor::replacement_column |
( |
| ) |
const |
|
inline |
◆ set()
void rules_table_service::Cursor::set |
( |
int |
colno, |
|
|
const char * |
str, |
|
|
size_t |
length |
|
) |
| |
Sets the value of column colno to a string value.
- Parameters
-
colno | The column number. |
str | The string. |
length | The string's length. |
◆ table_is_malformed()
bool rules_table_service::Cursor::table_is_malformed |
( |
| ) |
|
|
inline |
True if the table does not contain columns named 'pattern', 'replacement', 'enabled' and 'message'.
In this case the cursor is equal to any past-the-end Cursor.
◆ write()
int rules_table_service::Cursor::write |
( |
| ) |
|
Writes the row in the write buffer to the table at the current row.
◆ ILLEGAL_COLUMN_ID
const column_id rules_table_service::Cursor::ILLEGAL_COLUMN_ID = -1 |
|
static |
◆ m_enabled_column
int rules_table_service::Cursor::m_enabled_column |
|
private |
◆ m_is_finished
bool rules_table_service::Cursor::m_is_finished |
|
private |
◆ m_last_read_status
int rules_table_service::Cursor::m_last_read_status |
|
private |
◆ m_message_column
int rules_table_service::Cursor::m_message_column |
|
private |
◆ m_normalized_pattern_column
int rules_table_service::Cursor::m_normalized_pattern_column |
|
private |
◆ m_pattern_column
int rules_table_service::Cursor::m_pattern_column |
|
private |
◆ m_pattern_database_column
int rules_table_service::Cursor::m_pattern_database_column |
|
private |
◆ m_pattern_digest_column
int rules_table_service::Cursor::m_pattern_digest_column |
|
private |
◆ m_replacement_column
int rules_table_service::Cursor::m_replacement_column |
|
private |
◆ m_table_is_malformed
bool rules_table_service::Cursor::m_table_is_malformed |
|
private |
◆ m_table_list
Table_ref* rules_table_service::Cursor::m_table_list |
|
private |
◆ m_thd
THD* rules_table_service::Cursor::m_thd |
|
private |
The documentation for this class was generated from the following files: