A boolexp that represents a mysql text query. More...
#include <select_exp.h>
Public Member Functions | |
match_boolexp (const Table::Column &c, const std::string &q) | |
std::ostream & | print (std::ostream &os, const Dv::Sql::Db &db) const |
Print this expression on a stream, using escapes for column values. | |
Static Public Member Functions | |
static std::string | clean_query_text (const std::string &q) |
Clean a text query string (in-place): replace all white space, punctuation and control characters by ' ', single quotes by double ones. | |
Public Attributes | |
Table::Column | column |
std::string | query |
A boolexp that represents a mysql text query.
Example usage.
match(Account::description, "+many -'few;items'")
will translate as
match(account.description) against ('+many -"few items"' in boolean mode)
Definition at line 628 of file select_exp.h.
Dv::Sql::match_boolexp::match_boolexp | ( | const Table::Column & | c, | |
const std::string & | q | |||
) | [inline] |
Definition at line 637 of file select_exp.h.
References Dv::Sql::boolexp::add_table().
static std::string Dv::Sql::match_boolexp::clean_query_text | ( | const std::string & | q | ) | [static] |
Clean a text query string (in-place): replace all white space, punctuation and control characters by ' ', single quotes by double ones.
query_string | original query string |
std::ostream& Dv::Sql::match_boolexp::print | ( | std::ostream & | os, | |
const Dv::Sql::Db & | db | |||
) | const [inline, virtual] |
Print this expression on a stream, using escapes for column values.
os | stream to print to | |
db | whose associated escape function will be used |
Implements Dv::Sql::boolexp.
Definition at line 643 of file select_exp.h.
Definition at line 640 of file select_exp.h.
Referenced by print().
std::string Dv::Sql::match_boolexp::query |
Definition at line 641 of file select_exp.h.
Referenced by print().
dvmysql-1.0.3 | [17 November, 2010] |