commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnue/docbook/Proposals/geasarch outline.txt


From: Daniel E. Baumann
Subject: gnue/docbook/Proposals/geasarch outline.txt
Date: Mon, 13 May 2002 01:43:47 -0400

CVSROOT:        /cvsroot/gnue
Module name:    gnue
Changes by:     Daniel E. Baumann <address@hidden>      02/05/13 01:43:47

Modified files:
        docbook/Proposals/geasarch: outline.txt 

Log message:
        Define Python ODMG exception heirarchy.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/docbook/Proposals/geasarch/outline.txt.diff?tr1=1.1&tr2=1.2&r1=text&r2=text

Patches:
Index: gnue/docbook/Proposals/geasarch/outline.txt
diff -c gnue/docbook/Proposals/geasarch/outline.txt:1.1 
gnue/docbook/Proposals/geasarch/outline.txt:1.2
*** gnue/docbook/Proposals/geasarch/outline.txt:1.1     Tue Apr 16 22:29:31 2002
--- gnue/docbook/Proposals/geasarch/outline.txt Mon May 13 01:43:47 2002
***************
*** 265,341 ****
           return try     while
  
        Types
!         - because python does nto require type information for
!         operation declarations, it is not necessary to introduce
!         standardized types names, unlike C or C++ mappings
!         - instead, the mapping of types to dynamic values is specified
!         here
!         - for most of the simple types, it is obvious how values of
!         these types can be created
!         - for the other types, the interface for constructing  values
!         is also defined
!         - the mappings for the basic types are shpwn in table 1-2
! 
!          Table 1-2 Basic Data Type Mappings
!          ---------------------------------------------------------
!          OMG IDL             Python
!          ---------------------------------------------------------
!          octet               Integer (<type 'int'>)
!          short               Integer
!          long                Integer
!          unsigned short      Integer
!          unsigned long       Long integer (<type 'long int'>)
!          long long           Long integer (<type 'long int'>)
!          unsigned long long  Long interger
!          float               Floating Point Number (<type 'float'>)
!          double              Floating Point Number
!          long double         CORBA.long_double
!          boolean             Interger
!          char                string of length 1
!          wchar               Wide string length of 1
! 
!        Enumeration
!          - an enumeration is mapped into a number of constant objects
!          in the name space where the enumeration is defined
!          - an application may only test for equivalence of two
!          enumeration values, and not assume that they behave like
!          numbers
           
!          - For example, the definition:
  
!            module M
!            {
!              enum color {red, green, blue};
   
!                interface O
!                {
!                  enum Farbe {rot, gruen, blau};
!                };
!            };
     
!          introduces the objects
   
!            import M
!            M.red, M.green, M.blue, M.O.rot, M.O.gruen, M.O.blau
  
!        Stuctures
!          - an IDL struct definition is mapped into a Python class or
!          type
!          - for each field int he struct, there is a corresponding
!          attribute in the class with the same name as the field
!          - the constructor of the class expects the field values, from
!          left to right
! 
!          For example, the IDL definition:
! 
!            struct segment {long left_limit, long right_limit};
! 
!          could be used on Python statements
!            s=segment(-3,7)
!            print s.left_limit, s.right_limit
  
        Constants
!         - IDL constant definition maps to Python varibale initialized
          with the value of the constant
  
        Operations
--- 265,458 ----
           return try     while
  
        Types
!         Simple Types
!           - because python does not require type information for
!           operation declarations, it is not necessary to introduce
!           standardized types names, unlike C or C++ mappings
!           - instead, the mapping of types to dynamic values is specified
!           here
!           - for most of the simple types, it is obvious how values of
!           these types can be created
!           - for the other types, the interface for constructing  values
!           is also defined
!           - the mappings for the basic types are shown in table 1-2
! 
!            Table 1-2 Basic Data Type Mappings
!            ---------------------------------------------------------
!            OMG IDL             Python
!            ---------------------------------------------------------
!            octet               Integer (<type 'int'>)
!            short               Integer
!            long                Integer
!            unsigned short      Integer
!            unsigned long       Long integer (<type 'long int'>)
!            long long           Long integer (<type 'long int'>)
!            unsigned long long  Long interger
!            float               Floating Point Number (<type 'float'>)
!            double              Floating Point Number
!            long double         CORBA.long_double
!            boolean             Interger
!            char                string of length 1
!            wchar               Wide string length of 1
!          Compound Types
!            Array
!              - an appropriate Python sequence type supporting the
!              'Array' interface along with the appropriate python
!            sequence methods (e.g., __getitem__)
! 
!            Enumeration
!              - an enumeration is mapped into a number of constant objects
!              in the name space where the enumeration is defined
!              - an application may only test for equivalence of two
!              enumeration values, and not assume that they behave like
!              numbers
           
