[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: guile-dbi from guix not working
From: |
Luis Felipe |
Subject: |
Re: guile-dbi from guix not working |
Date: |
Sat, 07 May 2022 18:44:09 +0000 |
Hi Zelphir,
On Saturday, May 7th, 2022 at 11:26 AM, Zelphir Kaltstahl
<zelphirkaltstahl@posteo.de> wrote:
> Is it really broken, or am I doing something wrong?
For what it's worth, it fails in the same way for me too. Trying to open a
connection results in a handle with "file not found" status.
If you just need to work with SQLite databases, I tried guile-sqlite3 and it
worked (connecting, inserting records, etc). It is not documented, but the
tests help discover how to use some things
(https://notabug.org/guile-sqlite3/guile-sqlite3.git).
For example, I don't know what I'm doing, but this works:
~~~
(import (sqlite3))
;; Log into the database.
(define db (sqlite-open "database.sqlite3"))
;; Create a table.
(sqlite-exec db "create table hellotable(id int, name varchar(15))")
;; Populate the table with values.
(sqlite-exec db "insert into hellotable ('id', 'name') values('33', 'ola')")
(sqlite-exec db "insert into hellotable ('id', 'name') values('34', 'dzien
dobre')")
(sqlite-exec db "insert into hellotable ('id', 'name') values('44', 'annyong
haseyo')")
;; Display each of the rows of the table, in turn.
(let* [(stmt (sqlite-prepare db "select * from hellotable"))
(result (sqlite-map identity stmt))]
(for-each
(lambda (row) (begin (display row) (newline)))
result))
;; Close connection.
(sqlite-close db)
~~~
publickey - luis.felipe.la@protonmail.com - 0x12DE1598.asc
Description: application/pgp-keys
signature.asc
Description: OpenPGP digital signature
- guile-dbi from guix not working, Zelphir Kaltstahl, 2022/05/07
- Re: guile-dbi from guix not working,
Luis Felipe <=
- Re: guile-dbi from guix not working, Arun Isaac, 2022/05/25
- Re: guile-dbi from guix not working, Zelphir Kaltstahl, 2022/05/28
- Re: guile-dbi from guix not working, Arun Isaac, 2022/05/29
- non-input dependencies Was: guile-dbi from guix not working, raingloom, 2022/05/29
- Re: non-input dependencies Was: guile-dbi from guix not working, Zelphir Kaltstahl, 2022/05/29
- Re: non-input dependencies Was: guile-dbi from guix not working, raingloom, 2022/05/29
- Re: non-input dependencies Was: guile-dbi from guix not working, Arun Isaac, 2022/05/30