summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--slicer/db/sqlInsertSerializer.cpp6
-rw-r--r--slicer/db/sqlInsertSerializer.h4
-rw-r--r--slicer/db/sqlUpdateSerializer.cpp2
-rw-r--r--slicer/db/sqlUpdateSerializer.h4
4 files changed, 8 insertions, 8 deletions
diff --git a/slicer/db/sqlInsertSerializer.cpp b/slicer/db/sqlInsertSerializer.cpp
index e8d44f5..2c2a0d5 100644
--- a/slicer/db/sqlInsertSerializer.cpp
+++ b/slicer/db/sqlInsertSerializer.cpp
@@ -9,7 +9,7 @@
namespace Slicer {
const std::string md_auto = "db:auto";
- SqlInsertSerializer::SqlInsertSerializer(DB::Connection * c, const std::string & t) :
+ SqlInsertSerializer::SqlInsertSerializer(const DB::Connection * c, const std::string & t) :
connection(c),
tableName(t)
{
@@ -59,7 +59,7 @@ namespace Slicer {
class IdSave : public Slicer::ValueSource {
public:
- IdSave(DB::Connection * c) :
+ IdSave(const DB::Connection * c) :
connection(c)
{
}
@@ -81,7 +81,7 @@ namespace Slicer {
NumType(Ice::Double);
private:
- DB::Connection * connection;
+ const DB::Connection * connection;
};
void
diff --git a/slicer/db/sqlInsertSerializer.h b/slicer/db/sqlInsertSerializer.h
index 359c655..389cea8 100644
--- a/slicer/db/sqlInsertSerializer.h
+++ b/slicer/db/sqlInsertSerializer.h
@@ -11,7 +11,7 @@ namespace Slicer {
public:
typedef boost::shared_ptr<DB::ModifyCommand> ModifyPtr;
- SqlInsertSerializer(DB::Connection *, const std::string & tableName);
+ SqlInsertSerializer(const DB::Connection *, const std::string & tableName);
virtual void Serialize(Slicer::ModelPartPtr) override;
@@ -23,7 +23,7 @@ namespace Slicer {
virtual void bindObjectAndExecute(Slicer::ModelPartPtr, DB::ModifyCommand *) const;
virtual void bindObjectAndExecuteField(int & paramNo, DB::ModifyCommand *, Slicer::ModelPartPtr, HookCommonPtr) const;
- DB::Connection * connection;
+ const DB::Connection * connection;
const std::string tableName;
};
diff --git a/slicer/db/sqlUpdateSerializer.cpp b/slicer/db/sqlUpdateSerializer.cpp
index 75cbaae..f59e8ff 100644
--- a/slicer/db/sqlUpdateSerializer.cpp
+++ b/slicer/db/sqlUpdateSerializer.cpp
@@ -10,7 +10,7 @@ namespace Slicer {
const std::string md_pkey = "db:pkey";
- SqlUpdateSerializer::SqlUpdateSerializer(DB::Connection * c, const std::string & t) :
+ SqlUpdateSerializer::SqlUpdateSerializer(const DB::Connection * c, const std::string & t) :
connection(c),
tableName(t)
{
diff --git a/slicer/db/sqlUpdateSerializer.h b/slicer/db/sqlUpdateSerializer.h
index 6d9ef04..508bd2d 100644
--- a/slicer/db/sqlUpdateSerializer.h
+++ b/slicer/db/sqlUpdateSerializer.h
@@ -15,7 +15,7 @@ namespace Slicer {
public:
typedef boost::shared_ptr<DB::ModifyCommand> ModifyPtr;
- SqlUpdateSerializer(DB::Connection *, const std::string & tableName);
+ SqlUpdateSerializer(const DB::Connection *, const std::string & tableName);
virtual void Serialize(Slicer::ModelPartPtr) override;
@@ -25,7 +25,7 @@ namespace Slicer {
ModifyPtr createUpdate(Slicer::ModelPartPtr) const;
static void bindObjectAndExecute(Slicer::ModelPartPtr, DB::ModifyCommand *);
- DB::Connection * connection;
+ const DB::Connection * connection;
const std::string tableName;
};
}