Skip to content

Latest commit

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

sqlcquash

A simple tool to squash sql files into single files based on type.

Installation

Go

go install github.com/conneroisu/sqlcquash@latest

Nix

Flakes

{inputs={nixpkgs.url="github:NixOS/nixpkgs/nixos-unstable";sqlcquash.url="github:conneroisu/sqlcquash";flake-utils.url="github:numtide/flake-utils";}outputs={self,sqlcquash}:
flake-utils.lib.eachDefaultSystem(system:
letpkgs=importnixpkgs{inheritsystem;overlays=[sqlcquash.overlays.default];};in{devShells.deffault=pkgs.mkShell{packages=withpkgs;[sqlcquash];};});}

Usage

sqlcaush combine -c config.yaml
//go:generate github.com/conneroisu/sqlcquas@latest combine

Configuration

The configuration file is sqlcquash.yaml and should be placed in the same directory as the executable.

---
version: 1dbs:
- schemas: ./schemas/*.sqlqueries: ./queries/*.sqlseeds: ./seeds/*.sqlschema: ./combined/schema.sqlquery: ./combined/queries.sqlseed: ./combined/seeds.sqlfmt: sleek -i 4fmt-contains: queries

Schemas

The schemas field is a glob pattern that matches the files to be combined into a single file.

Queries

The queries field is a glob pattern that matches the files to be combined into a single file.

Seeds

The seeds field is a glob pattern that matches the files to be combined into a single file.

Schema

The schema field is the path to the file where the combined schema will be written.

Query

The query field is the path to the file where the combined query will be written.

About

squashes sql schema, query, and seed files into singular files

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages