[Groonga-commit] groonga/grnci at 23922bb [master] Return an error if --columns or --output_columns contains a wildcard

Back to archive index

Susumu Yata null+****@clear*****
Tue Feb 16 03:17:43 JST 2016


Susumu Yata	2016-02-16 03:17:43 +0900 (Tue, 16 Feb 2016)

  New Revision: 23922bb441e2964625ea3698cf9d15d28e52d083
  https://github.com/groonga/grnci/commit/23922bb441e2964625ea3698cf9d15d28e52d083

  Message:
    Return an error if --columns or --output_columns contains a wildcard
    
    GitHub: #26

  Modified files:
    grnci.go

  Modified: grnci.go (+8 -4)
===================================================================
--- grnci.go    2016-02-16 03:15:15 +0900 (8e54358)
+++ grnci.go    2016-02-16 03:17:43 +0900 (9765522)
@@ -1700,8 +1700,10 @@ func (db *DB) Load(tbl string, vals interface{}, options *LoadOptions) (int, err
 		return 0, err
 	}
 	var fields []*FieldInfo
-	// TODO: error handling.
-	cols, _ := parseColumnNames(options.Columns)
+	cols, err := parseColumnNames(options.Columns)
+	if err != nil {
+		return 0, err
+	}
 	if len(cols) == 0 {
 		fields = make([]*FieldInfo, info.NumField())
 		for i := 0; i < info.NumField(); i++ {
@@ -2015,8 +2017,10 @@ func (db *DB) Select(tbl string, vals interface{}, options *SelectOptions) (int,
 		return 0, err
 	}
 	var fields []*FieldInfo
-	// TODO: error handling.
-	cols, _ := parseColumnNames(options.OutputColumns)
+	cols, err := parseColumnNames(options.OutputColumns)
+	if err != nil {
+		return 0, err
+	}
 	if len(cols) == 0 {
 		fields = make([]*FieldInfo, info.NumField())
 		for i := 0; i < info.NumField(); i++ {
-------------- next part --------------
HTML����������������������������...
Download 



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