Skip to content

rickb777/sqlapi

Repository files navigation

sqlapi

GoDoc Go Report Card Issues

sqlgen generates SQL statements and database helper functions from your Go structs. It can be used in place of a simple ORM or hand-written SQL. sqlapi (this package) supports the generated code.

Currently, support is included for MySQL, PostgreSQL and SQLite. Other dialects can be added relatively easy - send a Pull Request!

Features

package constraint

  • Representations for inter-table constraints.

package require

  • Predicates allowing easier detection of unexpected results from SELECTS, e.g. when the result set size is not exactly one.

package dialect

  • SQL dialects for SQLite, MySQL, PostgreSQL and its pgx variant. This provides some conditional SQL generation and also

Install

Install with this command:

go get github.com/rickb777/sqlapi

About

Provides an API for handling SQL using the sqlgen2 code generator

Resources

License

Stars

Watchers

Forks

Packages

No packages published