null+****@clear*****
null+****@clear*****
2012年 7月 12日 (木) 17:31:06 JST
SHIMODA Hiroshi 2012-07-12 17:31:06 +0900 (Thu, 12 Jul 2012) New Revision: fe9309d369620e1077022b7f12517dbb7e3c5c78 https://github.com/groonga/gcs/commit/fe9309d369620e1077022b7f12517dbb7e3c5c78 Log: Initialize Domain with native nroonga.Database correctly Modified files: lib/database/domain.js test/database-domain.test.js Modified: lib/database/domain.js (+1 -1) =================================================================== --- lib/database/domain.js 2012-07-12 17:26:51 +0900 (a6592b8) +++ lib/database/domain.js 2012-07-12 17:31:06 +0900 (0acc4e1) @@ -52,7 +52,7 @@ function Domain() { } Domain.prototype = { initialize: function(source, context) { - this.context = new nroonga.Context(context); + this.context = context && new nroonga.Context(context); this.name = this.getName(source); this.indexFields = {}; // for validation Modified: test/database-domain.test.js (+3 -0) =================================================================== --- test/database-domain.test.js 2012-07-12 17:26:51 +0900 (84cacfb) +++ test/database-domain.test.js 2012-07-12 17:31:06 +0900 (5d069df) @@ -179,14 +179,17 @@ suite('database', function() { suite('getting data from database', function() { var temporaryDatabase; var context; + var domain; setup(function() { temporaryDatabase = utils.createTemporaryDatabase(); context = temporaryDatabase.get(); utils.loadDumpFile(context, __dirname + '/fixture/companies/ddl.grn'); + domain = new Domain('companies', context); }); teardown(function() { + domain = undefined; temporaryDatabase.teardown(); temporaryDatabase = undefined; }); -------------- next part -------------- HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...Download