#include <query_rewrite.h>
Public Types | |
|
typedef std::pair< const std::string, const std::string > | map_key |
|
typedef std::map< const map_key, plugin::Plugin * > | map |
| typedef std::vector< Plugin * > | vector |
Public Member Functions | |
| QueryRewriter (std::string name_arg) | |
| virtual void | rewrite (const std::string &schema, std::string &to_rewrite)=0 |
| virtual void | shutdownPlugin () |
| virtual void | prime () |
| virtual void | startup (drizzled::Session &) |
| void | activate () |
| void | deactivate () |
| bool | isActive () const |
| const std::string & | getName () const |
| void | setModule (module::Module *module) |
| const std::string & | getTypeName () const |
| virtual bool | removeLast () const |
| const std::string & | getModuleName () const |
Static Public Member Functions | |
| static bool | addPlugin (QueryRewriter *in_rewriter) |
| static void | removePlugin (QueryRewriter *in_rewriter) |
| static void | rewriteQuery (const std::string &schema, std::string &to_rewrite) |
Class which rewrites queries
Definition at line 44 of file query_rewrite.h.
|
pure virtual |
Rewrite a query in the form of a std::string
| [in] | schema | the schema the current session is in |
| [out] | to_rewrite | string representing the query to rewrite |
|
static |
Take a query to be rewritten and go through all the rewriters that are registered as plugins and let the enabled ones rewrite they query. TODO: does it make sense to have multiple rewriters?
| [in] | schema | the schema the current session is |
| [out] | to_rewrite | the query to rewrite |
Definition at line 65 of file query_rewrite.cc.
Referenced by drizzled::Session::readAndStoreQuery().