diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-11-23 21:16:33 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2015-11-23 21:16:33 +0000 |
commit | 4d03df7087ed6eff33014bf0c6e1b8435a4b6346 (patch) | |
tree | 35cabb09b8c873ef13e4d6b6840abb13d028068b | |
parent | Move common code for database references into SqlBase (diff) | |
download | project2-4d03df7087ed6eff33014bf0c6e1b8435a4b6346.tar.bz2 project2-4d03df7087ed6eff33014bf0c6e1b8435a4b6346.tar.xz project2-4d03df7087ed6eff33014bf0c6e1b8435a4b6346.zip |
Allow SqlBase to be initialised with just a datasource name
-rw-r--r-- | project2/sql/sqlBase.cpp | 7 | ||||
-rw-r--r-- | project2/sql/sqlBase.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/project2/sql/sqlBase.cpp b/project2/sql/sqlBase.cpp index 608842c..dd1e90d 100644 --- a/project2/sql/sqlBase.cpp +++ b/project2/sql/sqlBase.cpp @@ -9,6 +9,13 @@ SqlBase::SqlBase(ScriptNodePtr p) : { } +SqlBase::SqlBase(const std::string & datasource) : + SourceObject(ScriptNodePtr()), + dataSource(datasource), + db(NULL) +{ +} + void SqlBase::loadComplete(const CommonObjects * co) { diff --git a/project2/sql/sqlBase.h b/project2/sql/sqlBase.h index 9266ae3..461589f 100644 --- a/project2/sql/sqlBase.h +++ b/project2/sql/sqlBase.h @@ -9,6 +9,7 @@ class RdbmsDataSource; class SqlBase : public virtual SourceObject { public: SqlBase(ScriptNodePtr); + SqlBase(const std::string &); virtual void loadComplete(const CommonObjects *) override; |