Commit f6d08a75 authored by VZ's avatar VZ Committed by GitHub

Merge pull request #564 from Arenoros/master

Implement DDL methods for SQLite3 backend.
parents 7a6559c1 43229ecf
......@@ -305,7 +305,33 @@ struct sqlite3_session_backend : details::session_backend
virtual sqlite3_statement_backend * make_statement_backend();
virtual sqlite3_rowid_backend * make_rowid_backend();
virtual sqlite3_blob_backend * make_blob_backend();
virtual std::string get_table_names_query() const
{
return "select name as \"TABLE_NAME\""
" from sqlite_master where type = 'table'";
}
virtual std::string create_column_type(data_type dt,
int , int )
{
switch (dt)
{
case dt_xml:
case dt_string:
return "text";
case dt_double:
return "real";
case dt_date:
case dt_integer:
case dt_long_long:
case dt_unsigned_long_long:
return "integer";
case dt_blob:
return "blob";
default:
throw soci_error("this data_type is not supported in create_column");
}
}
sqlite_api::sqlite3 *conn_;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment