Lines Matching full:blob
1 #include "blob.h"
5 #include "clinic/blob.c.h"
10 class _sqlite3.Blob "pysqlite_Blob *" "clinic_state()->BlobType"
17 if (self->blob) { in close_blob()
18 sqlite3_blob *blob = self->blob; in close_blob() local
19 self->blob = NULL; in close_blob()
22 sqlite3_blob_close(blob); in close_blob()
58 // Return 1 if the blob object is usable, 0 if not.
66 if (self->blob == NULL) { in check_blob()
69 "Cannot operate on a closed blob."); in check_blob()
77 _sqlite3.Blob.close as blob_close
79 Close the blob.
100 PyObject *blob = PyWeakref_GetObject(weakref); in pysqlite_close_all_blobs() local
101 if (!Py_IsNone(blob)) { in pysqlite_close_all_blobs()
102 close_blob((pysqlite_Blob *)blob); in pysqlite_close_all_blobs()
112 // SQLite pre 3.8.8 does not set this blob error on the connection in blob_seterror()
115 "Cannot operate on an expired blob handle"); in blob_seterror()
128 rc = sqlite3_blob_read(self->blob, (void *)&buf, 1, (int)offset); in read_single()
141 assert(length <= sqlite3_blob_bytes(self->blob)); in read_multiple()
142 assert(offset < sqlite3_blob_bytes(self->blob)); in read_multiple()
152 rc = sqlite3_blob_read(self->blob, raw_buffer, (int)length, (int)offset); in read_multiple()
165 _sqlite3.Blob.read as blob_read
173 If the end of the blob is reached, the data up to end of file will be returned.
174 When length is not specified, or is negative, Blob.read() will read until the
175 end of the blob.
186 /* Make sure we never read past "EOB". Also read the rest of the blob if a in blob_read_impl()
188 int blob_len = sqlite3_blob_bytes(self->blob); in blob_read_impl()
211 Py_ssize_t blob_len = sqlite3_blob_bytes(self->blob); in inner_write()
214 PyErr_SetString(PyExc_ValueError, "data longer than blob length"); in inner_write()
221 rc = sqlite3_blob_write(self->blob, buf, (int)len, (int)offset); in inner_write()
233 _sqlite3.Blob.write as blob_write
240 This function cannot change the blob length. Writing beyond the end of the
241 blob will result in an exception being raised.
262 _sqlite3.Blob.seek as blob_seek
270 The origin argument defaults to os.SEEK_SET (absolute blob positioning).
272 and os.SEEK_END (seek relative to the blob's end).
283 int blob_len = sqlite3_blob_bytes(self->blob); in blob_seek_impl()
307 PyErr_SetString(PyExc_ValueError, "offset out of blob range"); in blob_seek_impl()
321 _sqlite3.Blob.tell as blob_tell
323 Return the current access position for the blob.
338 _sqlite3.Blob.__enter__ as blob_enter
340 Blob context manager enter.
355 _sqlite3.Blob.__exit__ as blob_exit
362 Blob context manager exit.
383 return sqlite3_blob_bytes(self->blob); in blob_length()
393 int blob_len = sqlite3_blob_bytes(self->blob); in get_subscript_index()
398 PyErr_SetString(PyExc_IndexError, "Blob index out of range"); in get_subscript_index()
421 int len = sqlite3_blob_bytes(self->blob); in get_slice_info()
437 PyObject *blob = read_multiple(self, stop - start, start); in subscript_slice() local
438 if (blob == NULL) { in subscript_slice()
443 char *blob_buf = PyBytes_AS_STRING(blob); in subscript_slice()
448 Py_DECREF(blob); in subscript_slice()
467 PyErr_SetString(PyExc_TypeError, "Blob indices must be integers"); in blob_subscript()
476 "Blob doesn't support item deletion"); in ass_subscript_index()
509 "Blob doesn't support slice deletion"); in ass_subscript_slice()
530 "Blob slice assignment is wrong size"); in ass_subscript_slice()
564 PyErr_SetString(PyExc_TypeError, "Blob indices must be integers"); in blob_ass_subscript()
600 .name = MODULE_NAME ".Blob",