All Projects → shomali11 → Xsql

shomali11 / Xsql

Licence: mit
SQL Query Results Pretty Printing

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Xsql

Mlsql
inferring sql queries from plain-text questions about tables
Stars: ✭ 841 (+2703.33%)
Mutual labels:  sql
Printcess
Haskell pretty printing library supporting indentation, mixfix operators, and automatic line breaks.
Stars: ✭ 13 (-56.67%)
Mutual labels:  pretty-print
Spark
Apache Spark - A unified analytics engine for large-scale data processing
Stars: ✭ 31,618 (+105293.33%)
Mutual labels:  sql
Pl Gapi
Stars: ✭ 8 (-73.33%)
Mutual labels:  sql
Xhgui Branch
uprofiler UI,xhprof UI,tideways UI , PHP Non-intrusive performance monitoring platform.
Stars: ✭ 872 (+2806.67%)
Mutual labels:  sql
Jsqltuner
SQL tuner for improving Java applications ORM performance using NoSQL technologies.
Stars: ✭ 13 (-56.67%)
Mutual labels:  sql
Sql Exercise
Practice with "Real" SQL Problems
Stars: ✭ 837 (+2690%)
Mutual labels:  sql
Postgrest Sessions Example
An example on how to implement session-based authentication with PostgREST
Stars: ✭ 30 (+0%)
Mutual labels:  sql
Node Html To Text
Advanced html to text converter
Stars: ✭ 872 (+2806.67%)
Mutual labels:  pretty-print
Diff Table
Stars: ✭ 21 (-30%)
Mutual labels:  sql
Ktorm
A lightweight ORM framework for Kotlin with strong-typed SQL DSL and sequence APIs.
Stars: ✭ 843 (+2710%)
Mutual labels:  sql
Phoenix
Mirror of Apache Phoenix
Stars: ✭ 867 (+2790%)
Mutual labels:  sql
Express Knex Objection
A simple API system on a pg database, using knex and objection to simplify connection and management
Stars: ✭ 20 (-33.33%)
Mutual labels:  sql
Live2
SAP HANA Academy - Live2 project code samples for playlist https://www.youtube.com/playlist?list=PLkzo92owKnVyIXgkK__7Z1o_C7pyNc3SR
Stars: ✭ 8 (-73.33%)
Mutual labels:  sql
Sql Composer
Standalone SQL composer DSL for Ruby
Stars: ✭ 26 (-13.33%)
Mutual labels:  sql
Node Pg Migrate
Node.js database migration management for Postgresql
Stars: ✭ 838 (+2693.33%)
Mutual labels:  sql
Alembic
A database migrations tool for SQLAlchemy.
Stars: ✭ 874 (+2813.33%)
Mutual labels:  sql
Avsqldebugger
A Simple Core Data Debugger that will look inside your apps DB
Stars: ✭ 30 (+0%)
Mutual labels:  sql
Gorose
GoRose(go orm), a mini database ORM for golang, which inspired by the famous php framwork laravle's eloquent. It will be friendly for php developer and python or ruby developer. Currently provides six major database drivers: mysql,sqlite3,postgres,oracle,mssql, Clickhouse.
Stars: ✭ 947 (+3056.67%)
Mutual labels:  sql
Eosio sql plugin
EOSIO sql database plugin
Stars: ✭ 21 (-30%)
Mutual labels:  sql

xsql Build Status Go Report Card GoDoc License: MIT

SQL Query Results Pretty Printing

Dependencies

Examples

Example 1

package main

import (
	"database/sql"
	"fmt"
	"github.com/shomali11/xsql"
	"log"
)

const (
	dataSourceFormat = "user=%s password=%s dbname=%s sslmode=disable"
)

func main() {
	dataSource := fmt.Sprintf(dataSourceFormat, "<USERNAME>", "<PASSWORD>", "<DATABASE_NAME>")
	db, err := sql.Open("<DRIVER>", dataSource)
	if err != nil {
		log.Fatal(err)
	}

	defer db.Close()

	rows, err := db.Query("SELECT * FROM test")
	if err != nil {
		log.Fatal(err)
	}

	results, err := xsql.Pretty(rows)
	if err != nil {
		log.Fatal(err)
	}

	fmt.Println(results)
}

Output:

 id  |      name      |         title         |         created_at          | number | decimal | active
-----+----------------+-----------------------+-----------------------------+--------+---------+--------
   1 | Raed Shomali   | Sr. Software Engineer | 2017-10-24T20:59:43.37154Z  |     11 | 789.123 | true
   2 | Dwayne Johnson | The Rock              | 2017-10-24T21:00:31.530534Z |   1000 |     3.7 | true
 300 | Steve Austin   | Stone Cold            | 2017-10-26T19:42:51.993465Z |  55000 |   55.55 | false
(3 rows)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].