package main

import (
	"bufio"
	"fmt"
	"log"
	"os"

	"github.com/griffithsh/sql-squish/database"
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)

	var concatted string
	for scanner.Scan() {
		concatted = concatted + scanner.Text()
	}
	d, err := database.FromString(concatted)
	if err != nil {
		log.Fatal(err)
	}
	for _, t := range d.Tables {
		fmt.Println(t.String())
	}
	// files, err := db.AsSQL()
	// if err != nil {
	// 	log.Fatal(err)
	// }
	// for file := range files {
	// 	fmt.Print(file)
	// }
}

package main

import "fmt"

func main() {
	fmt.Println("Hello, world!")
}

--- 
+++ 
@@ -1,7 +1,33 @@
 package main
 
-import "fmt"
+import (
+	"bufio"
+	"fmt"
+	"log"
+	"os"
+
+	"github.com/griffithsh/sql-squish/database"
+)
 
 func main() {
-	fmt.Println("Hello, world!")
+	scanner := bufio.NewScanner(os.Stdin)
+
+	var concatted string
+	for scanner.Scan() {
+		concatted = concatted + scanner.Text()
+	}
+	d, err := database.FromString(concatted)
+	if err != nil {
+		log.Fatal(err)
+	}
+	for _, t := range d.Tables {
+		fmt.Println(t.String())
+	}
+	// files, err := db.AsSQL()
+	// if err != nil {
+	// 	log.Fatal(err)
+	// }
+	// for file := range files {
+	// 	fmt.Print(file)
+	// }
 }
Make sqlite-squish accept SQL on stdin
