[Seaside] ROE - Public Store

Travis Griggs tgriggs at key.net
Wed Mar 31 19:18:34 CEST 2004


Brett Taylor wrote:
> Danil & Avi,
> I think it would be great to get rid of the Squeak specific code in the
> base as you have done.  Did you implement support for other databases?
> In order to support Oracle, I factored out an Abstract class like your
> RARealRelation. I called it RADatabaseRelation. This allows the
> resolution of some problems - but I also found there were issues I
> couldn't resolve in this manner.
> 1) Different SQL Syntax:
>         * Aliasing column names and table names is different between 
> Oracle &
> Postgres
>         * No support for the LIMIT operator in Oracle
>         * Postgres EXCEPT operator is MINUS in Oracle
> 2) Attribute to Colummn name mapping fails in Oracle
>  Oracle uses cases insensitive names by default.  This causes
> #resolveAttributeIn: aCollection to fail and
> RARelation>>attributeNamed:ifAbsent: to fail.  
> 
> I resolved these problems by adding a couple of classes.  First of all -
> I created a class called the SqlDialect with subclasses OracleDialect &
> PostgresDialect.  These classes handle dialect specific name resolution
> (through double dispatching) and determining which Printer class to use
> for generating SQL code.  I also created a new SQL printer class
> RAOracleSqlPrinter which handles the differences in SQL code between the
> dialects. 
> 
> There are other capabilities that are Database Driver specific such as
> the ability to use bind variables and bind arrays.   Support for these
> can probably also be divided between the Relation, Dialect, and Printer.
> What do you think?

This is cool Brett. Thanks. I may load this if I have playtime Friday 
and play with it. I wonder if its possible to do some sort of transform 
where we strip the RA prefixes and put the code in a first class VW 
namespace.

-- 
Travis Griggs
Objologist
Key Technology
Achille's Heel?!?! What about "Goliath's Forehead"

-----------------------------------------
This email message is intended only for the addressee(s) and contains information that may be confidential to and/or copyrighted by Key Technology.  If you are not the intended recipient, please notify the sender by reply email and immediately delete this email.  Use, disclosure or reproduction of this email by anyone other than the intended recipient(s) is strictly prohibited.  Any views expressed in the email are those of the individual sender unless the sender expressly states them to be the views of Key Technology.  No representation is made that this email or any attachments are free of viruses.  Virus scanning is recommended and is the responsibility of the recipient.



More information about the Seaside mailing list