Forum: Nitro SQL anyone?

Posted by Trans (Guest)
on 2007-11-05 03:21
(Received via mailing list)
My pal, Peter, put out a pretty sweet tutorial recently:

  http://www.xaop.com/articles/2007/10/07/metaprogramming

Prepare to shit your SQL pants!

T.
Posted by Arne Brasseur (Guest)
on 2007-11-05 09:08
(Received via mailing list)
Very interesting, and it's from the Belgian Ruby User Group. Didn't even
know there was one!

Are you suggesting Og could use a

result = query do ...
?

(ab)

Trans schreef:
> Nitro-general@rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>   


--
Arne Brasseur
http://www.arnebrasseur.net
http://www.zhongwiki.com
http://www.bankske.org
arne@arnebrasseur.net
Posted by Lars Olsson (Guest)
on 2007-11-05 10:05
(Received via mailing list)
Yes, very interesting. But don't we already have stuff like that in Og?
(the Caboose::EZ module).

/lasso
Posted by Trans (Guest)
on 2007-11-05 17:20
(Received via mailing list)
On Nov 5, 3:38 am, "Lars Olsson" <la...@lassoweb.se> wrote:
> Yes, very interesting. But don't we already have stuff like that in Og?
> (the Caboose::EZ module).

I wouldn't know. I find zero docs for it.

T.
Posted by Kirk Haines (Guest)
on 2007-11-05 17:38
(Received via mailing list)
On 11/4/07, Trans <transfire@gmail.com> wrote:
> My pal, Peter, put out a pretty sweet tutorial recently:
>
>  http://www.xaop.com/articles/2007/10/07/metaprogramming
>
> Prepare to shit your SQL pants!

It's a simplified version of Kansas.  Been doing this for years.


Kirk Haines
Posted by Trans (Guest)
on 2007-11-05 17:47
(Received via mailing list)
On Nov 5, 10:14 am, "Kirk Haines" <wyhai...@gmail.com> wrote:
> On 11/4/07, Trans <transf...@gmail.com> wrote:
>
> > My pal, Peter, put out a pretty sweet tutorial recently:
>
> >  http://www.xaop.com/articles/2007/10/07/metaprogramming
>
> > Prepare to shit your SQL pants!
>
> It's a simplified version of Kansas.  Been doing this for years.

Kansas has a DSL like that?

T.
Posted by Kirk Haines (Guest)
on 2007-11-05 18:05
(Received via mailing list)
On 11/5/07, Trans <transfire@gmail.com> wrote:

> Kansas has a DSL like that?

Yeah.  It's central to why I like Kansas.  And that code _really_
looks like it's just a simplified reimplementation of some Kansas
code.  I like some of the changes to the syntax in his example,
though.


students = ksdbh.select(:Students)

male_students = ksdbh.select(:Students) {|s| s.gender == 'm'}

males_ordered_by_gpa_between_27_and_40 = ksdbh.select(:Students) do |s|
  s.order_by(:gpa)
  (s.gender == 'm') & (s.age.between(27,40))
end


I've had a Kansas rewrite on my todo list for a very long time.  I am
taking a closer look at some of his syntax ideas.  I like a couple of
them.


Kirk Haines
This topic is locked and can not be replied to.