[Solar-talk] RE: Oracle Adaptor for Solar

Kilbride, James P. James.Kilbride at gd-ais.com
Fri May 9 07:34:44 CDT 2008


Already found a problem.

Looks like the Related class out of Solar does the same AS'ing as the
base classes do. I need to work out how to do the replacements in there
as well. Later all. If anybody is aware of anywhere else that occurs as
well let me know..

James Kilbride

> _____________________________________________ 
> From: 	Kilbride, James P.  
> Sent:	Friday, May 09, 2008 8:18 AM
> To:	'solar-talk at lists.solarphp.com'
> Subject:	Oracle Adaptor for Solar
> 
> Folks,
> 
> I'm attached(assuming the list will let me) copies of an oracle
> adapter I've been working on for Solar, and which is nearly complete,
> along with updates to Solar_Sql_Adapter and Solar_Sql_Model which
> allows the Oracle to work. The key change is to generically call an
> _as function which does the name replacement in the sql statements,
> rather than letting it assume that you use TableName AS ReferenceName.
> Oracle doesn't recognize AS. Default behavior is the AS, but I've
> overloaded it in the oracle adaptor. It's pretty happy so far with
> that. There are some potential issues:
> 
> 1) Sequence Names are called: "ColumnName_SEQ". If you have more than
> one column that has the same name and is also autoincrement we are
> going to stomp all over ourselves. The reason I didn't simply do
> TableName_ColumnName_Seq is that you have a 30 character limit which
> gets blown away pretty quickly if I use both. On possible solution is
> to use a Hash instead of actual meaningful names. I'm not terribly
> fond of that though.
> 
> 2) Automatic table rename in queries. When using a model the select
> queries automatically do a name replacement of ClassName for table
> names. Oracle again has a 30 character limit on those replacements.
> Most model names could easily exceed 30 characters. Not sure what the
> solution is here since I prefer not to force people to use fully
> qualified model names of less than 30 characters. So maybe a hash is
> needed here as well. Suggestions? Folks who might have played more
> deeply in the model code might be able to tell me more about how model
> is using that name replacement and how we could work around it.
> 
> I'm also interested in any general comments people have since I'd like
> to see about getting this embedded into Solar as a whole if possible
> and while I'm still doing testing to verify it I'm sure others could
> find other problems that I haven't identified.
> 
> James Kilbride
>  << File: Adapter.php >>  << File: Model.php >>  << File: Oracle.php
> >> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman-mail3.webfaction.com/pipermail/solar-talk/attachments/20080509/c09679d0/attachment.html


More information about the Solar-talk mailing list