From 98bdc2079442b79780db04bb8d05a2c329577e10 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Sun, 10 Jan 2010 21:47:42 +0100 Subject: added function for testing weather a table contains a column or not --- src/base/database.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/base/database.hpp') diff --git a/src/base/database.hpp b/src/base/database.hpp index d5313609..c7bb00b8 100644 --- a/src/base/database.hpp +++ b/src/base/database.hpp @@ -80,6 +80,15 @@ namespace usdx */ const bool sqlite_table_exists(const std::string table); + /** + * Check if the given table has the given column by name. + * + * @param table Table to examine + * @param column Name of the column to check if exists + * @return true, if column exists in that table, false if not + */ + const bool sqlite_table_contains_column(const std::string table, const std::string column); + // Singleton StatDatabase(std::string filename); -- cgit v1.2.3