[Groonga-commit] groonga/gcs [master] Return "<integer>/<string>" as domin id

Back to archive index

YUKI Hiroshi null+****@clear*****
Tue Dec 25 16:31:53 JST 2012


YUKI Hiroshi	2012-12-25 16:31:53 +0900 (Tue, 25 Dec 2012)

  New Revision: 9d9f9aa62467398145dae2c645ecd1c10dfb6bf3
  https://github.com/groonga/gcs/commit/9d9f9aa62467398145dae2c645ecd1c10dfb6bf3

  Log:
    Return "<integer>/<string>" as domin id

  Modified files:
    lib/database/domain.js

  Modified: lib/database/domain.js (+4 -1)
===================================================================
--- lib/database/domain.js    2012-12-25 16:28:26 +0900 (52464f6)
+++ lib/database/domain.js    2012-12-25 16:31:53 +0900 (b938e74)
@@ -308,7 +308,8 @@ Domain.prototype = {
   },
 
   get domainId() {
-    return this.id + '/' + this.name;
+    var id = this.getCreationDate('self') || new Date();
+    return id.getTime() + '/' + this.name;
   },
 
   get searchableDocumentsCount() {
@@ -392,6 +393,8 @@ Domain.prototype = {
       default_tokenizer: nroonga.TokenBigram
     });
 
+    this.setCreationDate('self', new Date());
+
     return this;
   },
 
-------------- next part --------------
HTML����������������������������...
Télécharger 



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