Updated IDL with considerations for COSS - Mailing list pgsql-interfaces

From Taral
Subject Updated IDL with considerations for COSS
Date
Msg-id 001001be1111$e1d06600$8a14f7d0@taral.dobiecenter.com
Whole thread Raw
List pgsql-interfaces
Took a look at COSS and modified this to be upgradable...

Taral

P.S. Back to one file... MICO doesn't care about any support/no any support
:) We can always use #ifdef/#ifndef

--- cut here ---

module PostgreSQL {
    // Standard types
    typedef short int2type;
    typedef long int4type;
    struct int8type {
        long lsw;
        long msw;
    };

    // Direct row interface
    //
    // *** This interface is critical!
    // *** It will be used in the final COSS Query Service compliant
implementation.
    //
    // Allows read-write access to a row without issuing a slow UPDATE
    // Will throw an object-does-not-exist (??) exception if the row gets
deleted
    interface Row {
        typedef sequence<Cell> type;
        attribute type data; // set operation not yet implemented

        void delete();
    };

    // <info>
    // More about the application of COSS:
    //
    // A Table will be a QueryableCollection of Rows
    // A Database will be a QueryableCollection of Tables
    // Both will be queryable via the Query Service
    //
    // 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>

    // Query result interface
    interface QueryResult {
        typedef sequence<Row> type;
        typedef sequence<string> headerType;

        readonly attribute headerType header;
        readonly attribute type data;

        Row fetch(in long rownum); // not yet implemented
        // zero based numbering of rows
    };

    // Connected database object
    interface Database {
        QueryResult exec(in string query);
        void disconnect();
    };

    // Server object (stateless)
    interface Server {
        Database connect(in string db, in string user, in string password);
    };
};


pgsql-interfaces by date:

Previous
From: "Taral"
Date:
Subject: RE: MICO
Next
From: Aleksey Demakov
Date:
Subject: Re: [INTERFACES] ORB API