Received: from id.godlike.com (id.godlike.com [206.205.199.129]) by hub.org (8.9.1/8.9.1) with ESMTP id WAA14591 for ; Sun, 15 Nov 1998 22:33:33 -0500 (EST) (envelope-from taral@cyberjunkie.com) Received: from taral ([208.247.20.138]) by id.godlike.com (8.8.5/8.8.5) with SMTP id WAA27113 for ; Sun, 15 Nov 1998 22:33:32 -0500 (EST) From: "Taral" To: Subject: Updated IDL with considerations for COSS Date: Sun, 15 Nov 1998 21:33:31 -0600 Message-ID: <001001be1111$e1d06600$8a14f7d0@taral.dobiecenter.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0 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 type; attribute type data; // set operation not yet implemented void delete(); }; // // 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. // // // Query result interface interface QueryResult { typedef sequence type; typedef sequence 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); }; };