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