Merge "master" into "next".
[sliver-openvswitch.git] / ovsdb / SPECS
1          ===================================================
2           Open vSwitch Configuration Database Specification
3          ===================================================
4
5 Basic Notation
6 --------------
7
8 The descriptions below use the following shorthand notations for JSON
9 values.  Additional notation is presented later.
10
11 <string>
12
13     A JSON string.  Any Unicode string is allowed, as specified by RFC
14     4627.  Implementations may disallow null bytes.
15
16 <id>
17
18     A JSON string matching [a-zA-Z_][a-zA-Z0-9_]*.
19
20     <id>s that begin with _ are reserved to the implementation and may
21     not be used by the user.
22
23 <boolean>
24
25     A JSON true or false value.
26
27 <number>
28
29     A JSON number.
30
31 <integer>
32
33     A JSON number with an integer value, within a certain range
34     (currently -2**63...+2**63-1).
35
36 <json-value>
37
38     Any JSON value.
39
40 <nonnull-json-value>
41
42     Any JSON value except null.
43
44 <error>
45
46     A JSON object with the following members:
47
48         "error": <string>                       required
49         "details": <string>                     optional
50
51     The value of the "error" member is a short string, specified in
52     this document, that broadly indicates the class of the error.
53     Most "error" strings are specific to contexts described elsewhere
54     in this document, but the following "error" strings may appear in
55     any context where an <error> is permitted:
56
57     "error": "resources exhausted"
58
59         The operation requires more resources (memory, disk, CPU,
60         etc.) than are currently available to the database server.
61
62     "error": "I/O error"
63
64         Problems accessing the disk, network, or other required
65         resources prevented the operation from completing.
66
67     Database implementations may use "error" strings not specified
68     in this document to indicate errors that do not fit into any of
69     the specified categories.
70
71     Optionally, an <error> may include a "details" member, whose value
72     is a string that describes the error in more detail for the
73     benefit of a human user or administrator.  This document does not
74     specify the format or content of the "details" string.
75
76     An <error> may also have other members that describe the error in
77     more detail.  This document does not specify the names or values
78     of these members.
79
80 Schema Format
81 -------------
82
83 An Open vSwitch configuration database consists of a set of tables,
84 each of which has a number of columns and zero or more rows.  A schema
85 is represented by <database-schema>, as described below.
86
87 <database-schema>
88
89     A JSON object with the following members:
90
91         "name": <id>                            required
92         "comment": <string>                     optional
93         "tables": {<id>: <table-schema>, ...}   required
94
95     The "name" identifies the database as a whole.  It must be
96     provided to most JSON-RPC requests to identify the database being
97     operated on.  The "comment" optionally provides more information
98     about the database.  The value of "tables" is a JSON object whose
99     names are table names and whose values are <table-schema>s.
100
101 <table-schema>
102
103     A JSON object with the following members:
104
105         "comment": <string>                       optional
106         "columns": {<id>: <column-schema>, ...}   required
107
108     The "comment" optionally provides information about this table for
109     a human reader.  The value of "columns" is a JSON object whose
110     names are column names and whose values are <column-schema>s.
111
112     Every table has the following columns whose definitions are not
113     included in the schema:
114
115         "_uuid": This column, which contains exactly one UUID value,
116         is initialized to a random value by the database engine when
117         it creates a row.  It is read-only, and its value never
118         changes during the lifetime of a row.
119
120         "_version": Like "_uuid", this column contains exactly one
121         UUID value, initialized to a random value by the database
122         engine when it creates a row, and it is read-only.  However,
123         its value changes to a new random value whenever any other
124         field in the row changes.  Furthermore, its value is
125         ephemeral: when the database is closed and reopened, or when
126         the database process is stopped and then started again, each
127         "_version" also changes to a new random value.
128
129 <column-schema>
130
131     A JSON object with the following members:
132
133         "comment": <string>                       optional
134         "type": <type>                            required
135         "ephemeral": <boolean>                    optional
136
137     The "comment" optionally provides information about this column
138     for a human reader.  The "type" specifies the type of data stored
139     in this column.  If "ephemeral" is specified as true, then this
140     column's values are not guaranteed to be durable; they may be lost
141     when the database restarts.
142
143 <type>
144
145     The type of a database column.  Either an <atomic-type> or a JSON
146     object that describes the type of a database column, with the
147     following members:
148
149         "key": <base-type>                 required
150         "value": <base-type>               optional
151         "min": <integer>                   optional
152         "max": <integer> or "unlimited"    optional
153
154     If "min" or "max" is not specified, each defaults to 1.  If "max"
155     is specified as "unlimited", then there is no specified maximum
156     number of elements, although the implementation will enforce some
157     limit.  After considering defaults, "min" must be exactly 0 or
158     exactly 1, "max" must be at least 1, and "max" must be greater
159     than or equal to "min".
160
161     If "min" and "max" are both 1 and "value" is not specified, the
162     type is the scalar type specified by "key".
163
164     If "min" is not 1 or "max" is not 1, or both, and "value" is not
165     specified, the type is a set of scalar type "key".
166
167     If "value" is specified, the type is a map from type "key" to type
168     "value".
169
170 <base-type>
171
172     The type of a key or value in a database column.  Either an
173     <atomic-type> or a JSON object with the following members:
174
175         "type": <atomic-type>              required
176         "minInteger": <integer>            optional, integers only
177         "maxInteger": <integer>            optional, integers only
178         "minReal": <real>                  optional, reals only
179         "maxReal": <real>                  optional, reals only 
180         "reMatch": <string>                optional, strings only
181         "reComment": <string>              optional, strings only
182         "minLength": <integer>             optional, strings only
183         "maxLength": <integer>             optional, strings only
184         "refTable": <id>                   optional, uuids only
185
186     An <atomic-type> by itself is equivalent to a JSON object with a
187     single member "type" whose value is the <atomic-type>.
188
189     If "type" is "integer", then "minInteger" or "maxInteger" or both
190     may also be specified, restricting the valid integer range.  If
191     both are specified, then the maxInteger must be greater than or
192     equal to minInteger.
193
194     If "type" is "real", then "minReal" or "maxReal" or both may also
195     be specified, restricting the valid real range.  If both are
196     specified, then the maxReal must be greater than or equal to
197     minReal.
198
199     If "type" is "string", then:
200
201         "reMatch" may be a JavaScript (Perl 5-like) regular expression
202         that restricts the allowed values.  The regular expression
203         must match the entire string value, that is, it is treated as
204         if it begins with ^ and ends with $, regardless of whether it
205         really does.
206
207         If "reMatch" is specified, then "reComment" may be a string
208         that describes the allowed values, phrased so that it fits
209         into a sentence such as "This value must be...".
210
211         "minLength" and "maxLength" or both may be specified,
212         restricting the valid length of value strings.  If both are
213         specified, then maxLength must be greater than or equal to
214         minLength.  String length is measured in characters (not bytes
215         or UTF-16 code units).
216
217     If "type" is "uuid", then "refTable", if present, must be the name
218     of a table within this database.  If "refTable" is set, the
219     allowed UUIDs are limited to UUIDs for rows in the named table.
220
221     "refTable" constraints are "deferred" constraints: they are
222     enforced only at transaction commit time (see the "transact"
223     request below).  The other contraints on <base-type> are
224     "immediate", enforced immediately by each operation.
225
226 <atomic-type>
227
228     One of the strings "integer", "real", "boolean", "string", or
229     "uuid", representing the specified scalar type.
230
231 Wire Protocol
232 -------------
233
234 The database wire protocol is implemented in JSON-RPC 1.0.  We
235 encourage use of JSON-RPC over stream connections instead of JSON-RPC
236 over HTTP, for these reasons:
237
238     * JSON-RPC is a peer-to-peer protocol, but HTTP is a client-server
239       protocol, which is a poor match.  Thus, JSON-RPC over HTTP
240       requires the client to periodically poll the server to receive
241       server requests.
242
243     * HTTP is more complicated than stream connections and doesn't
244       provide any corresponding advantage.
245
246     * The JSON-RPC specification for HTTP transport is incomplete.
247
248 The database wire protocol consists of the following JSON-RPC methods:
249
250 list_dbs
251 ........
252
253 Request object members:
254
255     "method": "list_dbs"              required
256     "params": []                      required
257     "id": <nonnull-json-value>        required
258
259 Response object members:
260
261     "result": [<db-name>, ...]
262     "error": null
263     "id": same "id" as request
264
265 This operation retrieves an array whose elements are <db-name>s
266 that name the databases that can be accessed over this JSON-RPC
267 connection.
268
269 get_schema
270 ..........
271
272 Request object members:
273
274     "method": "get_schema"            required
275     "params": [<db-name>]             required
276     "id": <nonnull-json-value>        required
277
278 Response object members:
279
280     "result": <database-schema>
281     "error": null
282     "id": same "id" as request
283
284 This operation retrieves a <database-schema> that describes hosted
285 database <db-name>.
286
287 transact
288 ........
289
290 Request object members:
291
292     "method": "transact"                  required
293     "params": [<db-name>, <operation>*]   required
294     "id": <nonnull-json-value>            required
295
296 Response object members:
297
298     "result": [<object>*]
299     "error": null
300     "id": same "id" as request
301
302 The "params" array for this method consists of a <db-name> that
303 identifies the database to which the transaction applies, followed by
304 zero or more JSON objects, each of which represents a single database
305 operation.  The "Operations" section below describes the valid
306 operations.
307
308 The value of "id" must be unique among all in-flight transactions
309 within the current JSON-RPC session.  Otherwise, the server may return
310 a JSON-RPC error.
311
312 The database server executes each of the specified operations in the
313 specified order, except that if an operation fails, then the remaining
314 operations are not executed.
315
316 The set of operations is executed as a single atomic, consistent,
317 isolated transaction.  The transaction is committed only if every
318 operation succeeds.  Durability of the commit is not guaranteed unless
319 the "commit" operation, with "durable" set to true, is included in the
320 operation set (see below).
321
322 Regardless of whether errors occur, the response is always a JSON-RPC
323 response with null "error" and a "result" member that is an array with
324 the same number of elements as "params".  Each element of the "result"
325 array corresponds to the same element of the "params" array.  The
326 "result" array elements may be interpreted as follows:
327
328     - A JSON object that does not contain an "error" member indicates
329       that the operation completed successfully.  The specific members
330       of the object are specified below in the descriptions of
331       individual operations.  Some operations do not produce any
332       results, in which case the object will have no members.
333
334     - An <error>, which indicates that the operation completed with an
335       error.
336
337     - A JSON null value indicates that the operation was not attempted
338       because a prior operation failed.
339
340 In general, "result" contains some number of successful results,
341 possibly followed by an error, in turn followed by enough JSON null
342 values to match the number of elements in "params".  There is one
343 exception: if all of the operations succeed, but the results cannot be
344 committed, then "result" will have one more element than "params",
345 with the additional element an <error>.  The possible "error" strings
346 include at least the following:
347
348     "error": "referential integrity violation"
349
350         When the commit was attempted, a column's value referenced the
351         UUID for a row that did not exist in the table named by the
352         column's <base-type> key or value "refTable".  (This can be
353         caused by inserting a row that references a nonexistent row,
354         by deleting a row that is still referenced by another row, by
355         specifying the UUID for a row in the wrong table, and other
356         ways.)
357
358 If "params" contains one or more "wait" operations, then the
359 transaction may take an arbitrary amount of time to complete.  The
360 database implementation must be capable of accepting, executing, and
361 replying to other transactions and other JSON-RPC requests while a
362 transaction or transactions containing "wait" operations are
363 outstanding on the same or different JSON-RPC sessions.
364
365 The section "Notation for the Wire Protocol" below describes
366 additional notation for use with the wire protocol.  After that, the
367 "Operations" section describes each operation.
368
369 cancel
370 ......
371
372 Request object members:
373
374     "method": "cancel"                              required
375     "params": [the "id" for an outstanding request] required
376     "id": null                                      required
377
378 Response object members:
379
380     <no response>
381
382 This JSON-RPC notification instructs the database server to
383 immediately complete or cancel the "transact" request whose "id" is
384 the same as the notification's "params" value.  
385
386 If the "transact" request can be completed immediately, then the
387 server sends a response in the form described for "transact", above.
388 Otherwise, the server sends a JSON-RPC error response of the following
389 form:
390
391     "result": null
392     "error": "canceled"
393     "id": the request "id" member
394
395 The "cancel" notification itself has no reply.
396
397 monitor
398 .......
399
400 Request object members:
401
402     "method": "monitor"                                       required
403     "params": [<db-name>, <json-value>, <monitor-requests>]   required
404     "id": <nonnull-json-value>                                required
405
406 <monitor-requests> is an object that maps from a table name to a
407 <monitor-request>.
408
409 Each <monitor-request> is an object with the following members:
410
411     "columns": [<column>*]            optional
412     "select": <monitor-select>        optional
413
414 <monitor-select> is an object with the following members:
415
416     "initial": <boolean>              optional
417     "insert": <boolean>               optional
418     "delete": <boolean>               optional
419     "modify": <boolean>               optional
420
421 Response object members:
422
423     "result": <table-updates>
424     "error": null
425     "id": same "id" as request
426
427 This JSON-RPC request enables a client to replicate tables or subsets
428 of tables within database <db-name>.  Each <monitor-request> specifies
429 a table to be replicated.  The JSON-RPC response to the "monitor"
430 includes the initial contents of each table.  Afterward, when changes
431 to those tables are committed, the changes are automatically sent to
432 the client using the "update" monitor notification.  This monitoring
433 persists until the JSON-RPC session terminates or until the client
434 sends a "monitor_cancel" JSON-RPC request.
435
436 Each <monitor-request> describes how to monitor a table:
437
438     The circumstances in which an "update" notification is sent for a
439     row within the table are determined by <monitor-select>:
440
441         If "initial" is omitted or true, every row in the table is
442         sent as part of the reply to the "monitor" request.
443
444         If "insert" is omitted or true, "update" notifications are
445         sent for rows newly inserted into the table.
446
447         If "delete" is omitted or true, "update" notifications are
448         sent for rows deleted from the table.
449
450         If "modify" is omitted or true, "update" notifications are
451         sent whenever when a row in the table is modified.
452
453     The "columns" member specifies the columns whose values are
454     monitored.  If "columns" is omitted, all columns in the table,
455     except for "_uuid", are monitored.
456
457 The "result" in the JSON-RPC response to the "monitor" request is a
458 <table-updates> object (see below) that contains the contents of the
459 tables for which "initial" rows are selected.  If no tables' initial
460 contents are requested, then "result" is an empty object.
461
462 update
463 ......
464
465 Notification object members:
466
467     "method": "update"
468     "params": [<json-value>, <table-updates>]
469     "id": null
470
471 The <json-value> in "params" is the same as the value passed as the
472 <json-value> in "params" for the "monitor" request.
473
474 <table-updates> is an object that maps from a table name to a
475 <table-update>.
476
477 A <table-update> is an object that maps from the row's UUID (as a
478 36-byte string) to a <row-update> object.
479
480 A <row-update> is an object with the following members:
481
482     "old": <row>         present for "delete" and "modify" updates
483     "new": <row>         present for "initial", "insert", and "modify" updates
484
485 This JSON-RPC notification is sent from the server to the client to
486 tell it about changes to a monitored table (or the initial state of a
487 modified table).  Each table in which one or more rows has changed (or
488 whose initial view is being presented) is represented in "updates".
489 Each row that has changed (or whose initial view is being presented)
490 is represented in its <table-update> as a member with its name taken
491 from the row's _uuid member.  The corresponding value is a
492 <row-update>:
493
494     The "old" member is present for "delete" and "modify" updates.
495     For "delete" updates, each monitored column is included.  For
496     "modify" updates, the prior value of each monitored column whose
497     value has changed is included (monitored columns that have not
498     changed are represented in "new").
499
500     The "new" member is present for "initial", "insert", and "modify"
501     updates.  For "initial" and "insert" updates, each monitored
502     column is included.  For "modify" updates, the new value of each
503     monitored column is included.
504
505 monitor_cancel
506 ..............
507
508 Request object members:
509
510     "method": "monitor_cancel"                              required
511     "params": [<json-value>]                                required
512     "id": <nonnull-json-value>                              required
513
514 Response object members:
515
516     "result": {}
517     "error": null
518     "id": the request "id" member
519
520 Cancels the ongoing table monitor request, identified by the
521 <json-value> in "params" matching the <json-value> in "params" for an
522 ongoing "monitor" request.  No more "update" messages will be sent for
523 this table monitor.
524
525 echo
526 ....
527
528 Request object members:
529
530     "method": "echo"                                required
531     "params": JSON array with any contents          required
532     "id": <json-value>                              required
533
534 Response object members:
535
536     "result": same as "params"
537     "error": null
538     "id": the request "id" member
539
540 Both the JSON-RPC client and the server must implement this request.
541
542 This JSON-RPC request and response can be used to implement connection
543 keepalives, by allowing the server to check that the client is still
544 there or vice versa.
545
546
547 Notation for the Wire Protocol
548 ------------------------------
549
550 <db-name>
551
552     An <id> that names a database.  The valid <db-name>s can be
553     obtained using a "list-db" request.  The <db-name> is taken from
554     the "name" member of <database-schema>.
555
556 <table>
557
558     An <id> that names a table.
559
560 <column>
561
562     An <id> that names a table column.
563
564 <row>
565
566     A JSON object that describes a table row or a subset of a table
567     row.  Each member is the name of a table column paired with the
568     <value> of that column.
569
570 <value>
571
572     A JSON value that represents the value of a column in a table row,
573     one of <atom>, a <set>, or a <map>.
574
575 <atom>
576
577     A JSON value that represents a scalar value for a column, one of
578     <string>, <number>, <boolean>, <uuid>, <named-uuid>.
579
580 <set>
581
582     Either an <atom>, representing a set with exactly one element, or
583     a 2-element JSON array that represents a database set value.  The
584     first element of the array must be the string "set" and the second
585     element must be an array of zero or more <atom>s giving the values
586     in the set.  All of the <atom>s must have the same type.
587
588 <map>
589
590     A 2-element JSON array that represents a database map value.  The
591     first element of the array must be the string "map" and the second
592     element must be an array of zero or more <pair>s giving the values
593     in the map.  All of the <pair>s must have the same key and value
594     types.
595
596     (JSON objects are not used to represent <map> because JSON only
597     allows string names in an object.)
598
599 <pair>
600
601     A 2-element JSON array that represents a pair within a database
602     map.  The first element is an <atom> that represents the key, the
603     second element is an <atom> that represents the value.
604
605 <uuid>
606
607     A 2-element JSON array that represents a UUID.  The first element
608     of the array must be the string "uuid" and the second element must
609     be a 36-character string giving the UUID in the format described
610     by RFC 4122.  For example, the following <uuid> represents the
611     UUID 550e8400-e29b-41d4-a716-446655440000:
612
613         ["uuid", "550e8400-e29b-41d4-a716-446655440000"]
614
615 <named-uuid>
616
617     A 2-element JSON array that represents the UUID of a row inserted
618     in an "insert" operation within the same transaction.  The first
619     element of the array must be the string "named-uuid" and the
620     second element should be the string specified as the "uuid-name"
621     for an "insert" operation within the same transaction.  For
622     example, if an "insert" operation within this transaction
623     specifies a "uuid-name" of "myrow", the following <named-uuid>
624     represents the UUID created by that operation:
625
626         ["named-uuid", "myrow"]
627
628     A <named-uuid> may be used anywhere a <uuid> is valid.
629
630 <condition>
631
632     A 3-element JSON array of the form [<column>, <function>,
633     <value>] that represents a test on a column value.
634
635     Except as otherwise specified below, <value> must have the same
636     type as <column>.
637
638     The meaning depends on the type of <column>:
639
640         integer
641         real
642
643             <function> must be "<", "<=", "==", "!=", ">=", ">",
644             "includes", or "excludes".
645
646             The test is true if the column's value satisfies the
647             relation <function> <value>, e.g. if the column has value
648             1 and <value> is 2, the test is true if <function> is "<",
649             "<=" or "!=", but not otherwise.
650
651             "includes" is equivalent to "=="; "excludes" is equivalent
652             to "!=".
653
654         boolean
655         string
656         uuid
657
658             <function> must be "!=", "==", "includes", or "excludes".
659
660             If <function> is "==" or "includes", the test is true if
661             the column's value equals <value>.  If <function> is "!="
662             or "excludes", the test is inverted.
663
664         set
665         map
666
667             <function> must be "!=", "==", "includes", or "excludes".
668
669             If <function> is "==", the test is true if the column's
670             value contains exactly the same values (for sets) or pairs
671             (for maps).  If <function> is "!=", the test is inverted.
672
673             If <function> is "includes", the test is true if the
674             column's value contains all of the values (for sets) or
675             pairs (for maps) in <value>.  The column's value may also
676             contain other values or pairs.
677
678             If <function> is "excludes", the test is true if the
679             column's value does not contain any of the values (for
680             sets) or pairs (for maps) in <value>.  The column's value
681             may contain other values or pairs not in <value>.
682
683             If <function> is "includes" or "excludes", then the
684             required type of <value> is slightly relaxed, in that it
685             may have fewer than the minimum number of elements
686             specified by the column's type.  If <function> is
687             "excludes", then the required type is additionally relaxed
688             in that <value> may have more than the maximum number of
689             elements specified by the column's type.
690
691 <function>
692
693     One of "<", "<=", "==", "!=", ">=", ">", "includes", "excludes".
694
695 <mutation>
696
697     A 3-element JSON array of the form [<column>, <mutator>, <value>]
698     that represents a change to a column value.
699
700     Except as otherwise specified below, <value> must have the same
701     type as <column>.
702
703     The meaning depends on the type of <column>:
704
705         integer
706         real
707
708             <mutator> must be "+=", "-=", "*=", "/=" or (integer only)
709             "%=".  The value of <column> is changed to the sum,
710             difference, product, quotient, or remainder, respectively,
711             of <column> and <value>.
712
713             Constraints on <column> are ignored when parsing <value>.
714
715         boolean
716         string
717         uuid
718
719             No valid <mutator>s are currently defined for these types.
720
721         set
722
723             Any <mutator> valid for the set's element type may be
724             applied to the set, in which case the mutation is applied
725             to each member of the set individually.  <value> must be a
726             scalar value of the same type as the set's element type,
727             except that contraints are ignored.
728
729             If <mutator> is "insert", then each of the values in the
730             set in <value> is added to <column> if it is not already
731             present.  The required type of <value> is slightly
732             relaxed, in that it may have fewer than the minimum number
733             of elements specified by the column's type.
734
735             If <mutator> is "delete", then each of the values in the
736             set in <value> is removed from <column> if it is present
737             there.  The required type is slightly relaxed in that
738             <value> may have more or less than the maximum number of
739             elements specified by the column's type.
740
741         map
742
743             <mutator> must be "insert" or "delete".
744
745             If <mutator> is "insert", then each of the key-value pairs
746             in the map in <value> is added to <column> only if its key
747             is not already present.  The required type of <value> is
748             slightly relaxed, in that it may have fewer than the
749             minimum number of elements specified by the column's type.
750
751             If <mutator> is "delete", then <value> may have the same
752             type as <column> (a map type) or it may be a set whose
753             element type is the same as <column>'s key type:
754
755                 - If <value> is a map, the mutation deletes each
756                   key-value pair in <column> whose key and value equal
757                   one of the key-value pairs in <value>.
758
759                 - If <value> is a set, the mutation deletes each
760                   key-value pair in <column> whose key equals one of
761                   the values in <value>.
762
763             For "delete", <value> may have any number of elements,
764             regardless of restrictions on the number of elements in
765             <column>.
766
767 <mutator>
768
769     One of "+=", "-=", "*=", "/=", "%=", "insert", "delete".
770
771 Operations
772 ----------
773
774 Each of the available operations is described below.
775
776 insert
777 ......
778
779 Request object members:
780
781     "op": "insert"          required
782     "table": <table>        required
783     "row": <row>            required
784     "uuid-name": <id>       optional
785
786 Result object members:
787
788     "uuid": <uuid>
789
790 Semantics:
791
792     Inserts "row" into "table".
793
794     If "row" does not specify values for all the columns in "table",
795     those columns receive default values.  The default value for a
796     column depends on its type.  The default for a column whose <type>
797     specifies a "min" of 0 is an empty set or empty map.  Otherwise,
798     the default is a single value or a single key-value pair, whose
799     value(s) depend on its <atomic-type>:
800
801         - "integer" or "real": 0
802
803         - "boolean": false
804
805         - "string": "" (the empty string)
806
807         - "uuid": 00000000-0000-0000-0000-000000000000
808
809     The new row receives a new, randomly generated UUID.
810
811     If "uuid-name" is supplied, then it is an error if <id> is not
812     unique among the "uuid-name"s supplied on all the "insert"
813     operations within this transaction.
814
815     The UUID for the new row is returned as the "uuid" member of the
816     result.
817
818 Errors:
819
820     "error": "duplicate uuid-name"
821
822         The same "uuid-name" appears on another "insert" operation
823         within this transaction.
824
825     "error": "constraint violation"
826
827         One of the values in "row" does not satisfy the immediate
828         constraints for its column's <base-type>.  This error will
829         occur for columns that are not explicitly set by "row" if the
830         default value does not satisfy the column's constraints.
831
832 select
833 ......
834
835 Request object members:
836
837     "op": "select"                required
838     "table": <table>              required
839     "where": [<condition>*]       required
840     "columns": [<column>*]        optional
841
842 Result object members:
843
844     "rows": [<row>*]
845
846 Semantics:
847
848     Searches "table" for rows that match all the conditions specified
849     in "where".  If "where" is an empty array, every row in "table" is
850     selected.
851
852     The "rows" member of the result is an array of objects.  Each
853     object corresponds to a matching row, with each column
854     specified in "columns" as a member, the column's name as the
855     member name and its value as the member value.  If "columns"
856     is not specified, all the table's columns are included.  If
857     two rows of the result have the same values for all included
858     columns, only one copy of that row is included in "rows".
859     Specifying "_uuid" within "columns" will avoid dropping
860     duplicates, since every row has a unique UUID.
861
862     The ordering of rows within "rows" is unspecified.
863
864 update
865 ......
866
867 Request object members:
868
869     "op": "update"                required
870     "table": <table>              required
871     "where": [<condition>*]       required
872     "row": <row>                  required
873
874 Result object members:
875
876     "count": <integer>
877
878 Semantics:
879
880     Updates rows in a table.
881
882     Searches "table" for rows that match all the conditions
883     specified in "where".  For each matching row, changes the
884     value of each column specified in "row" to the value for that
885     column specified in "row".
886
887     The "_uuid" and "_version" columns of a table may not be directly
888     updated with this operation.  Columns designated read-only in the 
889     schema also may not be updated.
890
891     The "count" member of the result specifies the number of rows
892     that matched.
893
894 Errors:
895
896     "error": "constraint violation"
897
898         One of the values in "row" does not satisfy the immediate
899         constraints for its column's <base-type>.
900 mutate
901 ......
902
903 Request object members:
904
905     "op": "mutate"                required
906     "table": <table>              required
907     "where": [<condition>*]       required
908     "mutations": [<mutation>*]    required
909
910 Result object members:
911
912     "count": <integer>
913
914 Semantics:
915
916     Mutates rows in a table.
917
918     Searches "table" for rows that match all the conditions specified
919     in "where".  For each matching row, mutates its columns as
920     specified by each <mutation> in "mutations", in the order
921     specified.
922
923     The "_uuid" and "_version" columns of a table may not be directly
924     modified with this operation.  Columns designated read-only in the
925     schema also may not be updated.
926
927     The "count" member of the result specifies the number of rows
928     that matched.
929
930 Errors:
931
932     "error": "domain error"
933
934         The result of the mutation is not mathematically defined,
935         e.g. division by zero.
936
937     "error": "range error"
938
939         The result of the mutation is not representable within the
940         database's format, e.g. an integer result outside the range
941         INT64_MIN...INT64_MAX or a real result outside the range
942         -DBL_MAX...DBL_MAX.
943
944     "error": "constraint violation"
945
946         The mutation caused the column's value to violate a
947         constraint, e.g. it caused a column to have more or fewer
948         values than are allowed, an arithmetic operation caused a set
949         or map to have duplicate elements, or it violated a constraint
950         specified by a column's <base-type>.
951
952 delete
953 ......
954
955 Request object members:
956
957     "op": "delete"                required
958     "table": <table>              required
959     "where": [<condition>*]       required
960
961 Result object members:
962
963     "count": <integer>
964
965 Semantics:
966
967     Deletes all the rows from "table" that match all the conditions
968     specified in "where".
969
970     The "count" member of the result specifies the number of deleted
971     rows.
972
973 wait
974 ....
975
976 Request object members:
977
978     "op": "wait"                        required
979     "timeout": <integer>                optional
980     "table": <table>                    required
981     "where": [<condition>*]             required
982     "columns": [<column>*]              required
983     "until": "==" or "!="               required
984     "rows": [<row>*]                    required
985
986 Result object members:
987
988     none
989
990 Semantics:
991
992     Waits until a condition becomes true.
993
994     If "until" is "==", checks whether the query on "table" specified
995     by "where" and "columns", which is evaluated in the same way as
996     specified for "select", returns the result set specified by
997     "rows".  If it does, then the operation completes successfully.
998     Otherwise, the entire transaction rolls back.  It is automatically
999     restarted later, after a change in the database makes it possible
1000     for the operation to succeed.  The client will not receive a
1001     response until the operation permanently succeeds or fails.
1002     
1003     If "until" is "!=", the sense of the test is negated.  That is, as
1004     long as the query on "table" specified by "where" and "columns"
1005     returns "rows", the transaction will be rolled back and restarted
1006     later.
1007
1008     If "timeout" is specified, then the transaction aborts after the
1009     specified number of milliseconds.  The transaction is guaranteed
1010     to be attempted at least once before it aborts.  A "timeout" of 0
1011     will abort the transaction on the first mismatch.
1012
1013 Errors:
1014
1015     "error": "not supported"
1016
1017         One or more of the columns in this table do not support
1018         triggers.  This error will not occur if "timeout" is 0.
1019
1020     "error": "timed out"
1021
1022         The "timeout" was reached before the transaction was able to
1023         complete.
1024
1025 commit
1026 ......
1027
1028 Request object members:
1029
1030     "op": "commit"                      required
1031     "durable": <boolean>                required
1032
1033 Result object members:
1034
1035     none
1036
1037 Semantics:
1038
1039     If "durable" is specified as true, then the transaction, if it
1040     commits, will be stored durably (to disk) before the reply is sent
1041     to the client.
1042
1043 Errors:
1044
1045     "error": "not supported"
1046
1047         When "durable" is true, this database implementation does not
1048         support durable commits.
1049
1050 abort
1051 .....
1052
1053 Request object members:
1054
1055     "op": "abort"                      required
1056
1057 Result object members:
1058
1059     (never succeeds)
1060
1061 Semantics:
1062
1063     Aborts the transaction with an error.  This may be useful for
1064     testing.
1065
1066 Errors:
1067
1068     "error": "aborted"
1069
1070         This operation always fails with this error.
1071
1072 comment
1073 .......
1074
1075
1076 Request object members:
1077
1078     "op": "comment"                    required
1079     "comment": <string>                required
1080
1081 Result object members:
1082
1083     none
1084
1085 Semantics:
1086
1087     Provides information to a database administrator on the purpose of
1088     a transaction.  The OVSDB server, for example, adds comments in
1089     transactions that modify the database to the database journal.