cql3: Make statement_type printable

This commit is contained in:
Tomasz Grabiec
2015-01-23 13:13:56 +01:00
parent fc2bc5558e
commit 78eaabf9d9
2 changed files with 18 additions and 0 deletions

View File

@@ -32,6 +32,22 @@ namespace statements {
::shared_ptr<column_identifier> modification_statement::CAS_RESULT_COLUMN = ::make_shared<column_identifier>("[applied]", false);
std::ostream&
operator<<(std::ostream& out, modification_statement::statement_type t) {
switch (t) {
case modification_statement::statement_type::UPDATE:
out << "UPDATE";
break;
case modification_statement::statement_type::INSERT:
out << "INSERT";
break;
case modification_statement::statement_type::DELETE:
out << "DELETE";
break;
}
return out;
}
}
}

View File

@@ -824,6 +824,8 @@ public:
};
};
std::ostream& operator<<(std::ostream& out, modification_statement::statement_type t);
}
}