diff --git a/include/History.h b/include/History.h index f8c232b0e4..59a2606ccc 100644 --- a/include/History.h +++ b/include/History.h @@ -201,24 +201,6 @@ private: return ObjectSQL::select_column(db,table,column,where,value); } - /** - * Sets the value of a column in the pool for a given object - * @param db pointer to Database - * @param column to be selected - * @param where contidtion to select the column - * @param value of the column - * @return 0 on success - */ - int update_column( - SqliteDB * db, - const string& column, - const string& where, - const string& value) - { - return ObjectSQL::update_column(db,table,column,where,value); - } - - /** * Function to unmarshall a history object * @param num the number of columns read from the DB diff --git a/include/Leases.h b/include/Leases.h index e245b95264..9b3280fbcb 100644 --- a/include/Leases.h +++ b/include/Leases.h @@ -282,24 +282,7 @@ private: * @return 0 on success. */ int update(SqliteDB * db); - - /** - * Sets the value of a column in the pool for a given object - * @param db pointer to Database - * @param column to be selected - * @param where condition to select the column - * @param value of the column - * @return 0 on success - */ - int update_column( - SqliteDB * db, - const string& column, - const string& where, - const string& value) - { - return ObjectSQL::update_column(db,table,column,where,value); - } - + /** * Gets the value of a column in the pool for a given object * @param db pointer to Database diff --git a/include/ObjectSQL.h b/include/ObjectSQL.h index f777b570ea..88ff32648f 100644 --- a/include/ObjectSQL.h +++ b/include/ObjectSQL.h @@ -51,22 +51,6 @@ protected: const string& column, const string& where, string * value); - - /** - * Sets the value of a column in the pool for a given object - * @param db pointer to Database - * @param table supporting the object - * @param column to be selected - * @param where contidtion to select the column - * @param value of the column - * @return 0 on success - */ - int update_column( - SqliteDB * db, - const string& table, - const string& column, - const string& where, - const string& value); /** * Reads the ObjectSQL (identified with its OID) from the database. diff --git a/src/pool/ObjectSQL.cc b/src/pool/ObjectSQL.cc index 5af6ae357b..ff2590bf20 100644 --- a/src/pool/ObjectSQL.cc +++ b/src/pool/ObjectSQL.cc @@ -72,23 +72,3 @@ int ObjectSQL::select_column( /* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */ - -int ObjectSQL::update_column( - SqliteDB * db, - const string& table, - const string& column, - const string& where, - const string& value) -{ - ostringstream os; - - if ( where.empty() == true ) - { - return -1; - } - - os << "UPDATE " << table << " SET "<< column << " ='" << value - << "' WHERE " << where; - - return db->exec(os); -}