Skip to content

Commit 8cd364f

Browse files
committed
x
1 parent 40e22ce commit 8cd364f

20 files changed

+25
-25
lines changed

Diff for: args.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2018 Huan Du. All rights reserved.
22
// Licensed under the MIT license that can be found in the LICENSE file.
33

4-
package sqlbuilder
4+
package sqb
55

66
import (
77
"database/sql"

Diff for: builder.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2018 Huan Du. All rights reserved.
22
// Licensed under the MIT license that can be found in the LICENSE file.
33

4-
package sqlbuilder
4+
package sqb
55

66
import (
77
"fmt"

Diff for: createtable.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2018 Huan Du. All rights reserved.
22
// Licensed under the MIT license that can be found in the LICENSE file.
33

4-
package sqlbuilder
4+
package sqb
55

66
import (
77
"strings"

Diff for: cte.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2024 Huan Du. All rights reserved.
22
// Licensed under the MIT license that can be found in the LICENSE file.
33

4-
package sqlbuilder
4+
package sqb
55

66
const (
77
cteMarkerInit injectionMarker = iota

Diff for: ctequery.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2024 Huan Du. All rights reserved.
22
// Licensed under the MIT license that can be found in the LICENSE file.
33

4-
package sqlbuilder
4+
package sqb
55

66
const (
77
cteQueryMarkerInit injectionMarker = iota

Diff for: delete.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2018 Huan Du. All rights reserved.
22
// Licensed under the MIT license that can be found in the LICENSE file.
33

4-
package sqlbuilder
4+
package sqb
55

66
const (
77
deleteMarkerInit injectionMarker = iota

Diff for: doc.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Copyright 2018 Huan Du. All rights reserved.
22
// Licensed under the MIT license that can be found in the LICENSE file.
33

4-
// Package sqlbuilder is a flexible and powerful tool to build SQL string and associated args.
5-
package sqlbuilder
4+
// package sqb is a flexible and powerful tool to build SQL string and associated args.
5+
package sqb

Diff for: fieldmapper.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package sqlbuilder
1+
package sqb
22

33
import (
44
"reflect"

Diff for: flavor.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2018 Huan Du. All rights reserved.
22
// Licensed under the MIT license that can be found in the LICENSE file.
33

4-
package sqlbuilder
4+
package sqb
55

66
import (
77
"errors"

Diff for: injection.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2018 Huan Du. All rights reserved.
22
// Licensed under the MIT license that can be found in the LICENSE file.
33

4-
package sqlbuilder
4+
package sqb
55

66
// injection is a helper type to manage injected SQLs in all builders.
77
type injection struct {

Diff for: insert.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2018 Huan Du. All rights reserved.
22
// Licensed under the MIT license that can be found in the LICENSE file.
33

4-
package sqlbuilder
4+
package sqb
55

66
import (
77
"fmt"

Diff for: interpolate.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2018 Huan Du. All rights reserved.
22
// Licensed under the MIT license that can be found in the LICENSE file.
33

4-
package sqlbuilder
4+
package sqb
55

66
import (
77
"database/sql/driver"

Diff for: modifiers.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2018 Huan Du. All rights reserved.
22
// Licensed under the MIT license that can be found in the LICENSE file.
33

4-
package sqlbuilder
4+
package sqb
55

66
import (
77
"reflect"

Diff for: select.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2018 Huan Du. All rights reserved.
22
// Licensed under the MIT license that can be found in the LICENSE file.
33

4-
package sqlbuilder
4+
package sqb
55

66
import (
77
"fmt"

Diff for: stringbuilder.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2023 Huan Du. All rights reserved.
22
// Licensed under the MIT license that can be found in the LICENSE file.
33

4-
package sqlbuilder
4+
package sqb
55

66
import (
77
"io"

Diff for: struct.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2018 Huan Du. All rights reserved.
22
// Licensed under the MIT license that can be found in the LICENSE file.
33

4-
package sqlbuilder
4+
package sqb
55

66
import (
77
"database/sql/driver"
@@ -14,18 +14,18 @@ import (
1414

1515
var (
1616
// DBTag is the struct tag to describe the name for a field in struct.
17-
DBTag = "db"
17+
DBTag = "json"
1818

1919
// FieldTag is the struct tag to describe the tag name for a field in struct.
2020
// Use "," to separate different tags.
21-
FieldTag = "fieldtag"
21+
FieldTag = "ftag"
2222

2323
// FieldOpt is the options for a struct field.
2424
// As db column can contain "," in theory, field options should be provided in a separated tag.
25-
FieldOpt = "fieldopt"
25+
FieldOpt = "fopt"
2626

2727
// FieldAs is the column alias (AS) for a struct field.
28-
FieldAs = "fieldas"
28+
FieldAs = "fas"
2929
)
3030

3131
const (

Diff for: structfields.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package sqlbuilder
1+
package sqb
22

33
import (
44
"fmt"

Diff for: union.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2018 Huan Du. All rights reserved.
22
// Licensed under the MIT license that can be found in the LICENSE file.
33

4-
package sqlbuilder
4+
package sqb
55

66
const (
77
unionDistinct = " UNION " // Default union type is DISTINCT.

Diff for: update.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2018 Huan Du. All rights reserved.
22
// Licensed under the MIT license that can be found in the LICENSE file.
33

4-
package sqlbuilder
4+
package sqb
55

66
import (
77
"fmt"

Diff for: whereclause.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2018 Huan Du. All rights reserved.
22
// Licensed under the MIT license that can be found in the LICENSE file.
33

4-
package sqlbuilder
4+
package sqb
55

66
// WhereClause is a Builder for WHERE clause.
77
// All builders which support `WHERE` clause have an anonymous `WhereClause` field,

0 commit comments

Comments
 (0)