File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 1+ * Supported placeholder "_ " for ignored column names in ` database/sql ` result sets
2+
13## v3.52.0
24* Added ` table.Session.CopyTables ` method
35* Added ` x-ydb-trace-id ` header into grpc calls
Original file line number Diff line number Diff line change 2323 _ driver.Rows = & single {}
2424
2525 _ types.Scanner = & valuer {}
26+
27+ ignoreColumnNamePlaceholder = "_"
2628)
2729
2830type rows struct {
@@ -41,11 +43,11 @@ func (r *rows) Columns() []string {
4143 r .nextSet .Do (func () {
4244 r .result .NextResultSet (context .Background ())
4345 })
44- var i int
45- cs := make ([]string , r .result .CurrentResultSet ().ColumnCount ())
46+ cs := make ([]string , 0 , r .result .CurrentResultSet ().ColumnCount ())
4647 r .result .CurrentResultSet ().Columns (func (m options.Column ) {
47- cs [i ] = m .Name
48- i ++
48+ if m .Name != ignoreColumnNamePlaceholder {
49+ cs = append (cs , m .Name )
50+ }
4951 })
5052 return cs
5153}
You can’t perform that action at this time.
0 commit comments