Dv::Sql::match_boolexp Class Reference

A boolexp that represents a mysql text query. More...

#include <select_exp.h>

Inheritance diagram for Dv::Sql::match_boolexp:
Inheritance graph
[legend]
Collaboration diagram for Dv::Sql::match_boolexp:
Collaboration graph
[legend]

List of all members.

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

Detailed Description

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)
See also:
Dv::Sql::match(const Table::Column&, const std::string&)

Definition at line 628 of file select_exp.h.


Constructor & Destructor Documentation

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().


Member Function Documentation

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.

Parameters:
query_string original query string
Returns:
reference to parameter
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.

Parameters:
os stream to print to
db whose associated escape function will be used
Returns:
os

Implements Dv::Sql::boolexp.

Definition at line 643 of file select_exp.h.

References column, and query.


Member Data Documentation

Definition at line 640 of file select_exp.h.

Referenced by print().

Definition at line 641 of file select_exp.h.

Referenced by print().


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

dvmysql-1.0.3 [17 November, 2010]