Skip to content

Tool for exporting sql queries to multiple formats

License

Notifications You must be signed in to change notification settings

skabillium/sqlxp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SQLXP

sqlxp is a CLI for exporting sql queries to multiple file formats.

Usage

Select users from an sqlite database and write the result as a csv

sqlxp -q 'SELECT * FROM users' -o users.csv example.db

Tip

For larger exports, it's recommended to use CSV or JSON arrays as they write directly to the file, minimizing memory usage.

For more usage information run sqlxp --help.

Features

  • Supports multiple SQL databases (PostgreSQL, MySQL, SQLite)
  • Execute raw SQL queries and process results
  • Outputs results in json & csv
  • Option to print output to the console or write to a file

Installation

To install the tool, make sure you have Go installed. Then, clone this repository and run:

git clone https://github.com/skabillium/sqlxp.git
cd sqlxp
go mod tidy
go build -o sqlxp ./cmd # Or make build

About

Tool for exporting sql queries to multiple formats

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published