Registry / database / pocketbase-dbx

pocketbase-dbx

JSON →
library1.12.0gogounverified

Package dbx provides a set of DB-agnostic and easy-to-use query building methods for relational databases.

go get github.com/pocketbase/dbx
INSTALL
IMPORT
SIG · POCKETBASE-DBX
P
pocketbase-dbx
databasegov1.12.0
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.

dbx
github.com/pocketbase/dbx

Minimal example showing how to create a dbx query builder from a database connection and execute a SELECT query.

package main import ( "database/sql" "fmt" "log" "github.com/pocketbase/dbx" _ "github.com/mattn/go-sqlite3" ) func main() { db, err := sql.Open("sqlite3", ":memory:") if err != nil { log.Fatal(err) } defer db.Close() dbxDB := dbx.NewFromDB(db, "sqlite3") var count int err = dbxDB.Select("COUNT(*)").From("sqlite_master").Row(&count) if err != nil { log.Fatal(err) } fmt.Println("Table count:", count) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.12.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Amazon
1
Resources
pocketbase-dbx — go get pocketbase-dbx · libregistry