MySQL  8.0.20
Source Code Documentation
Persisted_rule Class Reference

A rule as persisted on disk. More...

#include <persisted_rule.h>

Public Member Functions

 Persisted_rule (rts::Cursor *c)
 Constructs a Persisted_rule object that copies all data into the current heap. More...
 
void set_message (const std::string &message_arg)
 Convenience function, may be called with a const char*. More...
 
void set_pattern_digest (const std::string &s)
 Convenience function, may be called with a const char*. More...
 
void set_normalized_pattern (const std::string &s)
 Convenience function, may be called with a const char*. More...
 
bool write_to (rts::Cursor *c)
 Writes the values in this Persisted_rule to the table at the row pointed to by the cursor. More...
 

Public Attributes

Mysql::Nullable< std::string > pattern
 The rewrite rule's pattern string. More...
 
Mysql::Nullable< std::string > pattern_db
 The pattern's current database. More...
 
Mysql::Nullable< std::string > replacement
 The rewrite rule's replacement string. More...
 
bool is_enabled
 True if the rule is enabled. More...
 
Mysql::Nullable< std::string > message
 The plugin's message, write-only. More...
 
Mysql::Nullable< std::string > pattern_digest
 The pattern's digest, write-only. More...
 
Mysql::Nullable< std::string > normalized_pattern
 The normalized pattern, write-only. More...
 

Private Member Functions

void copy_and_set (Mysql::Nullable< std::string > *property, rts::Cursor *c, int colno)
 Reads from a Cursor and writes to a property of type Nullable<string> after forcing a copy of the string buffer. More...
 
void set_if_present (rts::Cursor *cursor, rts::Cursor::column_id column, Mysql::Nullable< std::string > value)
 Writes a string value to the cursor's column if it exists. More...
 

Detailed Description

A rule as persisted on disk.

Constructor & Destructor Documentation

◆ Persisted_rule()

Persisted_rule::Persisted_rule ( rts::Cursor c)
inlineexplicit

Constructs a Persisted_rule object that copies all data into the current heap.

The interface is constructed this way due to on some OS'es (e.g. Windows), every shared library has its own heap.

Member Function Documentation

◆ copy_and_set()

void Persisted_rule::copy_and_set ( Mysql::Nullable< std::string > *  property,
rts::Cursor c,
int  colno 
)
inlineprivate

Reads from a Cursor and writes to a property of type Nullable<string> after forcing a copy of the string buffer.

The function calls a member function in Cursor that is located in the server's dynamic library.

◆ set_if_present()

void Persisted_rule::set_if_present ( rts::Cursor cursor,
rts::Cursor::column_id  column,
Mysql::Nullable< std::string >  value 
)
inlineprivate

Writes a string value to the cursor's column if it exists.

◆ set_message()

void Persisted_rule::set_message ( const std::string &  message_arg)
inline

Convenience function, may be called with a const char*.

◆ set_normalized_pattern()

void Persisted_rule::set_normalized_pattern ( const std::string &  s)
inline

Convenience function, may be called with a const char*.

◆ set_pattern_digest()

void Persisted_rule::set_pattern_digest ( const std::string &  s)
inline

Convenience function, may be called with a const char*.

◆ write_to()

bool Persisted_rule::write_to ( rts::Cursor c)
inline

Writes the values in this Persisted_rule to the table at the row pointed to by the cursor.

Values that don't have a corresponding column in the table will be ignored.

Member Data Documentation

◆ is_enabled

bool Persisted_rule::is_enabled

True if the rule is enabled.

◆ message

Mysql::Nullable<std::string> Persisted_rule::message

The plugin's message, write-only.

◆ normalized_pattern

Mysql::Nullable<std::string> Persisted_rule::normalized_pattern

The normalized pattern, write-only.

◆ pattern

Mysql::Nullable<std::string> Persisted_rule::pattern

The rewrite rule's pattern string.

◆ pattern_db

Mysql::Nullable<std::string> Persisted_rule::pattern_db

The pattern's current database.

◆ pattern_digest

Mysql::Nullable<std::string> Persisted_rule::pattern_digest

The pattern's digest, write-only.

◆ replacement

Mysql::Nullable<std::string> Persisted_rule::replacement

The rewrite rule's replacement string.


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