Toby Butzon wrote:
On Jan 22, 2008 2:41 PM, Kon Lovett <[EMAIL PROTECTED]> wrote:
You might want to contact [EMAIL PROTECTED], the author. I don't know
if he is active with egg maintenance though.

I'm an active lurker... :)

Any of those options is fine by me -- if a patch comes my way, I'll
make sure it gets included.


Thanks!

The patch is attached.
It add  Ken's mysql-fetch-field-list
and mysql-fetch-alist.

--
BuddyPilots <http://www.buddypilots.com>
*Jean-Philippe Théberge*
*Programmeur Architecte*
Tel: (514) 353-2307



139a140,142
>     mysql-fetch-field-list
>     mysql-fetch-alist
> 
735a738,756
> 
> (define mysql-fetch-field-list
>   (let ([get-field-name
>           (foreign-lambda* c-string ([c-pointer fields] [unsigned-integer idx])
>            "return (((MYSQL_FIELD *)fields)[idx].name);")])
>     (lambda (conn)
>       (and-let* ([res (mysql-connection-result conn)])
>         (let ([fields (foreign-mysql-fetch-fields res)])
>           (let loop ([count (foreign-mysql-num-fields res)] [names '()])
>             (if (zero? count)
>                 names
>                 (let ([nxtcnt (sub1 count)])
>                   (loop nxtcnt (cons (get-field-name fields nxtcnt) names)) ) ) ) ) ) ) ) )
> 
> (define (mysql-fetch-alist conn)
>   (define row (mysql-fetch-row conn))
>   (define fields-list (mysql-fetch-field-list conn))
>   (map (lambda (f) (cons f (row f))) fields-list))
>     

_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to