Skip to content
Snippets Groups Projects
Commit fae69c1b authored by Michael Davis's avatar Michael Davis
Browse files

[rdbms] Implements VARBINARY (blob) type for MySQL

parent 252b28c1
No related branches found
No related tags found
No related merge requests found
......@@ -97,7 +97,7 @@ add_custom_command (OUTPUT sqlite_catalogue_schema.sql mysql_catalogue_schema.sq
${CMAKE_CURRENT_SOURCE_DIR}/mysql_catalogue_schema_header.sql
${CMAKE_CURRENT_SOURCE_DIR}/common_catalogue_schema.sql
${CMAKE_CURRENT_SOURCE_DIR}/mysql_catalogue_schema_trailer.sql
| sed 's/CHECKSUM_BLOB_TYPE/RAWBINARY\(200\)/g'
| sed 's/CHECKSUM_BLOB_TYPE/VARBINARY\(200\)/g'
> mysql_catalogue_schema.sql
COMMAND cat
${CMAKE_CURRENT_SOURCE_DIR}/oracle_catalogue_schema_header.sql
......
......@@ -79,7 +79,6 @@ bool MysqlRset::next() {
}
return true;
// throw exception::Exception(std::string(__FUNCTION__) + " not implemented.");
}
//------------------------------------------------------------------------------
......@@ -97,7 +96,8 @@ bool MysqlRset::columnIsNull(const std::string &colName) const {
}
std::string MysqlRset::columnBlob(const std::string &colName) const {
throw exception::Exception("MysqlRset::columnBlob not implemented.");
auto blob = columnOptionalString(colName);
return blob ? *blob : std::string();
}
//------------------------------------------------------------------------------
......
......@@ -261,7 +261,11 @@ void MysqlStmt::bindOptionalDouble(const std::string &paramName, const optional<
}
void MysqlStmt::bindBlob(const std::string &paramName, const std::string &paramValue) {
throw exception::Exception("MysqlStmt::bindBlob not implemented.");
try {
bindOptionalString(paramName, paramValue);
} catch(exception::Exception &ex) {
throw exception::Exception(std::string(__FUNCTION__) + " failed: " + ex.getMessage().str());
}
}
//------------------------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment