feat(store): DuckDB.Conn() accessor for streaming row iteration
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run

Conn() *sql.DB accessor on store.DuckDB. The higher-level helpers
(Exec, QueryRowScan, QueryRows) don't cover streaming row iteration
patterns that go-ml needs for its training/eval pipelines.

Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
Snider 2026-04-14 16:49:59 +01:00
parent 2d7fb951db
commit b6daafe952

View file

@ -98,6 +98,17 @@ func (db *DuckDB) Path() string {
return db.path
}
// Conn returns the underlying *sql.DB connection. Prefer the typed helpers
// (Exec, QueryRowScan, QueryRows) when possible; this accessor exists for
// callers that need streaming row iteration or transaction control.
//
// Usage example:
//
// rows, err := db.Conn().Query("SELECT id, name FROM models WHERE kind = ?", "lem")
func (db *DuckDB) Conn() *sql.DB {
return db.conn
}
// Exec executes a query without returning rows.
//
// Usage example: