Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit935a2e6

Browse files
committed
Start defining the Corba work...From: Taral <taral@cyberjunkie.com>
1 parent0856cdf commit935a2e6

File tree

2 files changed

+161
-0
lines changed

2 files changed

+161
-0
lines changed

‎src/corba/CosQueryCollection.idl

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
/* RCS $Id: CosQueryCollection.idl,v 1.1 1998/11/16 18:03:34 scrappy Exp $
2+
*
3+
* ----------------------------------------------------------------------------
4+
* This is unmarked software provided by the Object Management Group,Inc. (OMG)
5+
* ----------------------------------------------------------------------------
6+
*/
7+
8+
9+
/**
10+
* CosQueryCollection is the Common Object Services Specification query
11+
* query colleciton module as it it appears in COSS1, v1.0.
12+
*/
13+
14+
15+
#ifndef CosQueryCollection_idl
16+
#define CosQueryCollection_idl
17+
18+
module CosQueryCollection {
19+
20+
exception ElementInvalid {};
21+
exception IteratorInvalid {};
22+
exception PositionInvalid {};
23+
24+
typedef string Istring;
25+
struct NVPair {
26+
Istring name;
27+
any value;
28+
};
29+
30+
typedef sequence<NVPair> ParameterList;
31+
32+
interface Collection;
33+
interface Iterator;
34+
35+
interface CollectionFactory {
36+
Collection create (in ParameterList params);
37+
};
38+
39+
interface Collection {
40+
41+
readonly attribute long cardinality;
42+
43+
void add_element (in any element)
44+
raises(ElementInvalid);
45+
46+
void add_all_elements (in Collection elements)
47+
raises(ElementInvalid);
48+
49+
void insert_element_at (in any element, in Iterator where)
50+
raises(IteratorInvalid,
51+
ElementInvalid);
52+
53+
void replace_element_at (in any element, in Iterator where)
54+
raises(IteratorInvalid,
55+
PositionInvalid,
56+
ElementInvalid);
57+
58+
void remove_element_at (in Iterator where)
59+
raises(IteratorInvalid,
60+
PositionInvalid);
61+
62+
void remove_all_elements ();
63+
64+
any retrieve_element_at (in Iterator where)
65+
raises(IteratorInvalid,
66+
PositionInvalid);
67+
68+
Iterator create_iterator ();
69+
70+
};
71+
72+
interface Iterator {
73+
any next ()
74+
raises(IteratorInvalid,
75+
PositionInvalid);
76+
void reset ();
77+
boolean more ();
78+
};
79+
80+
};
81+
82+
#endif // CosQueryCollection_idl
83+

‎src/corba/pgsql.idl

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
#include "CosQueryCollection.idl"
2+
3+
#ifndef pgsql_idl
4+
#define pgsql_idl
5+
6+
module PostgreSQL {
7+
8+
// Built-in types
9+
10+
module Types {
11+
// Arrays in network order
12+
typedef short int2;
13+
typedef long int4;
14+
typedef long int8[2];
15+
};
16+
17+
18+
// NULL support
19+
20+
typedef boolean Null;
21+
22+
union Value switch (Null) {
23+
case false: any value;
24+
};
25+
26+
typedef sequence<Value> Row;
27+
28+
// <info>
29+
// More about the application of COSS:
30+
//
31+
// A Table will be a QueryableCollection of Rows
32+
// A Database will be a QueryableCollection of Tables
33+
// Both will be queryable via the Query Service
34+
//
35+
// Other relations will be representable using the Relationship Service
36+
// This includes primary/foreign keys and anything else :)
37+
//
38+
// GRANT/REVOKE can be supplied via the Security Service
39+
//
40+
// See a pattern here? The whole of SQL can be implemented by these services!
41+
// The statements go through a parser. Queries and subqueries are passed to the
42+
// database for processing. Returned items are handled appropriately:
43+
//
44+
// SELECT: return the items to the caller
45+
// UPDATE: modify the items (direct)
46+
// DELETE: call delete() on each Row (direct)
47+
// GRANT/REVOKE: modify ACLs (via Security Service)
48+
// ALTER: modify the items (direct) and/or the relations (via Relationship Service)
49+
// etc.
50+
//
51+
// I'm not sure yet about LOCK and UNLOCK.
52+
// </info>
53+
54+
55+
// Query result interface
56+
//
57+
// Should the iterator support a 'boolean skip(in long n)' extension?
58+
59+
interface QueryResult : CosQueryCollection::Collection {};
60+
interface QueryResultIterator : CosQueryCollection::Iterator {};
61+
62+
63+
// Connected database object
64+
65+
interface Database {
66+
QueryResult exec(in string query);
67+
void disconnect();
68+
};
69+
70+
71+
// Server object (stateless)
72+
73+
interface Server {
74+
Database connect(in string db, in string user, in string password);
75+
};
76+
};
77+
78+
#endif // pgsql_idl

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp