mirror of
https://github.com/hanzoai/sqlbuilder.git
synced 2026-10-01 00:37:42 +00:00
README: Fix 's.SelectForTag(table, "foo")' example
It was referring twice to `field3`.
This commit is contained in:
committed by
GitHub
parent
1a61b6d200
commit
e6c330fd9f
@@ -71,7 +71,7 @@ type ATable struct {
|
||||
Field1 string // If a field doesn't has a tag, use "Field1" as column name in SQL.
|
||||
Field2 int `db:"field2"` // Use "db" in field tag to set column name used in SQL.
|
||||
Field3 int64 `db:"field3" fieldtag:"foo,bar"` // Set fieldtag to a field. We can use methods like `Struct#SelectForTag` to use it.
|
||||
Field4 int64 `db:"field4" fieldtag:"foo"` // If we use `s.SelectForTag(table, "foo")`, columnes of SELECT are field3 and field3.
|
||||
Field4 int64 `db:"field4" fieldtag:"foo"` // If we use `s.SelectForTag(table, "foo")`, columnes of SELECT are field3 and field4.
|
||||
Ignored int32 `db:"-"` // If we set field name as "-", Struct will ignore it.
|
||||
unexported int // Unexported field is not visible to Struct.
|
||||
Quoted string `db:"quoted" fieldopt:"withquote"` // Add quote to the field using back quote or double quote. See `Flavor#Quote`.
|
||||
@@ -238,4 +238,4 @@ If we just want to use `${name}` syntax to refer named arguments, use `BuildName
|
||||
|
||||
## License ##
|
||||
|
||||
This package is licensed under MIT license. See LICENSE for details.
|
||||
This package is licensed under MIT license. See LICENSE for details.
|
||||
|
||||
Reference in New Issue
Block a user