more tests

This commit is contained in:
Huan Du
2017-12-28 01:56:44 +08:00
parent be8a7cbb32
commit e121c6d3dd
3 changed files with 6 additions and 0 deletions
+1
View File
@@ -19,6 +19,7 @@ func ExampleDeleteBuilder() {
),
"modified_at > created_at + "+db.Var(86400), // It's allowed to write arbitrary SQL.
)
sql, args := db.Build()
fmt.Println(sql)
fmt.Println(args)
+4
View File
@@ -1,3 +1,6 @@
// Copyright 2018 Huan Du. All rights reserved.
// Licensed under the MIT license that can be found in the LICENSE file.
package sqlbuilder
import (
@@ -10,6 +13,7 @@ func ExampleInsertBuilder() {
ib.Cols("id", "name", "status", "created_at")
ib.Values(1, "Huan Du", 1, ib.Raw("UNIX_TIMESTAMP(NOW())"))
ib.Values(2, "Charmy Liu", 1, 1234567890)
sql, args := ib.Build()
fmt.Println(sql)
fmt.Println(args)
+1
View File
@@ -24,6 +24,7 @@ func ExampleUpdateBuilder() {
),
"modified_at > created_at + "+ub.Var(86400), // It's allowed to write arbitrary SQL.
)
sql, args := ub.Build()
fmt.Println(sql)
fmt.Println(args)