mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	
							
								
								
									
										89
									
								
								src/corba/CosQuery.idl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										89
									
								
								src/corba/CosQuery.idl
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,89 @@
 | 
				
			|||||||
 | 
					/* RCS $Id: CosQuery.idl,v 1.1 1998/11/17 03:10:35 scrappy Exp $
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * ----------------------------------------------------------------------------
 | 
				
			||||||
 | 
					 * This is unmarked software provided by the Object Management Group,Inc. (OMG)
 | 
				
			||||||
 | 
					 * ----------------------------------------------------------------------------
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * CosQuery is the Common Object Services Specification query module
 | 
				
			||||||
 | 
					 * as it it appears in COSS1, v1.0.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef CosQuery_idl
 | 
				
			||||||
 | 
					#define CosQuery_idl
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef CosQueryCollection_idl
 | 
				
			||||||
 | 
					#include "CosQueryCollection.idl"
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					module CosQuery {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  exception QueryInvalid {string why;}; 
 | 
				
			||||||
 | 
					  exception QueryProcessingError {string why;}; 
 | 
				
			||||||
 | 
					  exception QueryTypeInvalid {};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  enum QueryStatus {complete, incomplete};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  typedef CosQueryCollection::ParameterList ParameterList;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  typedef CORBA::InterfaceDef QLType;
 | 
				
			||||||
 | 
					  typedef sequence<QLType> QLTypeSeq;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  interface Query;
 | 
				
			||||||
 | 
					  interface QueryLanguageType {}; 
 | 
				
			||||||
 | 
					  interface SQLQuery : QueryLanguageType {}; 
 | 
				
			||||||
 | 
					  interface SQL_92Query : SQLQuery {}; 
 | 
				
			||||||
 | 
					  interface OQL : QueryLanguageType {}; 
 | 
				
			||||||
 | 
					  interface OQLBasic : OQL {}; 
 | 
				
			||||||
 | 
					  interface OQL_93 : OQL {}; 
 | 
				
			||||||
 | 
					  interface OQL_93Basic : OQL_93, OQLBasic {};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  interface QueryEvaluator { 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    readonly attribute QLTypeSeq ql_types; 
 | 
				
			||||||
 | 
					    readonly attribute QLType default_ql_type;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    any evaluate (in string         query,
 | 
				
			||||||
 | 
							  in QLType         ql_type, 
 | 
				
			||||||
 | 
							  in ParameterList  params) 
 | 
				
			||||||
 | 
					      raises(QueryTypeInvalid,
 | 
				
			||||||
 | 
						     QueryInvalid,
 | 
				
			||||||
 | 
						     QueryProcessingError); 
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  interface QueryableCollection : QueryEvaluator, 
 | 
				
			||||||
 | 
					    CosQueryCollection::Collection {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  interface QueryManager : QueryEvaluator { 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    Query create (in string          query,
 | 
				
			||||||
 | 
							  in QLType          ql_type, 
 | 
				
			||||||
 | 
							  in  ParameterList  params) 
 | 
				
			||||||
 | 
					      raises(QueryTypeInvalid,
 | 
				
			||||||
 | 
						     QueryInvalid);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  interface Query { 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    readonly attribute QueryManager query_mgr;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    void prepare (in ParameterList params) 
 | 
				
			||||||
 | 
					      raises(QueryProcessingError); 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    void execute (in ParameterList params) 
 | 
				
			||||||
 | 
					      raises(QueryProcessingError);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    QueryStatus get_status (); 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    any get_result (); 
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif // CosQuery_idl
 | 
				
			||||||
@@ -1,8 +1,14 @@
 | 
				
			|||||||
#include "CosQueryCollection.idl"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifndef pgsql_idl
 | 
					#ifndef pgsql_idl
 | 
				
			||||||
#define pgsql_idl
 | 
					#define pgsql_idl
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef CosQuery_idl
 | 
				
			||||||
 | 
					#include "CosQuery.idl"
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef CosQueryCollection_idl
 | 
				
			||||||
 | 
					#include "CosQueryCollection.idl"
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
module PostgreSQL {
 | 
					module PostgreSQL {
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	// Built-in types
 | 
						// Built-in types
 | 
				
			||||||
@@ -23,6 +29,9 @@ module PostgreSQL {
 | 
				
			|||||||
	  case false: any value;
 | 
						  case false: any value;
 | 
				
			||||||
	};
 | 
						};
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						// Row definition
 | 
				
			||||||
 | 
						
 | 
				
			||||||
	typedef sequence<Value> Row;
 | 
						typedef sequence<Value> Row;
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	// <info>
 | 
						// <info>
 | 
				
			||||||
@@ -30,6 +39,7 @@ module PostgreSQL {
 | 
				
			|||||||
	// 
 | 
						// 
 | 
				
			||||||
	// A Table will be a QueryableCollection of Rows
 | 
						// A Table will be a QueryableCollection of Rows
 | 
				
			||||||
	// A Database will be a QueryableCollection of Tables
 | 
						// A Database will be a QueryableCollection of Tables
 | 
				
			||||||
 | 
						// (Currently Tables are not exported... maybe later.)
 | 
				
			||||||
	// Both will be queryable via the Query Service
 | 
						// Both will be queryable via the Query Service
 | 
				
			||||||
	// 
 | 
						// 
 | 
				
			||||||
	// Other relations will be representable using the Relationship Service
 | 
						// Other relations will be representable using the Relationship Service
 | 
				
			||||||
@@ -52,18 +62,9 @@ module PostgreSQL {
 | 
				
			|||||||
	// </info>
 | 
						// </info>
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
    // Query result interface
 | 
					 | 
				
			||||||
    // 
 | 
					 | 
				
			||||||
    // Should the iterator support a 'boolean skip(in long n)' extension?
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
    interface QueryResult : CosQueryCollection::Collection {};
 | 
					 | 
				
			||||||
    interface QueryResultIterator : CosQueryCollection::Iterator {};
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
	// Connected database object
 | 
						// Connected database object
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
    interface Database {
 | 
						interface Database : CosQuery::QueryableCollection {
 | 
				
			||||||
        QueryResult exec(in string query);
 | 
					 | 
				
			||||||
		void disconnect();
 | 
							void disconnect();
 | 
				
			||||||
	};
 | 
						};
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user