Postgresql bindings for Guile! (Uses Guile's FFI, so installation is easy!) Why "squee"? Because "squeal" is a silly way to pronounce squeal, and "squee" is an always-happy squeal! (Thanks for the great name, Aeva and Sheila!)

Christopher Baines 9f2609563f Merge branch 'socket-port-memoization-fix' of civodul/guile-squee into master 9 months ago
COPYING.txt 83c6df60e9 Start of guile-postgres 8 years ago
README.txt 7d02217d92 Clarifying "queries that don't return rows" 8 years ago b5c703fcf2 Rename to (easier to find in yer buffer list!) 8 years ago
squee.scm 4c8bd3d735 Clear the connection-to-port mapping for new connections. 9 months ago


Squee! Simple PostgeSQL bindings for Guile!

What's Squee? Squee is a library for connecting to the excellent
PostgreSQL database using Guile. It uses Guile's "foreign function
interface" support, which means you don't need to compile
anything... it all happens through the magic of dynamic linking!

The project is released under the GNU Lesser Public License, version 3
or later (as published by the FSF), just like Guile itself.


;; Make a connection to the database
(define conn (connect-to-postgres-paramstring "dbname=sandbox"))

;; Select some stuff from the database
(exec-query conn "SELECT * FROM animals")
; -> (("1" "monkey" "Almost a human" "ooh ooh") ("3" "parrot" "pretty noisy" "ba-kwaw"))
;; Select, but substitute in a variable
(exec-query conn "SELECT * FROM animals where NAME = $1" '("monkey"))
; -> (("1" "monkey" "Almost a human" "ooh ooh"))

Technically these functions return multiple values, so if you
"receive" the second parameter, you also can get metadata about your

Queries that don't return rows (as in CREATE or DELETE statements)
will simply return #t, so keep that in mind!

That's about it for now, more to come soon.