[Seaside] ROE - Public Store

danil osipchuk danil at tsnet.ru
Thu Apr 1 07:20:40 CEST 2004


Brett, Dolphin talks to db via ODBC, so I adapted ROE to it's db 
connectivity code and checked it with PostrgesSQL (I want to try 
firebird, but didn't yet). As roe is now exposed to much more skillful 
audience I'll be a spectator further (and I'm sure that all will be 
allright:))
P.S. My apologies for misspelling your name in previuos message (and for 
  my poor English in general :)
> 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?
> 
> Brett Taylor
> On Tue, 2004-03-30 at 23:20, danil osipchuk wrote:


More information about the Seaside mailing list