The ooSQLite Constants

ooSQLite provides a number of constant values that are used to interact with the SQLite database engine. These constants are needed in both the object orientated and classical Rexx interafaces, so they have been documented separately in this chapter. Although the constants are provided through a class object, the syntax for using an ooRexx constant is extremely simple and should present no problem for the ooSQLite programmer that is unfamiliar with classes and objects. The classic Rexx programmer need simply prefix each constant value with: .ooSQLite~.

This rule is absolute for every constant listed in this chapter. If the classic Rexx programmer wants to use the constant CORRUPT in her Rexx code, the prefix .ooSQLite~ is added to CORRUPT like so
dbConn = ''
ret = oosqlOpen('ooFoods.rdbx', 'dbConn')
if ret == .ooSQLite~CORRUPT then do
-- handle error in some fashion
say 'Error return:' .ooSQLite~CORRUPT
say 'The "ooFoods.rdbx" database file has been corrupted.'
/* Output wouled be, if the file was indeed detected to be corrunt:
Error return: 11
The "ooFoods.rdbx" database file has been corrupted.

The ooSQLiteConstants class a mixin class that provides constant values defined using the ::constant directive. Each constant maps to a SQLite constant and all SQLite constants have a corresponding ooSQLite constant.

Each ooSQLite constant is named the same as the SQLite constant, minus the SQLITE_ part of the name. For instance, the SQLite constant, SQLITE_OK is the OK constant in the ooSQLiteConstant class.

All of the ooSQLite objects supplied by ooSQLite inherit the ooSQLiteConstant class.