Please draft us a Scheme API Lassi Kortela (17 Sep 2019 18:54 UTC)
Re: Please draft us a Scheme API John Cowan (17 Sep 2019 19:08 UTC)
What should Hello World be like? Lassi Kortela (18 Sep 2019 08:41 UTC)
Re: What should Hello World be like? Lassi Kortela (18 Sep 2019 08:54 UTC)
Re: What should Hello World be like? John Cowan (19 Sep 2019 01:14 UTC)
Re: What should Hello World be like? hga@xxxxxx (19 Sep 2019 02:31 UTC)
Re: What should Hello World be like? Lassi Kortela (19 Sep 2019 15:35 UTC)
Re: What should Hello World be like? Peter Bex (19 Sep 2019 18:02 UTC)
Re: What should Hello World be like? hga@xxxxxx (19 Sep 2019 22:50 UTC)
Re: What should Hello World be like? John Cowan (19 Sep 2019 19:46 UTC)
Re: What should Hello World be like? hga@xxxxxx (19 Sep 2019 20:50 UTC)
Re: What should Hello World be like? Lassi Kortela (19 Sep 2019 21:14 UTC)
Re: What should Hello World be like? Peter Bex (20 Sep 2019 07:49 UTC)
Re: What should Hello World be like? Alaric Snell-Pym (20 Sep 2019 10:55 UTC)
Re: What should Hello World be like? John Cowan (20 Sep 2019 13:25 UTC)
Re: What should Hello World be like? John Cowan (20 Sep 2019 14:04 UTC)
Re: What should Hello World be like? Lassi Kortela (23 Sep 2019 10:54 UTC)
Connection strings, and representing them as lists Lassi Kortela (23 Sep 2019 10:57 UTC)
John's Simple SQL API hga@xxxxxx (19 Sep 2019 11:38 UTC)
Re: John's Simple SQL API John Cowan (19 Sep 2019 20:28 UTC)
Re: Please draft us a Scheme API hga@xxxxxx (17 Sep 2019 19:11 UTC)
Re: Please draft us a Scheme API John Cowan (17 Sep 2019 19:12 UTC)
Re: Please draft us a Scheme API Lassi Kortela (17 Sep 2019 19:32 UTC)
Re: Please draft us a Scheme API John Cowan (17 Sep 2019 19:35 UTC)
Re: Please draft us a Scheme API Lassi Kortela (17 Sep 2019 19:27 UTC)

Re: Please draft us a Scheme API Lassi Kortela 17 Sep 2019 19:27 UTC

> It'll likely be 2-3 more days before I have a first version

2-3 days is nothing :) Most commercial projects would love to ship stuff
as fast as we are doing.

> For error representation, isn't there's a degree of commonality from
> database engines we can start with, an short error code, and at least
> one string?

This is a good point. I currently return errors from the subprocess like
this:

(error args "wrong number of args")
(error state "not connected to database")
(error state "not finished executing another statement")
(error database "table hello already exists")

So there's a symbol that gives the error code (args/state/database), and
then a human-readable message. I'd like the rest of you to tell me which
codes to use :) You'll have a better grasp of what granularity is
useful. SQLite can easily return quite precise codes, and I assume the
big databases are even better at it.

I think the main point is to have some solid error classes that the
programmer can rely on, instead of a generic catch-all error. At a minimum:

* Did I call the DB API in a way that cannot possibly work (wrong number
of args, wrong data types, etc)?

* Did I call things in the wrong order (execute before connect, rollback
outside transaction, etc)?

* Did I send bad SQL? Bad parameters for a parameterized statement?
Multiple SQL statements when only a single one was expected?

* Is the database experiencing intermittent failure (network or disk
failure, quota exceeded, temporarily too high load, etc)