Hi,
A similar question regarding Glorp & PosgresV2: what is the official Pharo standpoint regarding this ? There is no ConfigurationOfGlorpNativePostgreSQL (there are some for DBX, but I don't need that). I used GlorpPharoLoader loadGlorpWithNativePostgreSQLDriver. I had to make some small changes to GlorpDriverPostgreSQL and PostgresV2 to make more tests succeed. The installer did also load the underscore.cs hack adding an ugly star in Monticello to Compiler (Scanner#xLetter). But all in all it does work great and fast. Is this something for the Pharo list or should I go ask my questions somewhere else ? Sven _______________________________________________ Pharo-users mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users |
On Thu, Jun 10, 2010 at 4:20 PM, Sven Van Caekenberghe <[hidden email]> wrote: Hi, I did the port of Glorp to Pharo and the dbx stuff. I don't know the "official standpoint", thus. There is no ConfigurationOfGlorpNativePostgreSQL (there are some for DBX, but I don't need that). No, no time to do it. If you want, you can easily do it. You can take as a base the one I did for squeakDBX. I used GlorpPharoLoader loadGlorpWithNativePostgreSQLDriver. That's what I did before I had Metacello. It is "deprecated" for SquerakDBX as now the way to install it is with Metacello, but for Glorp alone there is no Metacello...so you can use it, or as I said, create yourself a COnfigurationOfGLorp
Can you explain me them? I can commit it when I have time. Or do it yourself. Does your changes also work in Pharo 1.0?
Yes, although it is not needed anymore in Pharo 1.1 as it is fixed :)
:)
Here is ok for this kinf of questions. If it is too Glorp related, maybe Glorp mailing list is better. cheers mariano
_______________________________________________ Pharo-users mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users |
Mariano,
The fact that you did the port is more than official enough for me ;-) First, thanks a lot for the port, I know that this must be a lot of work. I think that Glorp and the different drivers are _very_ important for many people: talking to an RDBMS is an absolute requirement in almost any serious application. Without it, Pharo/Seaside becomes almost unusable in most commercial contexts. Only in some specific cases the other persistency strategies would be applicable. I would very much like to help in making the Glorp+PostgreSQL combination easy to use in Pharo. Writing a ConfigurationOf.. is a bit to much for me right now though. Concerning my changes, I can send them to you, or save modified versions of the packages where you want. BTW, I was working on Pharo 1.0 Should we continue this discussion over the mailing list or privately ? Sven _______________________________________________ Pharo-users mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users |
On Thu, Jun 10, 2010 at 9:07 PM, Sven Van Caekenberghe <[hidden email]> wrote: Mariano, Thanks. This is exactly why we did SqueakDBX ;) and then GlorpDBX.
Great. So, at least, we should make it work, then we see how to load it.
mmmmm I thought Glorp was already working in 1.0. Weird...which are the changes? yes, please send me your changes. We have committed Glorp packages in SqueakDBX repository as we have been changing a lot of things. A big refactor to Glorp in order to support multiple database drivers. You can send me the changes or commit them to the packages that are in SqueakDBX repository at least. I am not sure in Glorp original repository, but at least in SqueakDBX repository for sure: http://www.squeaksource.com/SqueakDBX Please, run all the tests before comitting. Cheers Mariano
_______________________________________________ Pharo-users mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users |
Mariano,
I had to change PGConnection class>>#timestampWithTimezoneConverter otherwise it wouldn't want to parse my timestamp with time zone colums that look like '2010-06-16 00:01:00+02' (no millis to skip, no minutes in the offset). Now, my fix is a bit dirty, because it assumes that what I see on my system is the rule while it probably isn't. timestampWithTimezoneConverter ^[ :s | | direction offset | direction := (s at: 20) = $- ifTrue: [ -1 ] ifFalse: [ 1 ]. offset := Duration hours: (s copyFrom: 21 to: 22) asInteger * direction. DateAndTime year: (s copyFrom: 1 to: 4) asInteger month: (s copyFrom: 6 to: 7) asInteger day: (s copyFrom: 9 to: 10) asInteger hour: (s copyFrom: 12 to: 13) asInteger minute: (s copyFrom: 15 to: 16) asInteger second: (s copyFrom: 18 to: 19) asInteger offset: offset ] I can definitively write a better version that handles different kinds of formats in a flexible way. I also think the #copyFrom:to:'s are waistful and could at least be replaced with ReadStream>>#on:from:to:'s. This goes for some other converters as well. This code is execute for each column so seems resource critical. This change did not come up as a failed unit test, so maybe I should also try to add one ? On my Pharo 1.0 image, all PGConnection tests pass. Of the 844 GlorpTest tests, 2 fail: GlorpRowMapForMementosCollectionTest>>#testRBSmallDictionary and GlorpSelectCommandTest>>#testExecute. GlorpTest-DBTests all succeed. GlorpMainBackendTest fails. I also had to add NativePostgresDriver>>#externalDatabaseErrorSignal externalDatabaseErrorSignal ^Dialect error This also came up during day to day usage and not as a test failure. So, for Glorp itself there were no real problems ;-) Maybe just one feature request: on VW NC 7.7 Glorp (when you enable logging) prints timing info on all queries, on Pharo only for updates and deletes, which is strange. Sven On 11 Jun 2010, at 00:32, Mariano Martinez Peck wrote: > > > On Thu, Jun 10, 2010 at 9:07 PM, Sven Van Caekenberghe <[hidden email]> wrote: > Mariano, > > The fact that you did the port is more than official enough for me ;-) > > First, thanks a lot for the port, I know that this must be a lot of work. > > I think that Glorp and the different drivers are _very_ important for many people: talking to an RDBMS is an absolute requirement in almost any serious application. Without it, Pharo/Seaside becomes almost unusable in most commercial contexts. Only in some specific cases the other persistency strategies would be applicable. > > Thanks. This is exactly why we did SqueakDBX ;) and then GlorpDBX. > > > I would very much like to help in making the Glorp+PostgreSQL combination easy to use in Pharo. Writing a ConfigurationOf.. is a bit to much for me right now though. > > > Great. So, at least, we should make it work, then we see how to load it. > > > > Concerning my changes, I can send them to you, or save modified versions of the packages where you want. BTW, I was working on Pharo 1.0 > > mmmmm I thought Glorp was already working in 1.0. Weird...which are the changes? yes, please send me your changes. We have committed Glorp packages in SqueakDBX repository as we have been changing a lot of things. A big refactor to Glorp in order to support multiple database drivers. > > You can send me the changes or commit them to the packages that are in SqueakDBX repository at least. I am not sure in Glorp original repository, but at least in SqueakDBX repository for sure: http://www.squeaksource.com/SqueakDBX > > Please, run all the tests before comitting. > > Cheers > > Mariano > > > > Should we continue this discussion over the mailing list or privately ? > > Sven > > > > > > > _______________________________________________ > Pharo-users mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users > > _______________________________________________ > Pharo-users mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users _______________________________________________ Pharo-users mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users |
On Fri, Jun 11, 2010 at 10:49 AM, Sven Van Caekenberghe <[hidden email]> wrote: Mariano, The problem with this is what you said: maybe it is not a normal problem, but just for *you*. I don't know. Maybe you should ask in Glorp mailing list ? This change did not come up as a failed unit test, so maybe I should also try to add one ? and yes, if it is a generic problem, it would be great to generate a test and commit both ;) On my Pharo 1.0 image, all PGConnection tests pass. do you know why they fail or how to fix them ? GlorpTest-DBTests all succeed. ok GlorpMainBackendTest fails. No problem with this one, forget it. I also had to add NativePostgresDriver>>#externalDatabaseErrorSignal mmm this should be implemented in the accessor, why you need it in the driver?
great. We should move on Pharo 1.1
wierd...probaly that's since a lot of time.....if you can digg into the problem, let me know. I can add you as developer if you want. Thanks in advance Mariano Sven _______________________________________________ Pharo-users mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users |
Mariano,
I made my own loader and patches packages for loading Glorp+PostgresV2 into Pharo 1.1rc2. Both can be found at http://www.squeaksource.com/ADayAtTheBeach GlorpPostgreSQLPharoLoader-SvenVanCaekenberghe.3.mcz GlorpPostgreSQLPharoPatches-SvenVanCaekenberghe.1.mcz All PostgresV2 tests succeed, as do all GlorpTest-DBTests. The GlorpTest package has the following result: 844 run, 838 passes, 0 expected failures, 4 failures, 2 errors, 0 unexpected passes Failures: GlorpSelectCommandTest>>#testExecute GlorpUnitOfWorkTest>>#testRollbackOneToManyAfterAdd GlorpDateTest>>#testDate GlorpRowMapForMementosCollectionTest>>#testRBSmallDictionary Errors: GlorpManyToManyDBTest>>#testReadNodeAndDeleteChildWithSaveAndContinue GlorpObjectMappedToImaginaryTableTest>>#testReadBackEntireExample My own code runs fine though. I hope you consider my patches, thanks, Sven BTW: the original #timestampWithTimezoneConverter simply could never work: it expects a +/- sign inbetween the timezone's offset's hour and minute fields ! it falls out of the tests because only timestamo without timezones are used. _______________________________________________ Pharo-users mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users |
Free forum by Nabble | Edit this page |