[Seaside] new version of ROE

danil osipchuk danil at tsnet.ru
Thu Apr 8 12:01:02 CEST 2004


Hello Brett and Avi (Avi thanks, your support is great)

> Different databases  support case sensitivity differently.  Sql Server
> allows you to configure the database as case insensitive or case
> sensitive for identifiers upon creation of the database.  If the
> database is configured as case sensitive - then the column "ColOne" and
> "colone" are considered different columns.  I think we'll need to
> address this as we add support for different database platforms.  Note -
> an ODBC Relation could be accessing many different types of databases
> which each have handle the case differently.

Yes, it's true. I made a little attempt to launch ROE via ODBC with 
firebird (opensource fork of interbase) and, heh :), ms access - it 
didn't work "as it is", mainly because of this issues, I guess. As at 
present I'm relying on Postrgres (in fact migrating to from firebird) I 
have no strong motivation to dig deeper, but it's clear that odbc is not 
such universal thing as one may want. In my working code I temporaraly 
quote-protected table names as attributes - sure that this is not 
universal too.


>>I haven't yet adapted any of the support for other databases (Oracle 
>>from the VW port, ODBC from Dolphin).  If you guys want to send me 
>>fileouts of SQLRelation subclasses and supporting SQLPrinters that work 
>>with the new version, I'll be happy to include them in the next 
>>release.

I'll try to make something useful with roe and will not try hard to be 
in sync with your repository. I'll share my expressions and catch up 
later - after some certain round of work. I'm attaching current version 
of Dolphin ODBC-SQLRelation.

 >>If I missed something important, let me know.

Avi. Not very important really, but... I looked in new version - it 
seems that you forgot to add #projectAll: - #addValues: interface - it's 
very nice really (and simple to add)

Danil
-------------- next part --------------
'From Squeak3.6 of ''6 October 2003'' [latest update: #5429] on 8 April 2004 at 1:47:30 pm'!
RASQLRelation subclass: #RADolphinDBRelation
	instanceVariableNames: ''
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Roe-Compat/Dolphin'!

!RADolphinDBRelation methodsFor: 'private' stamp: 'dao 3/30/2004 16:41'!
attributeNames
	^(connection columns: self name) collect: [:ea | ea name]! !

!RADolphinDBRelation methodsFor: 'private' stamp: 'dao 3/30/2004 16:43'!
discoverAttributes
	^(self attributeNames)
 		collect: [ :each | RASimpleAttribute named: each relation: self ]	! !

!RADolphinDBRelation methodsFor: 'private' stamp: 'dao 3/30/2004 17:26'!
exec: aString
	| start |
	self log ifTrue: [Transcript cr; show: aString. start := Time millisecondClockValue].
	connection exec: aString. 
	self log ifTrue: [Transcript show: ' [', (Time millisecondClockValue - start) asString, ']'].
	! !

!RADolphinDBRelation methodsFor: 'private' stamp: 'dao 3/30/2004 17:26'!
query: aString
	| result start |
	self log ifTrue: [Transcript cr; show: aString. start := Time millisecondClockValue].
	result := connection query: aString. 
	self log ifTrue: [Transcript show: ' [', (Time millisecondClockValue - start) asString, ']'].
	^ result isEmpty
		ifTrue: [#()]
		ifFalse: [ result collect: [:row | row contents]]! !


!RADolphinDBRelation methodsFor: 'core' stamp: 'dao 3/30/2004 16:47'!
size
	^(connection query: self sqlCount) first at: 'count'
		! !


More information about the Seaside mailing list