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