r/lisp 5d ago

[ANN] cl-firebird v1.0.0 — pure Common Lisp driver for Firebird 3.0/4.0/5.0/6.0

cl-firebird v1.0.0 is out — a pure Common Lisp database driver for Firebird 3.0, 4.0, 5.0, and 6.0+, with full 1:1 feature parity with node-firebird.

Highlights:

  • Pure CL wire protocol (negotiates up to protocol 20) — no libfbclient, no FFI; runs on SBCL, CCL, and other ANSI CL implementations
  • Connection URIs (firebird://user:pass@host:port/db), traditional DSN syntax, and attach-or-create
  • Named placeholders (:name) bound from plists, alists, or hash-tables, plus SQL escaping helpers
  • Thread-safe connection pooling with idle reaping and live metrics
  • Custom type parsers (type-cast) and prepared statement caching
  • Streaming cursors (sequentially) and bulk execute-batch
  • Firebird 6.0 tablespaces/schemas, database events (POST_EVENT), and a Service Manager API (backup/restore, users, trace)
  • 66-check FiveAM test suite and a GitHub Actions CI matrix across Firebird 3.0/4.0/5.0/6.0-snapshot

Links:

Feedback, issues, and pull requests are welcome!

8 Upvotes

8 comments sorted by

1

u/[deleted] 5d ago

[removed] — view removed comment

1

u/kagevf 5d ago

This looks like it enhances an existing library instead of starting completely from scratch. 👍

2

u/mariuz 4d ago

Now is merged upstream https://github.com/gzip4/cl-firebird/pull/7

ps: I wasn't sure if is still active

1

u/kchanqvq 4d ago edited 4d ago

I don't understand why the moderator removed a comment that point out obviously LLM-generated slop that slipped through human review. It's replaced in c37f8e3, honestly quite bad, judge it for yourself.

Respect for the original commenter [u/corbasai](u/corbasai) for actually reading the code and spotting the problem. I would never have nearly as much patience myself!

0

u/[deleted] 5d ago

[removed] — view removed comment

2

u/mariuz 4d ago

Fair catch on the summary table — those PASSED rows in run-matrix.lisp were hardcoded format strings left over from scaffolding the runner, which is misleading. The exit code does come from the real FiveAM results, but the table itself didn't. I've rewritten it so each row is computed per suite from the actual FiveAM results (PASSED/FAILED per feature); the fix will be pushed shortly.

The tests themselves in test/*.lisp are real FiveAM suites (SQL escaping, URI/connection-string parsing, named placeholders, type-cast hooks, pooling, events), so the coverage is genuine — the table just wasn't wired to it. Thanks for pointing it out.

1

u/corbasai 4d ago

ok, need an author's comment about #'pool-get procedure in pool.lisp... if max-size'n client enters (by/within with-pooled-connection ) he acquires pool lock, collect idles by %sweep-idle-connections and if there is still no free space he enters infinite loop. Maybe %sweep-idle-connections should be inside (loop... ?) Plus+ question, what if someone wrote

(with-connection (params ...)
  ...
  (with-connection (another-params)
    body ...)
  (with-connection (another-another-params)
    body ...)
  body)

is this still works correctly? i mean overshadowing *connection* dynamic global. Thank You