BIND 10 trac1061, updated. be9d5fe994e6a086a951e432d56e7de2af3cfd09 [trac1061] First attempt at SQLite3Connection interface
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Aug 1 11:30:06 UTC 2011
The branch, trac1061 has been updated
via be9d5fe994e6a086a951e432d56e7de2af3cfd09 (commit)
from 11b8b873e7fd6722053aa224d20f29350bf2b298 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit be9d5fe994e6a086a951e432d56e7de2af3cfd09
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date: Mon Aug 1 13:29:36 2011 +0200
[trac1061] First attempt at SQLite3Connection interface
It will probably change during the implementation though.
-----------------------------------------------------------------------
Summary of changes:
src/lib/datasrc/Makefile.am | 1 +
.../datasrc/sqlite3_connection.cc} | 1 -
src/lib/datasrc/{logger.h => sqlite3_connection.h} | 35 +++++++++-----------
3 files changed, 17 insertions(+), 20 deletions(-)
copy src/{bin/dhcp6/spec_config.h.pre.in => lib/datasrc/sqlite3_connection.cc} (91%)
copy src/lib/datasrc/{logger.h => sqlite3_connection.h} (54%)
-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/Makefile.am b/src/lib/datasrc/Makefile.am
index eecd26a..e6bff58 100644
--- a/src/lib/datasrc/Makefile.am
+++ b/src/lib/datasrc/Makefile.am
@@ -23,6 +23,7 @@ libdatasrc_la_SOURCES += result.h
libdatasrc_la_SOURCES += logger.h logger.cc
libdatasrc_la_SOURCES += client.h
libdatasrc_la_SOURCES += database.h database.cc
+libdatasrc_la_SOURCES += sqlite3_connection.h sqlite3_connection.cc
nodist_libdatasrc_la_SOURCES = datasrc_messages.h datasrc_messages.cc
libdatasrc_la_LIBADD = $(top_builddir)/src/lib/exceptions/libexceptions.la
diff --git a/src/lib/datasrc/sqlite3_connection.cc b/src/lib/datasrc/sqlite3_connection.cc
new file mode 100644
index 0000000..e8c2509
--- /dev/null
+++ b/src/lib/datasrc/sqlite3_connection.cc
@@ -0,0 +1,14 @@
+// Copyright (C) 2011 Internet Systems Consortium, Inc. ("ISC")
+//
+// Permission to use, copy, modify, and/or distribute this software for any
+// purpose with or without fee is hereby granted, provided that the above
+// copyright notice and this permission notice appear in all copies.
+//
+// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+// AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+// PERFORMANCE OF THIS SOFTWARE.
+
diff --git a/src/lib/datasrc/sqlite3_connection.h b/src/lib/datasrc/sqlite3_connection.h
new file mode 100644
index 0000000..e18386c
--- /dev/null
+++ b/src/lib/datasrc/sqlite3_connection.h
@@ -0,0 +1,43 @@
+// Copyright (C) 2011 Internet Systems Consortium, Inc. ("ISC")
+//
+// Permission to use, copy, modify, and/or distribute this software for any
+// purpose with or without fee is hereby granted, provided that the above
+// copyright notice and this permission notice appear in all copies.
+//
+// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+// AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+// PERFORMANCE OF THIS SOFTWARE.
+
+
+#ifndef __DATASRC_SQLITE3_CONNECTION_H
+#define __DATASRC_SQLITE3_CONNECTION_H
+
+#include <datasrc/database.h>
+
+// TODO Once the whole SQLite3 thing is ported here, move the Sqlite3Error
+// here and remove the header file.
+#include <datasrc/sqlite3_datasrc.h>
+
+namespace isc {
+namespace datasrc {
+
+class SQLite3Connection : public DatabaseConnection {
+public:
+ // TODO Should we simplify this as well and just pass config to the
+ // constructor and be done? (whenever the config would change, we would
+ // recreate new connections)
+ Result init() { return (init(isc::data::ElementPtr())); }
+ Result init(const isc::data::ConstElementPtr& config);
+ Result close();
+
+ virtual std::pair<bool, int> getZone(const isc::dns::Name& name) const;
+};
+
+}
+}
+
+#endif
More information about the bind10-changes
mailing list