Registry / utility / joho-sqltocsv

joho-sqltocsv

JSON →
library0.0.0-20210428211105-a6d6801d59dfgogounverified

Converts arbitrary database query results (database/sql Rows) into CSV output easily.

go get github.com/joho/sqltocsv
INSTALL
IMPORT
SIG · JOHO-SQLTOCSV
J
joho-sqltocsv
utilitygov0.0.0-20210428211105-a6d6801d59df
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

sqltocsv
github.com/joho/sqltocsv

Executes a query and converts the result to a CSV string.

package main import ( "database/sql" "fmt" "github.com/joho/sqltocsv" _ "github.com/mattn/go-sqlite3" ) func main() { db, _ := sql.Open("sqlite3", ":memory:") rows, _ := db.Query("SELECT 1 AS id, 'hello' AS name") csv, _ := sqltocsv.WriteString(rows) fmt.Println(csv) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.0.0-20210428211105-a6d6801d59dflatest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
joho-sqltocsv — go get joho-sqltocsv · libregistry