File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ type ATable struct {
136136 Field2 int ` db:"field2"` // Use "db" in field tag to set column name used in SQL.
137137 Field3 int64 ` db:"field3" fieldtag:"foo,bar"` // Set fieldtag to a field. We can use methods like `Struct#SelectForTag` to use it.
138138 Field4 int64 ` db:"field4" fieldtag:"foo"` // If we use `s.SelectForTag(table, "foo")`, columnes of SELECT are field3 and field4.
139- Field5As string ` db:"field5" fieldas:"FIELD5 "` // Use "fieldas" in field tag to set AS name used in SELECT.
139+ Field5 string ` db:"field5" fieldas:"f5_alias "` // Use "fieldas" in field tag to set a column alias (AS) used in SELECT.
140140 Ignored int32 ` db:"-"` // If we set field name as "-", Struct will ignore it.
141141 unexported int // Unexported field is not visible to Struct.
142142 Quoted string ` db:"quoted" fieldopt:"withquote"` // Add quote to the field using back quote or double quote. See `Flavor#Quote`.
Original file line number Diff line number Diff line change 2323 // As db column can contain "," in theory, field options should be provided in a separated tag.
2424 FieldOpt = "fieldopt"
2525
26- // FieldAs is the AS name for a struct field.
26+ // FieldAs is the column alias (AS) for a struct field.
2727 FieldAs = "fieldas"
2828)
2929
You can’t perform that action at this time.
0 commit comments