Squat is an application that provides simple SQL data generation functionality.

Squat

license go version Go Report Card Test codecov

Squat is an application that provides simple SQL data generation functionality.

It generates synthetic SQL data based on the table definition, that is gathered from the DBMS. Squat supports IBM Informix and PostgreSQL, with planned support for all major databases, including MySQL, CockroachDB and MariaDB.

Requirements

The Informix provider uses alexbrainman/odbc package. This means, that for Linux and other *NIX operating systems you have to install unixODBC application. Additionally, for the compilation, the development version of that is needed (e.g. unixodbc-dev on Debian). In Windows it calls directly to the odbc.dll - that also needs to be installed. Additionally, you have to provide your own Informix CSDK, that includes client driver for ODBC.

Docker

For Docker image, as for now, you need to manually log in to the container, and install Informix CSDK, as it's non-free software distributed by IBM.

Configuration

The app is configured using multiple small configuration files and environment variables. Each file is used for the database connection provider package. Unfortunately, now you can connect only to single database of given type.

Each config file is read from config location provided to the app through environmental variable.

  • CONFIG_LOCATION - sets the directory containing the configuration files for providers.
  • DATA_LOCATION- sets the directory containing the data.json and data.gob files.

For examples of the configuration files, look at the bin/config folder in the root of the repository.

Additionally you can provide your own data.gob file. The best way of doing this, is to parse the JSON file with gob-generator, which source code can be found in the tools directory.

In Docker all env variables are set by default, and all exemplary files are loaded into the specific dirs. You should use Docker Compose to create volumes and edit the configs from the host machine.

Usage

Usage of the application is quite simple. If you are running it bare-metal, just run the app, with the proper configuration files and environmental variables. Then head to localhost:8080 (or change the port correspondingly to the port you have passed with --port argument), and start using the web user interface.

Owner
Mateusz Urbanek
23 | he/him
Mateusz Urbanek
Similar Resources

Database Abstraction Layer (dbal) for Go. Support SQL builder and get result easily (now only support mysql)

godbal Database Abstraction Layer (dbal) for go (now only support mysql) Motivation I wanted a DBAL that No ORM、No Reflect、Concurrency Save, support S

Nov 17, 2022

SQL builder and query library for golang

__ _ ___ __ _ _ _ / _` |/ _ \ / _` | | | | | (_| | (_) | (_| | |_| | \__, |\___/ \__, |\__,_| |___/ |_| goqu is an expressive SQL bu

Dec 30, 2022

SQL query builder for Go

GoSQL Query builder with some handy utility functions. Documentation For full documentation see the pkg.go.dev or GitBook. Examples // Open database a

Dec 12, 2022

Type safe SQL query builder and struct mapper for Go

sq (Structured Query) 🎯 🏆 sq is a code-generated, type safe query builder and struct mapper for Go. 🏆 🎯 Documentation • Reference • Examples This

Dec 19, 2022

Fast SQL query builder for Go

sqlf A fast SQL query builder for Go. sqlf statement builder provides a way to: Combine SQL statements from fragments of raw SQL and arguments that ma

Dec 23, 2022

💥 A lightweight DSL & ORM which helps you to write SQL in Go.

💥 A lightweight DSL & ORM which helps you to write SQL in Go.

sqlingo is a SQL DSL (a.k.a. SQL Builder or ORM) library in Go. It generates code from the database and lets you write SQL queries in an elegant way.

Jan 2, 2023

GraphJin - Build APIs in 5 minutes with GraphQL. An instant GraphQL to SQL compiler.

GraphJin - Build APIs in 5 minutes with GraphQL. An instant GraphQL to SQL compiler.

GraphJin - Build APIs in 5 minutes GraphJin gives you a high performance GraphQL API without you having to write any code. GraphQL is automagically co

Jan 4, 2023

golang orm and sql builder

gosql gosql is a easy ORM library for Golang. Style: var userList []UserModel err := db.FetchAll(&userList, gosql.Columns("id","name"), gosql.

Dec 22, 2022

Analyzer: helps uncover bugs by reporting a diagnostic for mistakes of *sql.Rows usage.

sqlrows sqlrows is a static code analyzer which helps uncover bugs by reporting a diagnostic for mistakes of sql.Rows usage. Install You can get sqlro

Mar 24, 2022
Comments
  • Create Oracle Database provider package

    Create Oracle Database provider package

    Examples of providers are found in squat/providers directory.

    The provider should have tests.

    Ideally, a docker-compose.yml file that contains the database used for testing should be provided.

  • Create MySQL provider package

    Create MySQL provider package

    Examples of providers are found in squat/providers directory.

    The provider should have tests.

    Ideally, a docker-compose.yml file that contains the database used for testing should be provided.

  • Create MariaDB provider package

    Create MariaDB provider package

    Examples of providers are found in squat/providers directory.

    The provider should have tests.

    Ideally, a docker-compose.yml file that contains the database used for testing should be provided.

  • Create CockroachDB provider package

    Create CockroachDB provider package

    Examples of providers are found in squat/providers directory.

    The provider should have tests.

    Ideally, a docker-compose.yml file that contains the database used for testing should be provided.

Fluent SQL generation for golang

sqrl - fat-free version of squirrel - fluent SQL generator for Go Non thread safe fork of squirrel. The same handy fluffy helper, but with extra lette

Dec 16, 2022
Fluent SQL generation for golang

Squirrel is "complete". Bug fixes will still be merged (slowly). Bug reports are welcome, but I will not necessarily respond to them. If another fork

Jan 6, 2023
Command line tool to generate idiomatic Go code for SQL databases supporting PostgreSQL, MySQL, SQLite, Oracle, and Microsoft SQL Server

About xo xo is a command-line tool to generate Go code based on a database schema or a custom query. xo works by using database metadata and SQL intro

Jan 8, 2023
Go fearless SQL. Sqlvet performs static analysis on raw SQL queries in your Go code base.

Sqlvet Sqlvet performs static analysis on raw SQL queries in your Go code base to surface potential runtime errors at build time. Feature highlights:

Dec 19, 2022
Write your SQL queries in raw files with all benefits of modern IDEs, use them in an easy way inside your application with all the profit of compile time constants

About qry is a general purpose library for storing your raw database queries in .sql files with all benefits of modern IDEs, instead of strings and co

Dec 25, 2022
A Go (golang) package that enhances the standard database/sql package by providing powerful data retrieval methods as well as DB-agnostic query building capabilities.

ozzo-dbx Summary Description Requirements Installation Supported Databases Getting Started Connecting to Database Executing Queries Binding Parameters

Dec 31, 2022
Simple SQL extensions for Go

go-sx provides some extensions to the standard library database/sql package. It is designed for those who wish to use the full power of SQL without a heavy abstraction layer.

Aug 31, 2022
Data-builder - Data builder with golang

databuilder import "github.com/go-coldbrew/data-builder" Index Variables func Is

Feb 5, 2022
A Golang library for using SQL.

dotsql A Golang library for using SQL. It is not an ORM, it is not a query builder. Dotsql is a library that helps you keep sql files in one place and

Dec 27, 2022
a golang library for sql builder

Gendry gendry is a Go library that helps you operate database. Based on go-sql-driver/mysql, it provides a series of simple but useful tools to prepar

Dec 26, 2022