5. Embedded SQL for Ada : Ada Variables and Data Types : Embedded SQL/Ada Declarations : Integer Data Types
 
Share this page                  
Integer Data Types
All integer types and their derivatives are accepted by the preprocessor. Even though some integer types have Ada constraints, such as the types natural and positive, Embedded SQL does not check these constraints, either during preprocessing or at runtime. An integer constant is treated as an Embedded SQL constant value and cannot be the target of an Ingres assignment.
The type boolean is handled as a special type of integer. In Ada, the boolean type is defined as an enumerated type with enumerated literals false and true. Embedded SQL treats the boolean type as an enumerated type and generates the correct code in order to use this type to interact with an Ingres integer. Enumerated types are described in more detail later.