[Groonga-commit] groonga/gcs [master] Accept nroonga.Database as the context for Domain

Back to archive index

null+****@clear***** null+****@clear*****
2012年 7月 12日 (木) 17:14:56 JST


SHIMODA Hiroshi	2012-07-12 17:14:56 +0900 (Thu, 12 Jul 2012)

  New Revision: a58cfc50bdeec22705d5454d681a5789e6376844
  https://github.com/groonga/gcs/commit/a58cfc50bdeec22705d5454d681a5789e6376844

  Log:
    Accept nroonga.Database as the context for Domain

  Modified files:
    lib/database/domain.js

  Modified: lib/database/domain.js (+3 -1)
===================================================================
--- lib/database/domain.js    2012-07-12 16:50:30 +0900 (1cba6d4)
+++ lib/database/domain.js    2012-07-12 17:14:56 +0900 (a369f60)
@@ -1,3 +1,4 @@
+var nativeNroonga = require('nroonga');
 var nroonga = require('../wrapped-nroonga');
 var IndexField = require('./index-field').IndexField;
 
@@ -36,7 +37,8 @@ function Domain() {
   for (var i = 0, maxi = arguments.length, argument; i < maxi; i++) {
     argument = arguments[i];
     if (!argument) continue;
-    if (argument instanceof nroonga.Context) {
+    if (argument instanceof nroonga.Context ||
+        argument instanceof nativeNroonga.Database) {
       context = argument;
     } else if (argument) {
       source = argument;
-------------- next part --------------
HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
下载 



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