Add qc_get_preparable_stmt

This function will return the preparable statement of a PREPARE
statement as a COM_QUERY GWBUF. That is, once obtained, the normal
query classifier functions can be used for obtaining information
about the preparable statement itself.
This commit is contained in:
Johan Wikman
2017-01-16 15:28:31 +02:00
parent 7fee90a399
commit e349319400
5 changed files with 97 additions and 2 deletions

View File

@ -283,6 +283,18 @@ char* qc_get_prepare_name(GWBUF* query)
return name;
}
GWBUF* qc_get_preparable_stmt(GWBUF* stmt)
{
QC_TRACE();
ss_dassert(classifier);
GWBUF* preparable_stmt = NULL;
classifier->qc_get_preparable_stmt(stmt, &preparable_stmt);
return preparable_stmt;
}
struct type_name_info field_usage_to_type_name_info(qc_field_usage_t usage)
{
struct type_name_info info;