It could, but what for? sql.Row is already a convenience wrapper for 
I-know-I-want-only-one-row,
so you know what kind of data are you retrieving, but you know it's only 
one row?

daniel...@omie.com.br a következőt írta (2021. augusztus 13., péntek, 
19:04:24 UTC+2):

> Yes i ever use Query() instead of QueryRow(). 
> My doubt is more about the API design.
> If exists *sql.Row with Scan() method why not implements Columns() ?
>
> On Thursday, August 5, 2021 at 3:43:44 PM UTC-3 eli...@gmail.com wrote:
>
>> In what case do you find the need to call Columns() on a Row? Generally 
>> if you have access to a Row, you also have access to a Rows, which does 
>> have a Columns() method.
>>
>> Eli
>>
>> On Thu, Aug 5, 2021 at 10:34 AM Daniel da Silva <dop...@gmail.com> wrote:
>>
>>> Hello guys!
>>>
>>> Why doesn't sql.Row implement the Columns() method? 
>>>
>>> Thanks!
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "golang-nuts" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to golang-nuts...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/golang-nuts/1c521514-d267-456c-a66a-e56544965fd3n%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/golang-nuts/1c521514-d267-456c-a66a-e56544965fd3n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/21d5e098-edd8-45bf-ac56-070c55094ac4n%40googlegroups.com.

Reply via email to