Descriptiondatabase/sql: Add optional ColumnsCounter interface
Creating a slice of all column names is expensive, since it requires allocations and, depending on the driver, maybe even additional network activity.
Therefore rows.Columns should not be used just to get the length of the slice.
ColumnsCounter adds an optional cheaper way, since getting the number of columns is often much cheaper.
Patch Set 1 #Patch Set 2 : diff -r f9af8b83c78c https://code.google.com/p/go #
Total comments: 1
MessagesTotal messages: 4
|