]> granicus.if.org Git - postgresql/commitdiff
From: Taral <taral@cyberjunkie.com>
authorMarc G. Fournier <scrappy@hub.org>
Tue, 17 Nov 1998 03:10:36 +0000 (03:10 +0000)
committerMarc G. Fournier <scrappy@hub.org>
Tue, 17 Nov 1998 03:10:36 +0000 (03:10 +0000)
More COS Query Service support.

src/corba/CosQuery.idl [new file with mode: 0644]
src/corba/pgsql.idl

diff --git a/src/corba/CosQuery.idl b/src/corba/CosQuery.idl
new file mode 100644 (file)
index 0000000..881be07
--- /dev/null
@@ -0,0 +1,89 @@
+/* RCS $Id: CosQuery.idl,v 1.1 1998/11/17 03:10:35 scrappy Exp $\r
+ *\r
+ * ----------------------------------------------------------------------------\r
+ * This is unmarked software provided by the Object Management Group,Inc. (OMG)\r
+ * ----------------------------------------------------------------------------\r
+ */\r
+\r
+\r
+/**\r
+ * CosQuery is the Common Object Services Specification query module\r
+ * as it it appears in COSS1, v1.0.\r
+ */\r
+\r
+\r
+#ifndef CosQuery_idl\r
+#define CosQuery_idl\r
+\r
+#ifndef CosQueryCollection_idl\r
+#include "CosQueryCollection.idl"\r
+#endif\r
+\r
+module CosQuery {\r
+\r
+  exception QueryInvalid {string why;}; \r
+  exception QueryProcessingError {string why;}; \r
+  exception QueryTypeInvalid {};\r
+\r
+  enum QueryStatus {complete, incomplete};\r
+\r
+  typedef CosQueryCollection::ParameterList ParameterList;\r
+\r
+  typedef CORBA::InterfaceDef QLType;\r
+  typedef sequence<QLType> QLTypeSeq;\r
+\r
+  interface Query;\r
+  interface QueryLanguageType {}; \r
+  interface SQLQuery : QueryLanguageType {}; \r
+  interface SQL_92Query : SQLQuery {}; \r
+  interface OQL : QueryLanguageType {}; \r
+  interface OQLBasic : OQL {}; \r
+  interface OQL_93 : OQL {}; \r
+  interface OQL_93Basic : OQL_93, OQLBasic {};\r
+\r
+  interface QueryEvaluator { \r
+\r
+    readonly attribute QLTypeSeq ql_types; \r
+    readonly attribute QLType default_ql_type;\r
+\r
+    any evaluate (in string         query,\r
+                 in QLType         ql_type, \r
+                 in ParameterList  params) \r
+      raises(QueryTypeInvalid,\r
+            QueryInvalid,\r
+            QueryProcessingError); \r
+  };\r
+\r
+  interface QueryableCollection : QueryEvaluator, \r
+    CosQueryCollection::Collection {\r
+\r
+  };\r
+\r
+  interface QueryManager : QueryEvaluator { \r
+\r
+    Query create (in string          query,\r
+                 in QLType          ql_type, \r
+                 in  ParameterList  params) \r
+      raises(QueryTypeInvalid,\r
+            QueryInvalid);\r
+\r
+  };\r
+\r
+  interface Query { \r
+\r
+    readonly attribute QueryManager query_mgr;\r
+\r
+    void prepare (in ParameterList params) \r
+      raises(QueryProcessingError); \r
+\r
+    void execute (in ParameterList params) \r
+      raises(QueryProcessingError);\r
+\r
+    QueryStatus get_status (); \r
+\r
+    any get_result (); \r
+  };\r
+\r
+};\r
+\r
+#endif // CosQuery_idl\r
index 33c548401625e66fd33370749de53923fdfca97d..63a593b2f377591ee55c838454d65be3f75c0760 100644 (file)
@@ -1,78 +1,79 @@
-#include "CosQueryCollection.idl"\r
-\r
 #ifndef pgsql_idl\r
 #define pgsql_idl\r
 \r
