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
056ba128
Commit
056ba128
authored
26 years ago
by
Marc G. Fournier
Browse files
Options
Downloads
Patches
Plain Diff
Updating and addign files...
parent
fd0366e1
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/corba/pgsql.idl
+96
-79
96 additions, 79 deletions
src/corba/pgsql.idl
src/corba/pgsql_int.idl
+7
-0
7 additions, 0 deletions
src/corba/pgsql_int.idl
src/corba/server.cc
+59
-0
59 additions, 0 deletions
src/corba/server.cc
with
162 additions
and
79 deletions
src/corba/pgsql.idl
+
96
−
79
View file @
056ba128
#
ifndef
pgsql_idl
#
ifndef
pgsql_idl
#
define
pgsql_idl
#
define
pgsql_idl
#
ifndef
CosQuery_idl
#
ifndef
CosQuery_idl
#
include
"CosQuery.idl"
#
include
"CosQuery.idl"
#
endif
#
endif
#
ifndef
CosQueryCollection_idl
#
ifndef
CosQueryCollection_idl
#
include
"CosQueryCollection.idl"
#
include
"CosQueryCollection.idl"
#
endif
#
endif
module
PostgreSQL
{
#
pragma
prefix
""
//
Built
-
in
types
module
PostgreSQL
{
module
Types
{
//
Built
-
in
types
//
Arrays
in
network
order
typedef
short
int2
;
module
Types
{
typedef
long
int4
;
//
Arrays
in
network
order
typedef
long
int8
[
2
]
;
typedef
short
int2
;
}
;
typedef
long
int4
;
typedef
long
int8
[
2
]
;
}
;
//
NULL
support
typedef
boolean
Null
;
//
NULL
support
union
Value
switch
(
Null
)
{
typedef
boolean
Null
;
case
false
:
any
value
;
}
;
union
Value
switch
(
Null
)
{
case
FALSE
:
any
value
;
}
;
//
Row
definition
typedef
sequence
<
Value
>
Row
;
//
Row
definition
//
<
info
>
typedef
sequence
<
Value
>
Row
;
//
More
about
the
application
of
COSS
:
//
//
<
info
>
//
A
Table
will
be
a
QueryableCollection
of
Rows
//
More
about
the
application
of
COSS
:
//
A
Database
will
be
a
QueryableCollection
of
Tables
//
//
(
Currently
Tables
are
not
exported
.
..
maybe
later
.
)
//
A
Table
will
be
a
QueryableCollection
of
Rows
//
Both
will
be
queryable
via
the
Query
Service
//
A
Database
will
be
a
QueryableCollection
of
Tables
//
//
(
Currently
Tables
are
not
exported
.
..
maybe
later
.
)
//
Other
relations
will
be
representable
using
the
Relationship
Service
//
Both
will
be
queryable
via
the
Query
Service
//
This
includes
primary
/
foreign
keys
and
anything
else
:)
//
//
//
Other
relations
will
be
representable
using
the
Relationship
Service
//
GRANT
/
REVOKE
can
be
supplied
via
the
Security
Service
//
This
includes
primary
/
foreign
keys
and
anything
else
:)
//
//
//
See
a
pattern
here
?
The
whole
of
SQL
can
be
implemented
by
these
services
!
//
GRANT
/
REVOKE
can
be
supplied
via
the
Security
Service
//
The
statements
go
through
a
parser
.
Queries
and
subqueries
are
passed
to
the
//
//
database
for
processing
.
Returned
items
are
handled
appropriately
:
//
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
//
SELECT
:
return
the
items
to
the
caller
//
database
for
processing
.
Returned
items
are
handled
appropriately
:
//
UPDATE
:
modify
the
items
(
direct
)
//
//
DELETE
:
call
delete
()
on
each
Row
(
direct
)
//
SELECT
:
return
the
items
to
the
caller
//
GRANT
/
REVOKE
:
modify
ACLs
(
via
Security
Service
)
//
UPDATE
:
modify
the
items
(
direct
)
//
ALTER
:
modify
the
items
(
direct
)
and
/
or
the
relations
(
via
Relationship
Service
)
//
DELETE
:
call
delete
()
on
each
Row
(
direct
)
//
etc
.
//
GRANT
/
REVOKE
:
modify
ACLs
(
via
Security
Service
)
//
//
ALTER
:
modify
the
items
(
direct
)
and
/
or
the
relations
(
via
Relationship
Service
)
//
I
'm not sure yet about LOCK and UNLOCK.
//
etc
.
// </info>
//
//
I
'm not sure yet about LOCK and UNLOCK.
// </info>
// Connected database object
// Expirable object
interface Database : CosQuery::QueryableCollection {
void disconnect();
interface Expirable {
};
/* oneway? */ void keepalive();
void remove();
};
// Server object (stateless)
interface Server {
// Upcall object
Database connect(in string db, in string user, in string password);
};
interface Upcall {
};
void notice(in string message);
void abort();
#endif // pgsql_idl
};
// 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);
};
};
#endif // pgsql_idl
This diff is collapsed.
Click to expand it.
src/corba/pgsql_int.idl
0 → 100644
+
7
−
0
View file @
056ba128
//
Internal
interfaces
#
include
"pgsql.idl"
module
PostgreSQL
{
interface
QueryResult
:
CosQueryCollection
::
Collection
,
Expirable
{}
;
}
;
This diff is collapsed.
Click to expand it.
src/corba/server.cc
0 → 100644
+
59
−
0
View file @
056ba128
#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