// Prepared Statements
// PREPARE (ex: PREPARE stmt1 FROM 'SELECT ...')
- template <typename STMT_NAME, typename STMT_BODY>
+ template <typename STATEMENT_NAME, typename QUERY_BODY>
struct prepate : public seq<
- _op_names::prepate, _char::space,
- _op_names::from, _char::sglqut, _char::space, STMT_BODY, _char::sglqut>
+ _op_names::prepate, _char::space, // PREPARE <STATEMENT_NAME>
+ _op_names::from, _char::space, _char::sglqut, QUERY_BODY, _char::sglqut>// FROM '<QUERY_BODY>'
{
};
///////////////////////////////////////////////////////////////////////////////////
// SET
- template <typename VAR_NAME, typename VAR_VALUE>
- class set : public seq<_op_names::set, _char::space, _char::equal, _char::space, VAR_VALUE>
+ template <typename VARIABLE_NAME, typename VALUE>
+ class set : public seq<
+ _op_names::set, _char::space, _char::equal, _char::space, VAR_VALUE> // SET <VARIABLE_NAME> = <VALUE>
{
};
///////////////////////////////////////////////////////////////////////////////////
// EXECUTE
- class execute
+ template <typename STATEMENT_NAME, typename VARIABLES>
+ class execute : public seq<
+ _op_names::execute, _char::space, // EXECUTE <STATEMENT_NAME>
+ _op_names::_using, _char::space, VARIABLES> // USING <VARIABLES>
{
};
ROAST_LEXICAL_FIXSTR(prepare,"PREPARE");
ROAST_LEXICAL_FIXSTR(set,"SET");
ROAST_LEXICAL_FIXSTR(execute,"EXECUTE");
+ ROAST_LEXICAL_FIXSTR(_using,"USING");
}
///////////////////////////////////////////////////////////////////////////////////