diff --git a/main.go b/main.go index 1787bd1..46bce4d 100644 --- a/main.go +++ b/main.go @@ -5,16 +5,15 @@ import ( "log" _ "github.com/mattn/go-sqlite3" -) +) // Book is a placeholder for book type Word struct { - word_id int - source_id int - previous string + source_id int + previous string current string - next string - count int + next string + count int } type Source struct { @@ -60,14 +59,14 @@ func main() { FOREIGN KEY(source_id) REFERENCES sources(source_id) ); `).Exec() - log.Println("Done making tables!") + log.Println("Done making tables!") - log.Println("Making indexes...") - prep_query(db, "CREATE INDEX words_sources_index ON words(source_id)").Exec() - log.Println("Done making indexes!") + log.Println("Making indexes...") + prep_query(db, "CREATE INDEX words_sources_index ON words(source_id)").Exec() + log.Println("Done making indexes!") - log.Println("Inserting source/word...") - prep_query(db, ` + log.Println("Inserting source/word...") + prep_query(db, ` INSERT INTO sources (name) VALUES @@ -100,8 +99,8 @@ func main() { tempWord.word_id, tempWord.current, tempWord.next, tempWord.source_id) } - // Update - prep_query(db, "UPDATE sources SET name=? WHERE source_id=?").Exec("Monqu2", 1) + // Update + prep_query(db, "UPDATE sources SET name=? WHERE source_id=?").Exec("Monqu2", 1) rows, _ = db.Query("SELECT source_id, name FROM sources") for rows.Next() { diff --git a/words.db b/words.db index eca1ac2..c4730cf 100644 Binary files a/words.db and b/words.db differ