From c67736d92342a22419f02e719cdd5e6ccec41510 Mon Sep 17 00:00:00 2001 From: wazsmwazsm <942443360@qq.com> Date: Mon, 2 Dec 2019 10:57:09 +0800 Subject: [PATCH] add travis --- .travis.yml | 15 +++++++++++++++ README.md | 4 ++++ example/aggregate_func.go | 22 ---------------------- 3 files changed, 19 insertions(+), 22 deletions(-) create mode 100644 .travis.yml delete mode 100644 example/aggregate_func.go 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) // [] -}