go fmt fixes
This commit is contained in:
parent
31cf9cdf10
commit
8d3856af6b
@ -1,18 +1,17 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/shopspring/decimal"
|
|
||||||
"encoding/csv"
|
"encoding/csv"
|
||||||
"log"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/shopspring/decimal"
|
||||||
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"time"
|
|
||||||
"strconv"
|
"strconv"
|
||||||
|
"time"
|
||||||
|
|
||||||
"tacitus/postgres"
|
"tacitus/postgres"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
client := postgres.NewClient()
|
client := postgres.NewClient()
|
||||||
client.Name = "gdax"
|
client.Name = "gdax"
|
||||||
|
@ -8,12 +8,12 @@ import (
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
trade_columns = `trade_id, product, price, size, buy, sell, timestamp`
|
trade_columns = `trade_id, product, price, size, buy, sell, timestamp`
|
||||||
trade_insert = `INSERT INTO trades (` + trade_columns + `) VALUES ` +
|
trade_insert = `INSERT INTO trades (` + trade_columns + `) VALUES ` +
|
||||||
`($1, $2, $3, $4, $5, $6, $7) RETURNING id;`
|
`($1, $2, $3, $4, $5, $6, $7) RETURNING id;`
|
||||||
trade_find = `SELECT id, ` + trade_columns + ` FROM trades WHERE id = $1;`
|
trade_find = `SELECT id, ` + trade_columns + ` FROM trades WHERE id = $1;`
|
||||||
trade_find_trade_id = `SELECT id, ` + trade_columns + ` FROM trades ` +
|
trade_find_trade_id = `SELECT id, ` + trade_columns + ` FROM trades ` +
|
||||||
`WHERE trade_id = $1 AND product = $2;`
|
`WHERE trade_id = $1 AND product = $2;`
|
||||||
trade_delete = `DELETE FROM trades WHERE id = $1;`
|
trade_delete = `DELETE FROM trades WHERE id = $1;`
|
||||||
trades_in_date_range = `SELECT id, ` + trade_columns + ` FROM ` +
|
trades_in_date_range = `SELECT id, ` + trade_columns + ` FROM ` +
|
||||||
`trades WHERE product = $1 AND timestamp >= $2 AND timestamp < $3;`
|
`trades WHERE product = $1 AND timestamp >= $2 AND timestamp < $3;`
|
||||||
trade_first = `SELECT id, ` + trade_columns + ` FROM trades WHERE ` +
|
trade_first = `SELECT id, ` + trade_columns + ` FROM trades WHERE ` +
|
||||||
|
Reference in New Issue
Block a user