Arc Forumnew | comments | leaders | submitlogin
3 points by krapp 1036 days ago | link | parent

There is a database wrapper (database.arc) in /lib that should support postgres.

It isn't well documented and only tested on a SQL connection but it's just a set of wrappers around Racket's DB drivers, so you could try including that into your app.

Unfortunately I seem to have completely lost my test project but the connection should work as follows:

    (= dbconn (postgresql-connect user db password))
Hope that helps.


1 point by markkat 1035 days ago | link

Thanks! So far no avail, but I'll try some more!

btw I caught a misspelled 'password' in postgresql-secure-connect:

  (mac postgresql-secure-connect (user db ssl-protocol (o passowrd nil))

-----

1 point by krapp 1034 days ago | link

>btw I caught a misspelled 'password' in postgresql-secure-connect:

oops. It's fixed, thanks.

-----

1 point by markkat 1033 days ago | link

btw, would this be the correct syntax for table-exists?

  (= dbconn (postgresql-connect "root" "root" password))
  (table-exists? dbconn "items")

-----

1 point by krapp 1033 days ago | link

yes.

-----