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