[Groonga-commit] groonga/grnxx at 4f8e548 [master] Add Table::_db().

Back to archive index

susumu.yata null+****@clear*****
Mon Oct 6 17:24:31 JST 2014


susumu.yata	2014-10-06 17:24:31 +0900 (Mon, 06 Oct 2014)

  New Revision: 4f8e548e9a9127ba42f80d9b65c1804ec751d143
  https://github.com/groonga/grnxx/commit/4f8e548e9a9127ba42f80d9b65c1804ec751d143

  Message:
    Add Table::_db().

  Modified files:
    lib/grnxx/column.cpp
    lib/grnxx/impl/table.hpp

  Modified: lib/grnxx/column.cpp (+2 -2)
===================================================================
--- lib/grnxx/column.cpp    2014-10-06 17:11:59 +0900 (f91c60b)
+++ lib/grnxx/column.cpp    2014-10-06 17:24:31 +0900 (4abcc11)
@@ -2,7 +2,7 @@
 
 #include "grnxx/column_impl.hpp"
 #include "grnxx/cursor.hpp"
-#include "grnxx/db.hpp"
+#include "grnxx/impl/db.hpp"
 #include "grnxx/impl/table.hpp"
 #include "grnxx/index.hpp"
 
@@ -192,7 +192,7 @@ bool Column::initialize_base(Error *error,
   data_type_ = data_type;
   if ((data_type == INT_DATA) || (data_type == INT_VECTOR_DATA)) {
     if (options.ref_table_name.size() != 0) {
-      auto ref_table = table->db()->find_table(error, options.ref_table_name);
+      auto ref_table = table_->_db()->find_table(error, options.ref_table_name);
       if (!ref_table) {
         return false;
       }

  Modified: lib/grnxx/impl/table.hpp (+5 -0)
===================================================================
--- lib/grnxx/impl/table.hpp    2014-10-06 17:11:59 +0900 (668d548)
+++ lib/grnxx/impl/table.hpp    2014-10-06 17:24:31 +0900 (5d33d53)
@@ -67,6 +67,11 @@ class Table : public grnxx::Table {
       const StringCRef &name,
       const TableOptions &options = TableOptions());
 
+  // Return the owner DB.
+  DB *_db() const {
+    return db_;
+  }
+
   // Change the table name.
   //
   // On success, returns true.
-------------- next part --------------
HTML����������������������������...
下載 



More information about the Groonga-commit mailing list
Back to archive index