[Groonga-commit] droonga/droonga.org at a5d93a1 [gh-pages] Describe sample requests and responses as Droonga messages

Back to archive index

YUKI Hiroshi null+****@clear*****
Wed Dec 25 18:47:34 JST 2013


YUKI Hiroshi	2013-12-25 18:47:34 +0900 (Wed, 25 Dec 2013)

  New Revision: a5d93a1fcfb268530ee3dcb71a45a88815bf9a5c
  https://github.com/droonga/droonga.org/commit/a5d93a1fcfb268530ee3dcb71a45a88815bf9a5c

  Message:
    Describe sample requests and responses as Droonga messages

  Modified files:
    reference/commands/add/index.md

  Modified: reference/commands/add/index.md (+22 -14)
===================================================================
--- reference/commands/add/index.md    2013-12-25 18:40:40 +0900 (5c548fc)
+++ reference/commands/add/index.md    2013-12-25 18:47:34 +0900 (b768dd1)
@@ -65,31 +65,39 @@ Job table (with primary key)
 
 Specify only `table` and `values`, without `key`, if the table has no primary key.
 
-    add
     {
-      "table"  : "Person",
-      "values" : {
-        "name" : "Bob Dylan",
-        "job"  : "musician"
+      "type" : "add",
+      "body" : {
+        "table"  : "Person",
+        "values" : {
+          "name" : "Bob Dylan",
+          "job"  : "musician"
+        }
       }
     }
     
-    => add.result
-       true
+    => {
+         "type" : "add.result",
+         "body" : [true]
+       }
 
 The `add` command works recursively. If there is no existing record with the key in the referred table, then it is also automatically added silently so you'll see no error response. For example this will add a new Person record with a new Job record named `doctor`.
 
-    add
     {
-      "table"  : "Person",
-      "values" : {
-        "name" : "Alice Miller",
-        "job"  : "doctor"
+      "type" : "add",
+      "body" : {
+        "table"  : "Person",
+        "values" : {
+          "name" : "Alice Miller",
+          "job"  : "doctor"
+        }
       }
     }
     
-    => add.result
-       true
+    => {
+         "type" : "add.result",
+         "body" : [true]
+       }
 
 By the command above, a new record will be automatically added to the Job table like;
 
-------------- next part --------------
HTML����������������������������...
下载 



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