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