[Groonga-commit] groonga/groonga [master] [load] support load --each for [...]. fixes #1044

Back to archive index

null+****@clear***** null+****@clear*****
2011年 8月 8日 (月) 11:31:48 JST


Kouhei Sutou	2011-08-08 02:31:48 +0000 (Mon, 08 Aug 2011)

  New Revision: 6122571c354693c7ac990f9194be164d92d83dec

  Log:
    [load] support load --each for [...]. fixes #1044

  Modified files:
    lib/db.c

  Modified: lib/db.c (+5 -0)
===================================================================
--- lib/db.c    2011-08-08 02:29:43 +0000 (cd8ce35)
+++ lib/db.c    2011-08-08 02:31:48 +0000 (9b01866)
@@ -8034,6 +8034,11 @@ bracket_close(grn_ctx *ctx, grn_loader *loader)
           cols++;
           i++;
         }
+        if (loader->each) {
+          grn_obj *v = grn_expr_get_var_by_offset(ctx, loader->each, 0);
+          GRN_RECORD_SET(ctx, v, id);
+          grn_expr_exec(ctx, loader->each, 0);
+        }
         loader->nrecords++;
       }
     }




Groonga-commit メーリングリストの案内
Back to archive index