OSDN Git Service

Change catalog entries for record_out and record_send to show only one
[pg-rex/syncrep.git] / src / corba / pgsql.idl
1 #ifndef pgsql_idl
2 #define pgsql_idl
3
4 #ifndef CosQuery_idl
5 #include "CosQuery.idl"
6 #endif
7
8 #ifndef CosQueryCollection_idl
9 #include "CosQueryCollection.idl"
10 #endif
11
12 #pragma prefix ""
13
14 module PostgreSQL {
15
16         // Built-in types
17
18         module Types {
19                 // Arrays in network order
20                 typedef short int2;
21                 typedef long int4;
22                 typedef long int8[2];
23         };
24
25
26         // NULL support
27
28         typedef boolean Null;
29
30         union Value switch (Null) {
31           case FALSE: any value;
32         };
33
34
35         // Row definition
36
37         typedef sequence<Value> Row;
38
39         // <info>
40         // More about the application of COSS:
41         //
42         // A Table will be a QueryableCollection of Rows
43         // A Database will be a QueryableCollection of Tables
44         // (Currently Tables are not exported... maybe later.)
45         // Both will be queryable via the Query Service
46         //
47         // Other relations will be representable using the Relationship Service
48         // This includes primary/foreign keys and anything else :)
49         //
50         // GRANT/REVOKE can be supplied via the Security Service
51         //
52         // See a pattern here? The whole of SQL can be implemented by these services!
53         // The statements go through a parser. Queries and subqueries are passed to the
54         // database for processing. Returned items are handled appropriately:
55         //
56         // SELECT: return the items to the caller
57         // UPDATE: modify the items (direct)
58         // DELETE: call delete() on each Row (direct)
59         // GRANT/REVOKE: modify ACLs (via Security Service)
60         // ALTER: modify the items (direct) and/or the relations (via Relationship Service)
61         // etc.
62         //
63         // I'm not sure yet about LOCK and UNLOCK.
64         // </info>
65
66         // Expirable object
67
68         interface Expirable {
69                 /* oneway? */ void keepalive();
70                 void remove();
71         };
72
73
74         // Upcall object
75
76         interface Upcall {
77                 void notice(in string message);
78                 void abort();
79         };
80
81
82         // Connected database object
83
84         interface Database : CosQuery::QueryableCollection, Expirable {
85                 void setupcall(in Upcall obj);
86         };
87
88
89         // Server object (stateless)
90
91         interface Server {
92                 Database connect(in string db, in string user, in string password);
93         };
94 };
95
96 #endif // pgsql_idl