Socket
Socket
Sign inDemoInstall

github.com/rickb777/sqlapi

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/rickb777/sqlapi


Version published
Created
Source

sqlapi

GoDoc Build Status Code Coverage 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.

See the demo directory for examples. Look in the generated files *_sql.go and the hand-crafted files (hook.go, issue.go, user.go).

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

package where

  • Fluent construction of WHERE and HAVING clauses: this is now [github.com/rickb777/where](https://github .com/rickb777/where). This also provides control over identifier quoting, e.g. ANSI SQL, back-ticks, etc.

Install

Install with this command:

go get github.com/rickb777/sqlapi

Please continue reading about sqlgen2.

FAQs

Package last updated on 10 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc