diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..330df36 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,15 @@ +language: go + +sudo: false + +go: + - 1.11.x + - 1.12.x + - 1.13.x + +install: + - go get -v -t ./builder + +script: + - go test ./builder -race -covermode=atomic + diff --git a/README.md b/README.md index 32c668f..9bf782c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,8 @@ # QueryBuilder + +[![Build Status](https://travis-ci.org/wazsmwazsm/QueryBuilder.svg?branch=master)](https://travis-ci.org/wazsmwazsm/QueryBuilder) + + A sql query builder for golang # mission diff --git a/example/aggregate_func.go b/example/aggregate_func.go deleted file mode 100644 index 2c3a2e9..0000000 --- a/example/aggregate_func.go +++ /dev/null @@ -1,22 +0,0 @@ -package main - -import ( - "github.com/wazsmwazsm/QueryBuilder/builder" - "log" -) - -func main() { - sb := builder.NewSQLBuilder() - - sql, err := sb.Table("`test`"). - Select("count(`age`)", "`username`"). - GetQuerySQL() - if err != nil { - log.Fatal(err) - } - - params := sb.GetQueryParams() - - log.Println(sql) // SELECT count(`age`), `username` FROM `test` - log.Println(params) // [] -}