PackageDescription: StoreForSupra
Store For SupraLast published: June 16, 2004 by 'smichael'
Defines 19 Classes
Extends 26 Classes
This package is the StORE driver for the Supra SQL database.
Beside allowing StORE to use Supra SQL as the repository, the package provides a slightly modified version of the Supra EXDI, and implements circumventions for the limitations and restrictions of Supra SQL.
The modified version of Supra EXDI does not modify/overide any of the released SupraEXDI package. Instead, modifications to the Supra EXDI are achieved by subclassing the Supra EXDI classes.
Circumventions are implemented by catching error codes produced when attempting SQL constructs that are unsupported by Supra SQL and inserting one or more specifically modified SQL requests.
The Supra SQL limitations that are circumvented are :
1. Blob data (i.e. LONGVARCHAR column) is returned as null when accessed through a view.
2. INSERT statement may not be combined with a SELECT on the same table (CSWK7025)
3. UPDATE statement may not update any portion of the primary KEY (CSWK7042)
4. DELETE statement may not have a WHERE ... IN ( ... ) clause with lots of values (CSWK1101, CSWK1103)
5. When blob data (i.e. LONGVARCHAR column) is retrieved from the data base, the maximum length is returned rather than the actual length
6. Supra SQL supports a maximum of 16 named result tables, i.e. opened cursors (CSWK1008)
7. Supra SQL does not have SEQUENCE
This package also fixes a couple of bugs found in both SupraEXDI and StoreBase packages.
Bugs found in StoreBase and fixed using method overrides. (look for the "bug" string in the method source)
1. GarbageCollectSpecEditor>>calculateSelections
This method fails when a package, for any reason, has no blessing
2. Package class>>publishPackage:userData:
The blessing is added to the database outside of the main transaction and is not committed
Bugs found in StoreBase and fixed in subclasses
3. BinaryBlob>>convertData
For ByteArray blobs, the blob data is not always a Smalltalk ByteArray object.
(This may not be really a StoreBase bug though, in which case this should be fixed in StoreForSupra)
Bugs found in SupraEXDI and fixed using method overrides. (look for the "bug" string in the method source)
1. SupraConnection>>commitExternal
2. SupraConnection>>rollbackExternal
Bugs found in SupraEXDI and fixed in subclasses
3. Supra cursors are not properly closed when their answer streams are exhausted, this creates CSWK1008 errors.
For this bug a new instance variable "cursorClosed" has been added to SupraSessionForStore.
This variable is used to ensure any open cursor is closed when exhausted.
The StoreForSupra package also makes sure that all answer streams are read up to their end.
Supra requirements
1. Supra 2.8 or 2.9
2. SQLLONGVARCHAR=Y
Installation instructions
1. Install Supra 2.8 or 2.9
2. Create a Supra database
3. Set Supra environment variable SQLLONGVARCHAR=Y (Use XPARAM under Windows)
4. Start the Supra database
5. From the SUPERDBA user, create the StORE administration user with DBA privileges
Userid BERN is recommended, password is your own choice.
Sample SQL for creating the StORE administration user : create user BERN password BERN DBA not exclusive
6. Load this package
7. Run the following Smalltalk code from a workspace to create the StORE tables into the Supra database
You will be prompted for the Supra database name, the Supra user id and password.
Store.DbRegistry goOffLine installDatabaseTables.
8. Run the following Smalltalk code from a workspace to remove the StORE tables from the Supra database
Store.DbRegistry goOffLine deinstallDatabaseTables.