-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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
bpo-24905: Support BLOB incremental I/O in sqlite module #271
Closed
Closed
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
4fa0e91
support BLOB incremental I/O in sqlite module
palaviv 3fe9108
Note that blob size cannot be changed using the blob object
palaviv 865c1c8
Use assertRaises in tests
palaviv 788fd54
Fix doc error
palaviv a1361e5
blob support sequence protocol
palaviv 5aedfba
Calculate blob length once at creation
palaviv db6ef32
Add initial Doc for sequence protocol
palaviv 219f4cb
Don't support blob operation
palaviv 6dafe0e
move news entry to blurb
palaviv ffac901
Add blob to PCBuild
palaviv 3475fa1
Update version
palaviv f6015ff
Fix memory leak
palaviv 01e526c
Update version
palaviv 354bebf
Fix CR comments in documentation and testing
palaviv 9709456
Fix CR comments in code
palaviv e6e5099
Make readonly and dbname keyword arguements only
palaviv e9a8080
Fix more CR comments
palaviv d4fb1b5
Add more indicative error on write bigger then blob length
palaviv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import sqlite3 | ||
|
||
con = sqlite3.connect(":memory:") | ||
# creating the table | ||
con.execute("create table test(id integer primary key, blob_col blob)") | ||
con.execute("insert into test(blob_col) values (zeroblob(10))") | ||
# opening blob handle | ||
blob = con.open_blob("test", "blob_col", 1) | ||
blob.write(b"Hello") | ||
blob.write(b"World") | ||
blob.seek(0) | ||
print(blob.read()) # will print b"HelloWorld" | ||
blob.close() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import sqlite3 | ||
|
||
con = sqlite3.connect(":memory:") | ||
# creating the table | ||
con.execute("create table test(id integer primary key, blob_col blob)") | ||
con.execute("insert into test(blob_col) values (zeroblob(10))") | ||
# opening blob handle | ||
with con.open_blob("test", "blob_col", 1) as blob: | ||
blob.write(b"Hello") | ||
blob.write(b"World") | ||
blob.seek(0) | ||
print(blob.read()) # will print b"HelloWorld" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick:
Blob.*
prefix can be removed.