[Seaside] ROE - Public Store
danil osipchuk
danil at tsnet.ru
Wed Mar 31 09:20:44 CEST 2004
Hello, Brent and Avi
> In the latest version on Store, I've added support for the Oracle
> database. This required a bit of refactoring so I've branched on
> versions. I'll submit the changes to Avi to see if he wants integrate
> them into the main stream.
>
> Brett Taylor
I browsed your code in public store, and found your changes pretty
suitable for me, so for me there is no much difference which one Avi
will choose to include (if he wants).
Basically there are next incompatibilities:
1){} brackets in tests (the single obvious solution)
2) symbols and string in tests (all reduced to strings)
3) RASqlPrinter & RASqlSingleTabler #printerOperator: monsters - the
code is fine for squeak, but definitely not portable. My solution is:
(for eliminating double code)
RANode>>sqlOperator
"other ways are: dynamic dictionary construction (as you did) and class
var with dictionary."
(operator = #&) ifTrue: [^' AND '].
(operator = #|) ifTrue: [^' OR '].
(operator = #~=) ifTrue: [^' != '].
(operator = #like) ifTrue: [^' LIKE '].
(operator = #ilike) ifTrue: [^' ILIKE '].
^operator
and redefine:
RASqlPrinter>>printOperator: aNode
stream nextPutAll: aNode sqlOperator
RAPrinter>>printOperator: aNode
stream nextPutAll: aNode operator
RASingleTableSqlPrinter>>printOperator: aNode
stream nextPutAll: aNode sqlOperator
(I'm probably again violating some conventions about what should be
passed to what, but idea is clear)
4) unified resolution of strings and symbols. I forced it in:
String>>resolveAttributeIn: aCollection
^ aCollection
detect: [:ea | ea name asString = self]
ifNone: [self errorCouldNotResolveAttribute]
Symbol>>resolveAttributeIn: aCollection
^ aCollection
detect: [:ea | ea name asSymbol = self]
ifNone: [self errorCouldNotResolveAttribute]
RARelation>>attributeNamed: aString ifAbsent: errorBlock
...snipped...
[:ea |
ea name asString = aString asString ifTrue:
...snipped...
5) Finally, I'm created abstract RARealRelation for databases and pushed
common functionality there. I also splitted #execute: into #exec: (no
result queries) and #query: (queries returning values).
All this now can be filled in dolphin with some compatibility methods
which are basically the same for dolphin and VW
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Roe-dao.40.mcz
Type: application/octet-stream
Size: 17339 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/seaside/attachments/20040331/c743e089/Roe-dao.40-0001.obj
More information about the Seaside
mailing list