snowflakedb / gosnowflake

Go Snowflake Driver
Apache License 2.0
302 stars 125 forks source link

SNOW-1660331 export SnowflakeFileTransferOptions.GetFileToStream #1208

Closed sfc-gh-dszmolka closed 2 months ago

sfc-gh-dszmolka commented 2 months ago

Description

SNOW-1660331 // https://github.com/snowflakedb/gosnowflake/issues/1207

attempt to fix

unknown field getFileToStream in struct literal of type gosnowflake.SnowflakeFileTransferOptions

which happens when trying to download a file into an in-memory stream (rather than a file) per docs:

ctx := WithFileTransferOptions(context.Background(), &SnowflakeFileTransferOptions{getFileToStream: true})
ctx = WithFileGetStream(ctx, &streamBuf)

getFileToStream being unexported, it is not really accessible from outside of the module.

Checklist

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 82.46%. Comparing base (099708d) to head (4c28228).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1208 +/- ## ========================================== - Coverage 82.52% 82.46% -0.07% ========================================== Files 54 54 Lines 12916 12916 ========================================== - Hits 10659 10651 -8 - Misses 2257 2265 +8 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.