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