+#ifndef CosQuery_idl\r
+#include "CosQuery.idl"\r
+#endif\r
+\r
+#ifndef CosQueryCollection_idl\r
+#include "CosQueryCollection.idl"\r
+#endif\r
+\r
 module PostgreSQL {\r
-    \r
-    // Built-in types\r
-    \r
-    module Types {\r
-        // Arrays in network order\r
-        typedef short int2;\r
-        typedef long int4;\r
-        typedef long int8[2];\r
-    };\r
-    \r
-    \r
-    // NULL support\r
-    \r
-    typedef boolean Null;\r
-    \r
-    union Value switch (Null) {\r
-      case false: any value;\r
-    };\r
-    \r
-    typedef sequence<Value> Row;\r
-    \r
-    // <info>\r
-    // More about the application of COSS:\r
-    // \r
-    // A Table will be a QueryableCollection of Rows\r
-    // A Database will be a QueryableCollection of Tables\r
-    // Both will be queryable via the Query Service\r
-    // \r
-    // Other relations will be representable using the Relationship Service\r
-    // This includes primary/foreign keys and anything else :)\r
-    // \r
-    // GRANT/REVOKE can be supplied via the Security Service\r
-    // \r
-    // See a pattern here? The whole of SQL can be implemented by these services!\r
-    // The statements go through a parser. Queries and subqueries are passed to the\r
-    // database for processing. Returned items are handled appropriately:\r
-    // \r
-    // SELECT: return the items to the caller\r
-    // UPDATE: modify the items (direct)\r
-    // DELETE: call delete() on each Row (direct)\r
-    // GRANT/REVOKE: modify ACLs (via Security Service)\r
-    // ALTER: modify the items (direct) and/or the relations (via Relationship Service)\r
-    // etc.\r
-    // \r
-    // I'm not sure yet about LOCK and UNLOCK.\r
-    // </info>\r
-    \r
-    \r
-    // Query result interface\r
-    // \r
-    // Should the iterator support a 'boolean skip(in long n)' extension?\r
-    \r
-    interface QueryResult : CosQueryCollection::Collection {};\r
-    interface QueryResultIterator : CosQueryCollection::Iterator {};\r
-    \r
-    \r
-    // Connected database object\r
-    \r
-    interface Database {\r
-        QueryResult exec(in string query);\r
-        void disconnect();\r
-    };\r
-    \r
-    \r
-    // Server object (stateless)\r
-    \r
-    interface Server {\r
-        Database connect(in string db, in string user, in string password);\r
-    };\r
+       \r
+       // Built-in types\r
+       \r
+       module Types {\r
+               // Arrays in network order\r
+               typedef short int2;\r
+               typedef long int4;\r
+               typedef long int8[2];\r
+       };\r
+       \r
+       \r
+       // NULL support\r
+       \r
+       typedef boolean Null;\r
+       \r
+       union Value switch (Null) {\r
+         case false: any value;\r
+       };\r
+       \r
+       \r
+       // Row definition\r
+       \r
+       typedef sequence<Value> Row;\r
+       \r
+       // <info>\r
+       // More about the application of COSS:\r
+       // \r
+       // A Table will be a QueryableCollection of Rows\r
+       // A Database will be a QueryableCollection of Tables\r
+       // (Currently Tables are not exported... maybe later.)\r
+       // Both will be queryable via the Query Service\r
+       // \r
+       // Other relations will be representable using the Relationship Service\r
+       // This includes primary/foreign keys and anything else :)\r
+       // \r
+       // GRANT/REVOKE can be supplied via the Security Service\r
+       // \r
+       // See a pattern here? The whole of SQL can be implemented by these services!\r
+       // The statements go through a parser. Queries and subqueries are passed to the\r
+       // database for processing. Returned items are handled appropriately:\r
+       // \r
+       // SELECT: return the items to the caller\r
+       // UPDATE: modify the items (direct)\r
+       // DELETE: call delete() on each Row (direct)\r
+       // GRANT/REVOKE: modify ACLs (via Security Service)\r
+       // ALTER: modify the items (direct) and/or the relations (via Relationship Service)\r
+       // etc.\r
+       // \r
+       // I'm not sure yet about LOCK and UNLOCK.\r
+       // </info>\r
+       \r
+       \r
+       // Connected database object\r
+       \r
+       interface Database : CosQuery::QueryableCollection {\r
+               void disconnect();\r
+       };\r
+       \r
+       \r
+       // Server object (stateless)\r
+       \r
+       interface Server {\r
+               Database connect(in string db, in string user, in string password);\r
+       };\r
 };\r
 \r
 #endif // pgsql_idl\r