[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

postgres gem & hashes

jef peeraer

2/26/2007 9:01:00 AM

hi,

i am a real postgresql addict so i installed postgres gem ( which is
version 0.7.1, i think). Everything works like a charm, but there is
some basic functionality i miss : i want to return tupples in a hash
instead of an array. As an former PHP user, this was a basic thing to
do. I googled a bit, and found some posts about a new version ( 0.8 ),
which could handle these hashes. But the actual gem is 0.7.1 .
What can i do ?


jef peeraer
7 Answers

Bertram Scharpf

3/5/2007 3:25:00 AM

0

Hi,

Am Montag, 26. Feb 2007, 18:05:38 +0900 schrieb jef peeraer:
> i am a real postgresql addict so i installed postgres gem ( which is
> version 0.7.1, i think). Everything works like a charm, but there is
> some basic functionality i miss : i want to return tupples in a hash
> instead of an array. As an former PHP user, this was a basic thing to
> do. I googled a bit, and found some posts about a new version ( 0.8 ),
> which could handle these hashes. But the actual gem is 0.7.1 .
> What can i do ?

Write your own patch. I really mean it; it's not so
difficult.

I don't actually understand what the feature is you are
missing. Could you describe it more precisely? Maybe one of
my patches is appropriate.

Bertram


--
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-...

Ara.T.Howard

3/5/2007 5:10:00 AM

0

Jeff Davis

3/5/2007 8:50:00 PM

0

On Mon, 2007-03-05 at 12:25 +0900, Bertram Scharpf wrote:
> Hi,
>
> Am Montag, 26. Feb 2007, 18:05:38 +0900 schrieb jef peeraer:
> > i am a real postgresql addict so i installed postgres gem ( which is
> > version 0.7.1, i think). Everything works like a charm, but there is
> > some basic functionality i miss : i want to return tupples in a hash
> > instead of an array. As an former PHP user, this was a basic thing to
> > do. I googled a bit, and found some posts about a new version ( 0.8 ),
> > which could handle these hashes. But the actual gem is 0.7.1 .
> > What can i do ?
>
> Write your own patch. I really mean it; it's not so
> difficult.

It's not difficult to write the patch, I have patches of my own that I
would like accepted, but the maintainer is not being responsive.

Regards,
Jeff Davis


Bertram Scharpf

3/6/2007 1:03:00 AM

0

Hi Jeff,

Am Dienstag, 06. Mär 2007, 05:49:30 +0900 schrieb Jeff Davis:
> On Mon, 2007-03-05 at 12:25 +0900, Bertram Scharpf wrote:
> > Am Montag, 26. Feb 2007, 18:05:38 +0900 schrieb jef peeraer:
> > > i am a real postgresql addict so i installed postgres gem ( which is
> > > version 0.7.1, i think). Everything works like a charm, but there is
> > > some basic functionality i miss : i want to return tupples in a hash
> > > instead of an array. As an former PHP user, this was a basic thing to
> > > do. I googled a bit, and found some posts about a new version ( 0.8 ),
> > > which could handle these hashes. But the actual gem is 0.7.1 .
> > > What can i do ?
> >
> > Write your own patch. I really mean it; it's not so
> > difficult.
>
> It's not difficult to write the patch, I have patches of my own that I
> would like accepted, but the maintainer is not being responsive.

(Concerning the OP's request there is some code in `plruby'
that easiliy could be transposed.)

Dave Lee wrote me that my patch proposals sound reasonable.
One and a half years later I see they were meant well but
they were implemented poorly, then. The least I would have
expected is a request for an improvement. Now I ask myself
how to go forth.

Dave, if you read this, who decides when what patches to
include? If he doesn't, what about to fork the project?

Bertram


--
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-...

Jeff Davis

3/6/2007 6:39:00 PM

0

Bertram,

On Tue, 2007-03-06 at 10:02 +0900, Bertram Scharpf wrote:
> (Concerning the OP's request there is some code in `plruby'
> that easiliy could be transposed.)

For some reason I don't see the reference to "plruby". But I think it's
a good idea to look there for code, and to share code between projects
(if the licenses permit it).

> Dave Lee wrote me that my patch proposals sound reasonable.
> One and a half years later I see they were meant well but
> they were implemented poorly, then. The least I would have
> expected is a request for an improvement. Now I ask myself
> how to go forth.
>

Are you saying you submitted patches or suggestions for improvement to
Dave Lee over a year ago?

> Dave, if you read this, who decides when what patches to
> include? If he doesn't, what about to fork the project?
>

It looks like a fork is the most likely outcome.

Regards,
Jeff Davis



Sharon Rosner

3/6/2007 9:05:00 PM

0

Hey Jef

You night want to take a look at Sequel - a new ORM library I released
a few days ago. It supports postgresql and does what you want (i.e.
fetching records as hashes). The docs are here:

http://sequel.rub...

It's alpha quality but it works pretty good for me. Let me know if you
need help getting started.

Sharon

On Feb 26, 11:05 am, jef peeraer <jef.peeraer@somewhere> wrote:
> hi,
>
> i am a real postgresql addict so i installed postgres gem ( which is
> version 0.7.1, i think). Everything works like a charm, but there is
> some basic functionality i miss : i want to return tupples in a hash
> instead of an array. As an former PHP user, this was a basic thing to
> do. I googled a bit, and found some posts about a new version ( 0.8 ),
> which could handle these hashes. But the actual gem is 0.7.1 .
> What can i do ?
>
> jef peeraer


Bertram Scharpf

3/6/2007 10:01:00 PM

0

Hi Jeff,

Am Mittwoch, 07. Mär 2007, 03:38:55 +0900 schrieb Jeff Davis:
> Are you saying you submitted patches or suggestions for improvement to
> Dave Lee over a year ago?

Dave's answer is from March 1st, 2006.

> > Dave, if you read this, who decides when what patches to
> > include? If he doesn't, what about to fork the project?
> >
>
> It looks like a fork is the most likely outcome.

If you like, you may have a look at my versions. I made them
temporarily available at

<http://opensource.bertram-scharpf.de/distfiles/ruby-postgres-0.7.1p....
<http://opensource.bertram-scharpf.de/distfiles/ruby-postgres-0.7.1q....

There is a Gentoo overlay at

<http://opensource.bertram-scharpf.de/layman/bscharpf-overla...

Change log and documentation are not up-to-date.

I'm in suspense for your version.

Bertram


--
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-...