chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Generic RDBMS Interface [Was: Re: Creating Windows G


From: Thomas Chust
Subject: Re: [Chicken-users] Generic RDBMS Interface [Was: Re: Creating Windows GUI App]
Date: Sat, 2 Apr 2011 09:27:17 +0200

2011/4/2 Matt Welland <address@hidden>:
> ----- Original message -----
>> 2011/4/1 Jim Ursetto <address@hidden>:
>>> [...]
>>> Just use an alist.
>>> [...]
>>
>> Maybe less practical to enter on command lines, but probably more
>> schemish, yes :-)
>
> How about a convinence function to convert the URI to an alist for those who
> prefer and for command line ease?
> [...]

This is Scheme, procedures don't have to have static type signature. I
may just allow all of the following three styles at the same time:

  (import (prefix dbi dbi:) uri-generic)

  (dbi:connect '(postgresql [host . "example.com"] [database . "blubb"]
                            [tty . "log"]))
  ;; OR
  (dbi:connect "postgresql://example.com/blubb?tty=log")
  ;; OR
  (dbi:connect (uri-reference "postgresql://example.com/blubb?tty=log"))

Ciao,
Thomas


-- 
When C++ is your hammer, every problem looks like your thumb.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]