summaryrefslogtreecommitdiffstats
path: root/src/dal
diff options
context:
space:
mode:
authorDavid Athay <ko2fan@gmail.com>2009-07-10 10:39:53 +0100
committerDavid Athay <ko2fan@gmail.com>2009-07-10 10:39:53 +0100
commit10aaead456a9a7f5a19441db2a8e6a957f8e7508 (patch)
tree9a87ba8b10db8fc3e85d4140bdf1462f868453bf /src/dal
parentea21b3bf96d116964398273f1b096f61462b35dd (diff)
downloadmanaserv-10aaead456a9a7f5a19441db2a8e6a957f8e7508.tar.gz
manaserv-10aaead456a9a7f5a19441db2a8e6a957f8e7508.tar.xz
manaserv-10aaead456a9a7f5a19441db2a8e6a957f8e7508.zip
Changed BindInteger and BindString to BindValue
Diffstat (limited to 'src/dal')
-rw-r--r--src/dal/dataprovider.h15
-rw-r--r--src/dal/sqlitedataprovider.cpp9
-rw-r--r--src/dal/sqlitedataprovider.h15
3 files changed, 10 insertions, 29 deletions
diff --git a/src/dal/dataprovider.h b/src/dal/dataprovider.h
index 65de8ee..90169ee 100644
--- a/src/dal/dataprovider.h
+++ b/src/dal/dataprovider.h
@@ -190,25 +190,18 @@ class DataProvider
virtual const RecordSet& processSql() = 0;
/**
- * Bind String
+ * Bind Value (String)
* @param place - which parameter to bind to
* @param value - the string to bind
*/
- virtual void bindString(int place, const std::string &value) = 0;
+ virtual void bindValue(int place, const std::string &value) = 0;
/**
- * Bind Integer
+ * Bind Value (Integer)
* @param place - which parameter to bind to
* @param value - the integer to bind
*/
- virtual void bindInteger(int place, int value) = 0;
-
- /**
- * Bind Float
- * @param place - which parameter to bind to
- * @param value - the float to bind
- */
- virtual void bindFloat(int place, float value) = 0;
+ virtual void bindValue(int place, int value) = 0;
protected:
std::string mDbName; /**< the database name */
diff --git a/src/dal/sqlitedataprovider.cpp b/src/dal/sqlitedataprovider.cpp
index accf979..6abfb59 100644
--- a/src/dal/sqlitedataprovider.cpp
+++ b/src/dal/sqlitedataprovider.cpp
@@ -416,19 +416,14 @@ const RecordSet& SqLiteDataProvider::processSql()
return mRecordSet;
}
-void SqLiteDataProvider::bindString(int place, const std::string &value)
+void SqLiteDataProvider::bindValue(int place, const std::string &value)
{
sqlite3_bind_text(mStmt, place, value.c_str(), value.size(), SQLITE_STATIC);
}
-void SqLiteDataProvider::bindInteger(int place, int value)
+void SqLiteDataProvider::bindValue(int place, int value)
{
sqlite3_bind_int(mStmt, place, value);
}
-void SqLiteDataProvider::bindFloat(int place, float value)
-{
- sqlite3_bind_double(mStmt, place, value);
-}
-
} // namespace dal
diff --git a/src/dal/sqlitedataprovider.h b/src/dal/sqlitedataprovider.h
index 3f1951d..e446c9c 100644
--- a/src/dal/sqlitedataprovider.h
+++ b/src/dal/sqlitedataprovider.h
@@ -159,25 +159,18 @@ class SqLiteDataProvider: public DataProvider
const RecordSet& processSql();
/**
- * Bind String
+ * Bind Value (String)
* @param place - which parameter to bind to
* @param value - the string to bind
*/
- void bindString(int place, const std::string &value);
+ void bindValue(int place, const std::string &value);
/**
- * Bind Integer
+ * Bind Value (Integer)
* @param place - which parameter to bind to
* @param value - the integer to bind
*/
- void bindInteger(int place, int value);
-
- /**
- * Bind Float
- * @param place - which parameter to bind to
- * @param value - the float to bind
- */
- void bindFloat(int place, float value);
+ void bindValue(int place, int value);
private: