[Groonga-commit] groonga/grnxx at 88e26ba [master] Add dummy functions to ColumnBase.

Back to archive index

susumu.yata null+****@clear*****
Tue Dec 16 10:41:18 JST 2014


susumu.yata	2014-11-06 08:39:26 +0900 (Thu, 06 Nov 2014)

  New Revision: 88e26ba7c2757730410ec41f71400c25e8e373af
  https://github.com/groonga/grnxx/commit/88e26ba7c2757730410ec41f71400c25e8e373af

  Message:
    Add dummy functions to ColumnBase.

  Added files:
    lib/grnxx/impl/index.hpp
  Modified files:
    lib/grnxx/impl/Makefile.am
    lib/grnxx/impl/column/base.cpp
    lib/grnxx/impl/column/base.hpp

  Modified: lib/grnxx/impl/Makefile.am (+1 -0)
===================================================================
--- lib/grnxx/impl/Makefile.am    2014-11-06 08:27:45 +0900 (cec31bb)
+++ lib/grnxx/impl/Makefile.am    2014-11-06 08:39:26 +0900 (bf5f11d)
@@ -17,4 +17,5 @@ libgrnxx_impl_include_HEADERS =		\
 	column.hpp			\
 	cursor.hpp			\
 	db.hpp				\
+	index.hpp			\
 	table.hpp

  Modified: lib/grnxx/impl/column/base.cpp (+39 -1)
===================================================================
--- lib/grnxx/impl/column/base.cpp    2014-11-06 08:27:45 +0900 (a8d2f2d)
+++ lib/grnxx/impl/column/base.cpp    2014-11-06 08:39:26 +0900 (d9de2c6)
@@ -4,7 +4,6 @@
 //#include "grnxx/impl/column/vector.hpp"
 #include "grnxx/impl/db.hpp"
 #include "grnxx/impl/table.hpp"
-//#include "grnxx/index.hpp"
 
 namespace grnxx {
 namespace impl {
@@ -30,6 +29,45 @@ TableInterface *ColumnBase::reference_table() const {
   return reference_table_;
 }
 
+Index *ColumnBase::create_index(
+    const String &name,
+    IndexType type,
+    const IndexOptions &options) {
+  throw "Not supported yet";  // TODO
+}
+
+void ColumnBase::remove_index(const String &name) {
+  throw "Not supported yet";  // TODO
+}
+
+void ColumnBase::rename_index(const String &name, const String &new_name) {
+  throw "Not supported yet";  // TODO
+}
+
+void ColumnBase::reorder_index(const String &name, const String &prev_name) {
+  throw "Not supported yet";  // TODO
+}
+
+Index *ColumnBase::find_index(const String &name) const {
+  throw "Not supported yet";  // TODO
+}
+
+void ColumnBase::set(Int row_id, const Datum &datum) {
+  throw "Not supported yet";  // TODO
+}
+
+void ColumnBase::get(Int row_id, Datum *datum) const {
+  throw "Not supported yet";  // TODO
+}
+
+bool ColumnBase::contains(const Datum &datum) const {
+  throw "Not supported yet";  // TODO
+}
+
+Int ColumnBase::find_one(const Datum &datum) const {
+  throw "Not supported yet";  // TODO
+}
+
 //Index *ColumnBase::create_index(Error *error,
 //                                const StringCRef &name,
 //                                IndexType type,

  Modified: lib/grnxx/impl/column/base.hpp (+18 -16)
===================================================================
--- lib/grnxx/impl/column/base.hpp    2014-11-06 08:27:45 +0900 (10ff7bb)
+++ lib/grnxx/impl/column/base.hpp    2014-11-06 08:39:26 +0900 (73a8613)
@@ -4,6 +4,8 @@
 #include <memory>
 
 #include "grnxx/column.hpp"
+#include "grnxx/impl/index.hpp"
+#include "grnxx/table.hpp"
 
 namespace grnxx {
 namespace impl {
@@ -40,24 +42,24 @@ class ColumnBase : public ColumnInterface {
     return indexes_.size();
   }
 
-//  Index *create_index(
-//      const String &name,
-//      IndexType type,
-//      const IndexOptions &options = IndexOptions());
-//  void remove_index(const String &name);
-//  void rename_index(const String &name, const String &new_name);
-//  bool reorder_index(const String &name, const String &prev_name);
-
-//  Index *get_index(Int index_id) const {
-//    return indexes_[index_id].get();
-//  }
-//  Index *find_index(Error *error, const String &name) const;
+  Index *create_index(
+      const String &name,
+      IndexType type,
+      const IndexOptions &options = IndexOptions());
+  void remove_index(const String &name);
+  void rename_index(const String &name, const String &new_name);
+  void reorder_index(const String &name, const String &prev_name);
+
+  Index *get_index(size_t i) const {
+    return indexes_[i].get();
+  }
+  Index *find_index(const String &name) const;
 
-//  bool set(Error *error, Int row_id, const Datum &datum);
-//  bool get(Error *error, Int row_id, Datum *datum) const;
+  void set(Int row_id, const Datum &datum);
+  void get(Int row_id, Datum *datum) const;
 
-//  bool contains(const Datum &datum) const;
-//  Int find_one(const Datum &datum) const;
+  bool contains(const Datum &datum) const;
+  Int find_one(const Datum &datum) const;
 
   // -- Internal API --
 

  Added: lib/grnxx/impl/index.hpp (+21 -0) 100644
===================================================================
--- /dev/null
+++ lib/grnxx/impl/index.hpp    2014-11-06 08:39:26 +0900 (d8dd3f5)
@@ -0,0 +1,21 @@
+#ifndef GRNXX_IMPL_INDEX_HPP
+#define GRNXX_IMPL_INDEX_HPP
+
+#include <memory>
+
+#include "grnxx/cursor.hpp"
+#include "grnxx/index.hpp"
+
+namespace grnxx {
+namespace impl {
+
+using ColumnInterface = grnxx::Column;
+using IndexInterface = grnxx::Index;
+
+class Index : public IndexInterface {
+};
+
+}  // namespace impl
+}  // namespace grnxx
+
+#endif  // GRNXX_IMPL_INDEX_HPP
-------------- next part --------------
HTML����������������������������...
다운로드 



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