Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
20efb264
Commit
20efb264
authored
24 years ago
by
Thomas G. Lockhart
Browse files
Options
Downloads
Patches
Plain Diff
Convert files from DOS format to normal text.
parent
48781d44
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/corba/CosQuery.idl
+89
-89
89 additions, 89 deletions
src/corba/CosQuery.idl
src/corba/CosQueryCollection.idl
+83
-83
83 additions, 83 deletions
src/corba/CosQueryCollection.idl
src/corba/pgsql.idl
+27
-27
27 additions, 27 deletions
src/corba/pgsql.idl
src/corba/server.cc
+59
-59
59 additions, 59 deletions
src/corba/server.cc
with
258 additions
and
258 deletions
src/corba/CosQuery.idl
+
89
−
89
View file @
20efb264
/*
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
/*
RCS
$
Id
:
CosQuery
.
idl
,
v
1.
2
2000
/
12
/
03
14
:
43
:
59
thomas
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
This diff is collapsed.
Click to expand it.
src/corba/CosQueryCollection.idl
+
83
−
83
View file @
20efb264
/*
RCS
$
Id
:
CosQueryCollection
.
idl
,
v
1.
1
1998
/
11
/
16
18
:
03
:
34
scrappy
Exp
$
*
*
----------------------------------------------------------------------------
*
This
is
unmarked
software
provided
by
the
Object
Management
Group
,
Inc
.
(
OMG
)
*
----------------------------------------------------------------------------
*/
/**
*
CosQueryCollection
is
the
Common
Object
Services
Specification
query
*
query
colleciton
module
as
it
it
appears
in
COSS1
,
v1
.
0.
*/
#
ifndef
CosQueryCollection_idl
#
define
CosQueryCollection_idl
module
CosQueryCollection
{
exception
ElementInvalid
{}
;
exception
IteratorInvalid
{}
;
exception
PositionInvalid
{}
;
typedef
string
Istring
;
struct
NVPair
{
Istring
name
;
any
value
;
}
;
typedef
sequence
<
NVPair
>
ParameterList
;
interface
Collection
;
interface
Iterator
;
interface
CollectionFactory
{
Collection
create
(
in
ParameterList
params
)
;
}
;
interface
Collection
{
readonly
attribute
long
cardinality
;
void
add_element
(
in
any
element
)
raises
(
ElementInvalid
)
;
void
add_all_elements
(
in
Collection
elements
)
raises
(
ElementInvalid
)
;
void
insert_element_at
(
in
any
element
,
in
Iterator
where
)
raises
(
IteratorInvalid
,
ElementInvalid
)
;
void
replace_element_at
(
in
any
element
,
in
Iterator
where
)
raises
(
IteratorInvalid
,
PositionInvalid
,
ElementInvalid
)
;
void
remove_element_at
(
in
Iterator
where
)
raises
(
IteratorInvalid
,
PositionInvalid
)
;
void
remove_all_elements
()
;
any
retrieve_element_at
(
in
Iterator
where
)
raises
(
IteratorInvalid
,
PositionInvalid
)
;
Iterator
create_iterator
()
;
}
;
interface
Iterator
{
any
next
()
raises
(
IteratorInvalid
,
PositionInvalid
)
;
void
reset
()
;
boolean
more
()
;
}
;
}
;
#
endif
//
CosQueryCollection_idl
/*
RCS
$
Id
:
CosQueryCollection
.
idl
,
v
1.
2
2000
/
12
/
03
14
:
43
:
59
thomas
Exp
$
*
*
----------------------------------------------------------------------------
*
This
is
unmarked
software
provided
by
the
Object
Management
Group
,
Inc
.
(
OMG
)
*
----------------------------------------------------------------------------
*/
/**
*
CosQueryCollection
is
the
Common
Object
Services
Specification
query
*
query
colleciton
module
as
it
it
appears
in
COSS1
,
v1
.
0.
*/
#
ifndef
CosQueryCollection_idl
#
define
CosQueryCollection_idl
module
CosQueryCollection
{
exception
ElementInvalid
{}
;
exception
IteratorInvalid
{}
;
exception
PositionInvalid
{}
;
typedef
string
Istring
;
struct
NVPair
{
Istring
name
;
any
value
;
}
;
typedef
sequence
<
NVPair
>
ParameterList
;
interface
Collection
;
interface
Iterator
;
interface
CollectionFactory
{
Collection
create
(
in
ParameterList
params
)
;
}
;
interface
Collection
{
readonly
attribute
long
cardinality
;
void
add_element
(
in
any
element
)
raises
(
ElementInvalid
)
;
void
add_all_elements
(
in
Collection
elements
)
raises
(
ElementInvalid
)
;
void
insert_element_at
(
in
any
element
,
in
Iterator
where
)
raises
(
IteratorInvalid
,
ElementInvalid
)
;
void
replace_element_at
(
in
any
element
,
in
Iterator
where
)
raises
(
IteratorInvalid
,
PositionInvalid
,
ElementInvalid
)
;
void
remove_element_at
(
in
Iterator
where
)
raises
(
IteratorInvalid
,
PositionInvalid
)
;
void
remove_all_elements
()
;
any
retrieve_element_at
(
in
Iterator
where
)
raises
(
IteratorInvalid
,
PositionInvalid
)
;
Iterator
create_iterator
()
;
}
;
interface
Iterator
{
any
next
()
raises
(
IteratorInvalid
,
PositionInvalid
)
;
void
reset
()
;
boolean
more
()
;
}
;
}
;
#
endif
//
CosQueryCollection_idl
This diff is collapsed.
Click to expand it.
src/corba/pgsql.idl
+
27
−
27
View file @
20efb264
...
...
@@ -12,82 +12,82 @@
#
pragma
prefix
""
module
PostgreSQL
{
//
Built
-
in
types
module
Types
{
//
Arrays
in
network
order
typedef
short
int2
;
typedef
long
int4
;
typedef
long
int8
[
2
]
;
}
;
//
NULL
support
typedef
boolean
Null
;
union
Value
switch
(
Null
)
{
case
FALSE
:
any
value
;
}
;
//
Row
definition
typedef
sequence
<
Value
>
Row
;
//
<
info
>
//
More
about
the
application
of
COSS
:
//
//
//
A
Table
will
be
a
QueryableCollection
of
Rows
//
A
Database
will
be
a
QueryableCollection
of
Tables
//
(
Currently
Tables
are
not
exported
.
..
maybe
later
.
)
//
Both
will
be
queryable
via
the
Query
Service
//
//
//
Other
relations
will
be
representable
using
the
Relationship
Service
//
This
includes
primary
/
foreign
keys
and
anything
else
:)
//
//
//
GRANT
/
REVOKE
can
be
supplied
via
the
Security
Service
//
//
//
See
a
pattern
here
?
The
whole
of
SQL
can
be
implemented
by
these
services
!
//
The
statements
go
through
a
parser
.
Queries
and
subqueries
are
passed
to
the
//
database
for
processing
.
Returned
items
are
handled
appropriately
:
//
//
//
SELECT
:
return
the
items
to
the
caller
//
UPDATE
:
modify
the
items
(
direct
)
//
DELETE
:
call
delete
()
on
each
Row
(
direct
)
//
GRANT
/
REVOKE
:
modify
ACLs
(
via
Security
Service
)
//
ALTER
:
modify
the
items
(
direct
)
and
/
or
the
relations
(
via
Relationship
Service
)
//
etc
.
//
//
//
I
'm not sure yet about LOCK and UNLOCK.
// </info>
// Expirable object
interface Expirable {
/* oneway? */ void keepalive();
void remove();
};
// Upcall object
interface Upcall {
void notice(in string message);
void abort();
};
// Connected database object
interface Database : CosQuery::QueryableCollection, Expirable {
void setupcall(in Upcall obj);
};
// Server object (stateless)
interface Server {
Database connect(in string db, in string user, in string password);
};
...
...
This diff is collapsed.
Click to expand it.
src/corba/server.cc
+
59
−
59
View file @
20efb264
#include
<iostream>
#include
"pgsql_int.h"
bool
terminate
=
false
;
int
main
(
int
argc
,
char
*
argv
)
{
CORBA
::
ORB_var
orb
=
CORBA
::
ORB_init
(
argc
,
argv
,
""
);
PortableManager
::
POA_var
poa
=
PortableServer
::
POA
::
_narrow
(
orb
->
resolve_initial_references
(
"RootPOA"
));
PortableManager
::
POAManager_var
mgr
=
poa
->
the_POAManager
();
Server_impl
*
server
=
new
Server_impl
;
poa
->
activate_object
(
server
);
CosNaming
::
NamingContext_var
ctx
=
CosNaming
::
NamingContext
::
_narrow
(
orb
->
resolve_initial_references
(
"NamingService"
));
CosNaming
::
Name_var
n
=
new
CosNaming
::
Name
(
1
);
n
[
0
].
id
(
"PostgreSQL"
);
n
[
0
].
name
(
"service"
);
bool
bindok
=
false
;
if
(
!
CORBA
::
Object
::
is_nil
(
ctx
))
{
try
{
CosNaming
::
NamingContext_var
myctx
=
ctx
->
bind_new_context
(
n
);
CosNaming
::
Name_var
n2
=
new
CosNaming
::
Name
(
1
);
n2
[
0
].
id
(
"Server"
);
n2
[
0
].
name
(
"Server"
);
myctx
->
bind
(
n2
,
server
->
_this
());
bindok
=
true
;
}
catch
(
CORBA
::
Exception
&
e
)
{
cerr
<<
"Warning: Naming Service bind failed"
<<
endl
;
bindok
=
false
;
}
}
else
{
cerr
<<
"Warning: Naming Service not found"
<<
endl
;
}
mgr
->
activate
();
while
(
!
terminate
)
{
if
(
orb
->
work_pending
())
orb
->
perform_work
();
if
(
expiry_needed
())
expire_now
();
}
if
(
!
CORBA
::
Object
::
is_nil
(
ctx
)
&&
bindok
)
{
try
{
CosNaming
::
NamingContext
myctx
=
ctx
->
resolve
(
n
);
ctx
->
unbind
(
n
);
myctx
->
destroy
();
}
catch
(
CORBA
::
Exception
&
e
)
{
cerr
<<
"Warning: Naming Service unbind failed"
<<
endl
;
}
}
orb
->
shutdown
(
true
);
delete
server
;
return
0
;
}
#include
<iostream>
#include
"pgsql_int.h"
bool
terminate
=
false
;
int
main
(
int
argc
,
char
*
argv
)
{
CORBA
::
ORB_var
orb
=
CORBA
::
ORB_init
(
argc
,
argv
,
""
);
PortableManager
::
POA_var
poa
=
PortableServer
::
POA
::
_narrow
(
orb
->
resolve_initial_references
(
"RootPOA"
));
PortableManager
::
POAManager_var
mgr
=
poa
->
the_POAManager
();
Server_impl
*
server
=
new
Server_impl
;
poa
->
activate_object
(
server
);
CosNaming
::
NamingContext_var
ctx
=
CosNaming
::
NamingContext
::
_narrow
(
orb
->
resolve_initial_references
(
"NamingService"
));
CosNaming
::
Name_var
n
=
new
CosNaming
::
Name
(
1
);
n
[
0
].
id
(
"PostgreSQL"
);
n
[
0
].
name
(
"service"
);
bool
bindok
=
false
;
if
(
!
CORBA
::
Object
::
is_nil
(
ctx
))
{
try
{
CosNaming
::
NamingContext_var
myctx
=
ctx
->
bind_new_context
(
n
);
CosNaming
::
Name_var
n2
=
new
CosNaming
::
Name
(
1
);
n2
[
0
].
id
(
"Server"
);
n2
[
0
].
name
(
"Server"
);
myctx
->
bind
(
n2
,
server
->
_this
());
bindok
=
true
;
}
catch
(
CORBA
::
Exception
&
e
)
{
cerr
<<
"Warning: Naming Service bind failed"
<<
endl
;
bindok
=
false
;
}
}
else
{
cerr
<<
"Warning: Naming Service not found"
<<
endl
;
}
mgr
->
activate
();
while
(
!
terminate
)
{
if
(
orb
->
work_pending
())
orb
->
perform_work
();
if
(
expiry_needed
())
expire_now
();
}
if
(
!
CORBA
::
Object
::
is_nil
(
ctx
)
&&
bindok
)
{
try
{
CosNaming
::
NamingContext
myctx
=
ctx
->
resolve
(
n
);
ctx
->
unbind
(
n
);
myctx
->
destroy
();
}
catch
(
CORBA
::
Exception
&
e
)
{
cerr
<<
"Warning: Naming Service unbind failed"
<<
endl
;
}
}
orb
->
shutdown
(
true
);
delete
server
;
return
0
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment