A few minor error handling improvements for unusual situations.
[versaplex.git] / api.xml
blobe43d61e402359bbe5bcc370e73923759ff3fc99b
1 <!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
2 <node name="/db">
3     <interface name="vx.db">
4         <method name="ExecNoResult">
5             <arg name="query" type="s" direction="in"/>
6         </method>
8         <method name="ExecScalar">
9             <arg name="query" type="s" direction="in"/>
10             <arg name="result" type="v" direction="out"/>
11         </method>
13         <method name="ExecRecordset">
14             <arg name="query" type="s" direction="in"/>
15             <arg name="colinfo" type="a(issnny)" direction="out"/>
16             <!-- Returned data is:
17                 int32 column size
18                 string column name
19                 string column type
20                 int16 numeric precision
21                 int16 numeric scale
22                 uint8 nullability
23                     - a bitfield, with only one bit currently defined,
24                       0x1 = is nullable
25             -->
26             <arg name="data" type="v" direction="out"/>
27             <!-- row-major order; the variant's signature is an array type
28                  of the form a(...) where ... are the columns -->
29             <arg name="nullity" type="aay" direction="out"/>
30             <!-- 0 for not null, 1 for null -->
31         </method>
32         <method name="ExecChunkRecordset">
33             <arg name="query" type="s" direction="in"/>
34             <!-- Returns signals of the same type as responses to
35                 ExecRecordset above, except also suffixed with:
36                 uint32 serial number of ExecChunkRecordset request
38                 Signals are called "ChunkRecordsetSig".  See below.
40                 Returns a string just so that you feel good knowing
41                 you got some data.
42             -->
43             <arg name="pat_on_the_back" type="s" direction="out"/>
44         </method>
45         <signal name="ChunkRecordsetSig">
46             <arg name="colinfo" type="a(issnny)"/>
47             <!-- Returned data is:
48                 int32 column size
49                 string column name
50                 string column type
51                 int16 numeric precision
52                 int16 numeric scale
53                 uint8 nullability
54                     - a bitfield, with only one bit currently defined,
55                       0x1 = is nullable
56             -->
57             <arg name="data" type="v"/>
58             <!-- row-major order; the variant's signature is an array type
59                  of the form a(...) where ... are the columns -->
60             <arg name="nullity" type="aay"/>
61             <!-- 0 for not null, 1 for null -->
62             <arg name="reply_serial" type="u"/>
63             <!-- serial # of query this is in response to -->
64         </signal>
65         <method name="Test">
66             <arg name="colinfo" type="a(issnny)" direction="out"/>
67             <arg name="data" type="v" direction="out"/>
68             <arg name="nullity" type="aay" direction="out"/>
69         </method>
71         <!-- Any of these can throw:
72              vx.db.sqlerror - SQL statement error (text
73                      parameter will include actual error)
74              vx.db.toomuchdata - Scalar or Recordset result
75                      is too large to transmit in a single d-bus message. Will
76                      need to use a different API (not yet defined). text
77                      parameter will indicate what the problem is
78              vx.db.badschema - Schema returned by the query
79                      contains features not supported (such as sql_variant).
80                      text parameter will indicate what the problem is
81              vx.db.exception - Method threw an exception
82                      other than those listed above. Text parameter will contain
83                      the normal .NET exception description and backtrace
84         -->
86         <!-- Future:
87              - Transaction support
88              - Execute particular procedures, not just SQL
89              - Ability to stream results as signals rather than in a single
90                message (allows interleaving results and larger sized result
91                sets)
92         -->
93     </interface>
94 </node>