Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft.Data.Sqlite: Enable GetFieldValue<Stream>() and TextReader #23609

Merged
merged 1 commit into from
Dec 8, 2020

Conversation

bricelam
Copy link
Contributor

@bricelam bricelam commented Dec 7, 2020

Part of #19991

@bricelam bricelam requested a review from a team December 7, 2020 20:16
@roji
Copy link
Member

roji commented Dec 8, 2020

Just a note about the lifecycle of returned Stream/TextReader instances... IIRC in other ADO.NET, when you call Read on the reader, any Stream/TextReader which has been handed out for a column on the existing row is automatically invalidated (disposed), since it's not possible to continue reading from previous rows (data is no longer buffered). I'm guessing that with Sqlite this doesn't matter, because the Stream/TextReader is just reading directly from disk etc., but just want to make sure.

@bricelam
Copy link
Contributor Author

bricelam commented Dec 8, 2020

@roji The stream here is either a MemoryStream backed by a byte[] copy of the data or a SqliteBlob which reads independently from the command and reader. I can't express how glad I am that I don't have to deal with all the complexities that going over the wire causes. 😉

@roji
Copy link
Member

roji commented Dec 8, 2020

Yeah, I can confirm that whenever I look at your provider I become very jealous... :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants