OSDN Git Service

002c347f7d576ab32e0821142986e336daf6ce3c
[pg-rex/syncrep.git] / src / corba / CosQuery.idl
1 /* RCS $PostgreSQL: pgsql/src/corba/CosQuery.idl,v 1.3 2003/11/29 22:40:52 pgsql Exp $
2  *
3  * ----------------------------------------------------------------------------
4  * This is unmarked software provided by the Object Management Group,Inc. (OMG)
5  * ----------------------------------------------------------------------------
6  */
7
8
9 /**
10  * CosQuery is the Common Object Services Specification query module
11  * as it it appears in COSS1, v1.0.
12  */
13
14
15 #ifndef CosQuery_idl
16 #define CosQuery_idl
17
18 #ifndef CosQueryCollection_idl
19 #include "CosQueryCollection.idl"
20 #endif
21
22 module CosQuery {
23
24   exception QueryInvalid {string why;};
25   exception QueryProcessingError {string why;};
26   exception QueryTypeInvalid {};
27
28   enum QueryStatus {complete, incomplete};
29
30   typedef CosQueryCollection::ParameterList ParameterList;
31
32   typedef CORBA::InterfaceDef QLType;
33   typedef sequence<QLType> QLTypeSeq;
34
35   interface Query;
36   interface QueryLanguageType {};
37   interface SQLQuery : QueryLanguageType {};
38   interface SQL_92Query : SQLQuery {};
39   interface OQL : QueryLanguageType {};
40   interface OQLBasic : OQL {};
41   interface OQL_93 : OQL {};
42   interface OQL_93Basic : OQL_93, OQLBasic {};
43
44   interface QueryEvaluator {
45
46     readonly attribute QLTypeSeq ql_types;
47     readonly attribute QLType default_ql_type;
48
49     any evaluate (in string         query,
50                   in QLType         ql_type,
51                   in ParameterList  params)
52       raises(QueryTypeInvalid,
53              QueryInvalid,
54              QueryProcessingError);
55   };
56
57   interface QueryableCollection : QueryEvaluator,
58     CosQueryCollection::Collection {
59
60   };
61
62   interface QueryManager : QueryEvaluator {
63
64     Query create (in string          query,
65                   in QLType          ql_type,
66                   in  ParameterList  params)
67       raises(QueryTypeInvalid,
68              QueryInvalid);
69
70   };
71
72   interface Query {
73
74     readonly attribute QueryManager query_mgr;
75
76     void prepare (in ParameterList params)
77       raises(QueryProcessingError);
78
79     void execute (in ParameterList params)
80       raises(QueryProcessingError);
81
82     QueryStatus get_status ();
83
84     any get_result ();
85   };
86
87 };
88
89 #endif // CosQuery_idl