开发者

Interacting with a Database from Scheme

开发者 https://www.devze.com 2023-01-08 16:51 出处:网络
i try to learn scheme and as a test project i wanted to create a very simple website with 1-2 database queries (My开发者_C百科SQL preferred, but PostgreSQL would be ok, too).

i try to learn scheme and as a test project i wanted to create a very simple website with 1-2 database queries (My开发者_C百科SQL preferred, but PostgreSQL would be ok, too).

I know it's not really schemes domain but i still want to see how far i can come. Sadly, it seems i'm already stuck at using a database and googling for "scheme database" or any other combination including this words was (as expected considering the double meaning of scheme in this case) not very helpful.

Can you give me any hints on how to access a database from a scheme program?

I read something about scheme code interfacing a mysql client program to do that but i'd prefer something more direct.

Thanks.


GNU Guile already has a database interface that supports Postgres, MySQL and SQLite. It is called Guile DBI. Other Scheme implementations you may try are: SISC (Can connect to any JDBC compliant database, including MySQL) and Spark-Scheme (Can connect to any ODBC compliant database, including MySQL and comes bundled with SQLite). Also note that most Scheme implementations has some form of Foreign Function Interface that will help you to write your own MySQL->Scheme Connector.

0

精彩评论

暂无评论...
验证码 换一张
取 消