canonical / sqlair

Friendly type mapping for SQL databases
Apache License 2.0
17 stars 9 forks source link

SQLair

Go Reference Documentation Status Go Report Card CI License

SQLair is a Go package and an extension to SQL that makes it easy to map between Go types and a SQL database.

Contents

:airplane: Fly SQLair

Reading and writing to a database in Go can be hard. The solutions out there are often either too prescriptive (e.g., Object-Relational Mapping (ORM) libraries where you lose the ability to write your own SQL) or too basic (e.g., database/sql, where you have to manually iterate over each row you get back from the database).

SQLair fills the gap in the middle – automatic type mapping plus the ability to write any SQL you wish. Write your types directly into the query with SQLair expressions and SQLair will automatically map them to the query arguments and inject them with the query results.

If you’re looking to streamline your database game, go get SQLair today.

:dart: Features

:zap: Get Started

Get started with the SQLair tutorial.

:open_book: Documentation

See the documentation on Read the Docs and in the Go Package Reference.

:dizzy: Contributing

See our CONTRIBUTING.md.