.github/profile at master · portablesql/.github · GitHub
Skip to content

Latest commit

 

History

History

profile

Folders and files

README.md

portablesql

Portable SQL toolkit for Go — write database code once, run it on MySQL / MariaDB, PostgreSQL / CockroachDB and SQLite.

Packages

Package Description Install
psql Core: struct binding, query builder, transactions, associations go get github.com/portablesql/psql
psql-mysql MySQL / MariaDB driver go get github.com/portablesql/psql-mysql
psql-pgsql PostgreSQL / CockroachDB driver go get github.com/portablesql/psql-pgsql
psql-sqlite SQLite driver go get github.com/portablesql/psql-sqlite

Quick Start

import (
    "github.com/portablesql/psql"
    _ "github.com/portablesql/psql-sqlite" // or psql-mysql, psql-pgsql
)

be, err := psql.New(":memory:") // engine detected from the DSN
ctx := be.Plug(context.Background())

Drivers register themselves on import, and only the driver you import gets downloaded.

Links