feat(store): DuckDB.Conn() accessor for streaming row iteration
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:
parent
2d7fb951db
commit
b6daafe952
1 changed files with 11 additions and 0 deletions
11
duckdb.go
11
duckdb.go
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue