Dbq

screenshot of Dbq

Dbq

Zero boilerplate database operations for Go

Overview

The DBQ library is a lightweight and developer-friendly solution for performing database queries in Go. It reduces the amount of code needed to perform queries and offers support for MySQL and PostgreSQL databases. With features like support for any type of query, bulk inserts, automatic unmarshaling of query results, transaction management, and more, DBQ aims to simplify database operations in Go.

Features

  • Supports ANY type of query: DBQ can handle any type of query, making it flexible for a variety of use cases.
  • MySQL and PostgreSQL compatible: DBQ is compatible with both MySQL and PostgreSQL databases.
  • Convenient and Developer Friendly: DBQ offers a user-friendly interface and aims to simplify database operations in Go.
  • Accepts any type of slice for query args: You can pass in any type of slice as query arguments in DBQ.
  • Flattens query arg slices to individual values: DBQ automatically flattens query argument slices to individual values for easy handling.
  • Bulk Insert seamlessly: DBQ allows you to insert multiple rows at once, improving efficiency for large data inserts.
  • Automatically unmarshal query results directly to a struct: DBQ can automatically unmarshal query results to a struct using the mapstructure package.
  • Lightweight: DBQ is a lightweight solution for performing database queries in Go.

Installation

To install DBQ, follow these steps:

  1. Install the MySQL or PostgreSQL driver.
  2. Import the DBQ package in your Go code.
  3. Use the provided code snippets to perform queries and utilize the various features of DBQ.

Example code:

import (
    "github.com/your-package/dbq"
    _ "github.com/your-database-driver"
)

func main() {
    // Perform DBQ queries here
}

Summary

DBQ is a lightweight and developer-friendly library for performing database queries in Go. With support for MySQL and PostgreSQL, it offers a convenient and efficient approach to simplifying database operations. Its key features include support for any type of query, bulk inserts, automatic struct unmarshaling, transaction management, and more. DBQ aims to reduce the amount of repetitive code required for database queries in Go, making it a valuable tool for developers.

fullstack
Fullstack Boilerplates

A fullstack boilerplate provides a starter application that includes both frontend and backend. It should include database, auth, payments, user roles and other backend services to build a fully featured saas or webapps.