!              - For example, the definition:
  
!               module M
!               {
!                 enum color {red, green, blue};
   
!                 interface O
!                 {
!                   enum Farbe {rot, gruen, blau};
!                 };
!               };
     
!              introduces the objects:
   
!              import M
!              M.red, M.green, M.blue, M.O.rot, M.O.gruen, M.O.blau
  
!            Structures
!              - an IDL struct definition is mapped into a Python class or
!              type
!              - for each field int he struct, there is a corresponding
!              attribute in the class with the same name as the field
!              - the constructor of the class expects the field values, from
!              left to right
! 
!              For example, the IDL definition:
! 
!                struct segment {long left_limit, long right_limit};
! 
!                could be used on Python statements
! 
!                s=segment(-3,7)
!                print s.left_limit, s.right_limit
! 
!       Exceptions
!         - when error detected, exception is raised using standard Python
!         exception mechanism, which consists of deriving from
!         exceptions.Exception, the following standard exception types are
!         defined, some are raised from specific ODMG interfaces and are
!         thus subclasses of OMDGError, others may be raised in the
!         course of using persistent objects and are thus subclasses of
!         ODMGRuntimeError, and others are related to query processing
!         and are just subclasses of QueryError, which in turn is a
!         subclass of ODMGError:
! 
!       class ODMGError (exceptions.Exception):
! 
!           Base exception class for ODMG specific interfaces
! 
!         class ODMGRuntimeError (exceptions.Exception):
! 
!           Base class for exceptions raised in the course of using
!           peristent object
! 
!         class QueryError (ODMGError):
! 
!           Base class for exceptions rasied during query processing
! 
!         class ClassNotPersistenceCapableError (ODMGRuntimeError):
! 
!           Raised when the implementation cannot make the object
!           persistent because of the type of object
! 
!         class DatabaseClosedError (ODMGRuntimeError):
! 
!           Raised when attempting to call an operation for which a
!           database is not open but is required to be open
! 
!         class DatabaseIsReadOnlyError (ODMGRuntimeError):
! 
!           Raised when attempting to call a method that modifies a
!           database that is open read-only
! 
!         class DatabaseNotFoundError (ODMGError):
! 
!           Raised when attempting to open a database that does not exist
! 
!         class DatabaseOpenError (ODMGError):
! 
!           Raised when attempting to open a database that is already
!           opened
! 
!         class LockNotGrantedError (ODMGRuntimeError):
! 
!           Raised if a lock could not be granted. (Note that time-outs
!           and deadlock detection are implementation defined)
! 
!         class NotImplementedError (ODMGRuntimeError):
! 
!           Raised when an implementation does not implement an operation
!           or when the underlying implementation does not support an
!           operation
! 
!         class ObjectDeletedError (ODMGRuntimeError):
! 
!           Raised when accessing an object that was deleted
! 
!         class ObjectNameNotFoundError (ODMGError):
! 
!           Raised when attempting to get a named object whose name is not
!           found
! 
!         class ObjectNameNotUniqueError (ODMGError):
! 
!           Raised when attempting to bind a name to an object when the
!           name is already bound to an existing object
! 
!         class ObjectNotPersistentError (ODMGRuntimeError):
! 
!           Raised when deleting an object that is not persistent
! 
!         class QueryInvalidError (QueryError):
! 
!           Raised if the query is not a vaild OQL query and thus does not
!           compile
! 
!         class QueryParameterCountInvalidError (QueryError):
! 
!           Raised when the number of bound parameters for a query does
!           not match the number of placeholders
! 
!        class QueryParamterTypeInvalidError (QueryError):
! 
!          Raised when the type of a parameter for a query is not
!          compatible with the expected parameter type
! 
!        class TransactionAbortedError (ODMGRuntimeError):
!  
!          Raised when the database system has asyncronously terminated
!          the user's transaction due to deadlock, resource failure, and
!          so on. In such cases the user's data is reset just as if the
!          user had called Transaction.abort.
! 
!        class TransactionInProgressError (ODMGRuntimeError):
! 
!          Raised when attempting to call a method whithin a transaction
!          that must be called when no transaction is in progress
! 
!        class TransactionNotInProgressError (ODMGRuntimeError):
! 
!          Raised when attempting to perform outside of a transaction an
!          operation that must be called when there is a transaction in
!          progress
  
        Constants
!         - IDL constant definition maps to Python variable initialized
          with the value of the constant
  
        Operations



reply via email to

[Prev in Thread] Current Thread [Next in Thread]