BlobQueryReader Class
A streaming object to read query results.
- Inheritance
-
builtins.objectBlobQueryReader
Constructor
BlobQueryReader(name: str = None, container: str = None, errors: Any = None, record_delimiter: str = '\n', encoding: str | None = None, headers: Dict[str, Any] = None, response: Any = None, error_cls: Type[BlobQueryError] = None)
Parameters
Name | Description |
---|---|
name
|
Default value: None
|
container
|
Default value: None
|
errors
|
Default value: None
|
record_delimiter
|
Default value:
|
encoding
|
Default value: None
|
headers
|
Default value: None
|
response
|
Default value: None
|
error_cls
|
Default value: None
|
Methods
readall |
Return all query results. This operation is blocking until all data is downloaded. If encoding has been configured - this will be used to decode individual records are they are received. |
readinto |
Download the query result to a stream. |
records |
Returns a record generator for the query result. Records will be returned line by line. If encoding has been configured - this will be used to decode individual records are they are received. |
readall
Return all query results.
This operation is blocking until all data is downloaded. If encoding has been configured - this will be used to decode individual records are they are received.
readall() -> bytes | str
Returns
Type | Description |
---|---|
The query results. |
readinto
Download the query result to a stream.
readinto(stream: IO) -> None
Parameters
Name | Description |
---|---|
stream
Required
|
The stream to download to. This can be an open file-handle, or any writable stream. |
Returns
Type | Description |
---|---|
None |
records
Returns a record generator for the query result.
Records will be returned line by line. If encoding has been configured - this will be used to decode individual records are they are received.
records() -> Iterable[bytes | str]
Returns
Type | Description |
---|---|
A record generator for the query result. |
Attributes
container
The name of the container where the blob is.
container: str
name
The name of the blob being quered.
name: str
record_delimiter
The delimiter used to separate lines, or records with the data. The records method will return these lines via a generator.
record_delimiter: str
response_headers
The response_headers of the quick query request.
response_headers: Dict[str, Any]
Azure SDK for Python