No, it doesn't get all the data in the Next() call, it streams it
incrementally from the DB. I've used it to stream gigabytes before, and
they certainly didn't get buffered in RAM.

On Wed, Jun 26, 2019 at 11:04 AM <sa517...@mail.ustc.edu.cn> wrote:

> Get all data in the first Next() call? or only get a batch?
>
> At2019-06-26 21:19:07,Henrik Johanssondahankzter@gmail.comwrote:
>
> I am pretty sure it's the latter case with lazy loading when needed during
> the Next() call.
>
> On Wed, Jun 26, 2019 at 2:59 PM 杜沁园 <sa517...@mail.ustc.edu.cn> wrote:
>
>> When we operate with mysql with Go, as follow:
>>
>>
>> rows, err := db.Query(....)
>>
>> for rows.Next() {
>>     .....
>> }
>>
>>
>> When the driver get data?
>>
>> Get all data at once when we call `Query`???
>>
>> Or only get a batch of Data when we call `Next`, and get next batch of
>> data when we run out of it????
>>
>> --
>> 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/f55712f4-a29e-42b8-84cf-0b39b1d0b32f%40googlegroups.com
>> <https://groups.google.com/d/msgid/golang-nuts/f55712f4-a29e-42b8-84cf-0b39b1d0b32f%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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/CAKOF697ZCj80uV39izsjeJpx1oRg%2BGv_YXJO4avaktdjxPFK0w%40mail.gmail.com
> <https://groups.google.com/d/msgid/golang-nuts/CAKOF697ZCj80uV39izsjeJpx1oRg%2BGv_YXJO4avaktdjxPFK0w%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
> --
> 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/2b180f8f.1bacb.16b94f540b6.Coremail.sa517067%40mail.ustc.edu.cn
> <https://groups.google.com/d/msgid/golang-nuts/2b180f8f.1bacb.16b94f540b6.Coremail.sa517067%40mail.ustc.edu.cn?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CA%2Bv29LuR0u1bjUKy2%3D%2BcbRcmYWh%3DFzZAdw1oNTy52d760wAPhQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to