[Groonga-commit] groonga/grnxx at 5da98e7 [master] Gnx: add DB.InsertRow().

Back to archive index

susumu.yata null+****@clear*****
Fri May 1 03:59:27 JST 2015


susumu.yata	2015-05-01 03:59:27 +0900 (Fri, 01 May 2015)

  New Revision: 5da98e727f6f3fd64ed6775b044ad72416bfd0d7
  https://github.com/groonga/grnxx/commit/5da98e727f6f3fd64ed6775b044ad72416bfd0d7

  Message:
    Gnx: add DB.InsertRow().

  Modified files:
    go3/gnx/grn.go

  Modified: go3/gnx/grn.go (+9 -0)
===================================================================
--- go3/gnx/grn.go    2015-05-01 03:53:52 +0900 (20a3feb)
+++ go3/gnx/grn.go    2015-05-01 03:59:27 +0900 (157d0be)
@@ -404,6 +404,15 @@ func (db *GrnDB) FindTable(name string) (*GrnTable, error) {
 	return table, nil
 }
 
+// InsertRow() inserts a record.
+func (db *GrnDB) InsertRow(tableName string, key interface{}) (bool, Int, error) {
+	table, err := db.FindTable(tableName)
+	if err != nil {
+		return false, NullInt(), err
+	}
+	return table.InsertRow(key)
+}
+
 // CreateColumn() creates a column.
 func (db *GrnDB) CreateColumn(tableName, columnName string, valueType string, options *ColumnOptions) (*GrnColumn, error) {
 	table, err := db.FindTable(tableName)
-------------- next part --------------
HTML����������������������������...
Download 



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