drewc / gerbil-postgresql

A Gerbil Package for interacting with the Postgresql database system

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A Gerbil Package for PostgreSQL

Introduction

We use gerbil, gerbil has a postgresql dbi. We interact with postgresql and gerbil.

Usage

We want to connect to a database. We want to use an external file to store password information. Pgpass to the rescue! See here for details.

(import :drewc/postgresql/pgpass)

(find-password user: "foobar")
;; => "ecm- colon : backslash \\ a1sd"

In reality, we do not want to find the password every time, we want it automated. ~connect~ , using pgass!

(import :drewc/postgresql/connect)

(connect user: "ecm" port: 5434)
;; => #<postgresql-connection #30>

Literate Program

This is a literate program[fn:lp].

./db/postgresql*
The code for the driver and frontend are really in db/postgresql.org.

About

A Gerbil Package for interacting with the Postgresql database system

License:The Unlicense


Languages

Language:Scheme 100.0%