indexed_db
DataEntry
dataclass
Data entry.
Source code in zendriver/cdp/indexed_db.py
key: runtime.RemoteObject
instance-attribute
primary_key: runtime.RemoteObject
instance-attribute
value: runtime.RemoteObject
instance-attribute
__init__(key, primary_key, value)
from_json(json)
classmethod
Source code in zendriver/cdp/indexed_db.py
DatabaseWithObjectStores
dataclass
Database with an array of object stores.
Source code in zendriver/cdp/indexed_db.py
name: str
instance-attribute
object_stores: typing.List[ObjectStore]
instance-attribute
version: float
instance-attribute
__init__(name, version, object_stores)
from_json(json)
classmethod
Key
dataclass
Key.
Source code in zendriver/cdp/indexed_db.py
array: typing.Optional[typing.List[Key]] = None
class-attribute
instance-attribute
date: typing.Optional[float] = None
class-attribute
instance-attribute
number: typing.Optional[float] = None
class-attribute
instance-attribute
string: typing.Optional[str] = None
class-attribute
instance-attribute
type_: str
instance-attribute
__init__(type_, number=None, string=None, date=None, array=None)
from_json(json)
classmethod
Source code in zendriver/cdp/indexed_db.py
to_json()
Source code in zendriver/cdp/indexed_db.py
KeyPath
dataclass
Key path.
Source code in zendriver/cdp/indexed_db.py
array: typing.Optional[typing.List[str]] = None
class-attribute
instance-attribute
string: typing.Optional[str] = None
class-attribute
instance-attribute
type_: str
instance-attribute
__init__(type_, string=None, array=None)
from_json(json)
classmethod
Source code in zendriver/cdp/indexed_db.py
to_json()
KeyRange
dataclass
Key range.
Source code in zendriver/cdp/indexed_db.py
lower: typing.Optional[Key] = None
class-attribute
instance-attribute
lower_open: bool
instance-attribute
upper: typing.Optional[Key] = None
class-attribute
instance-attribute
upper_open: bool
instance-attribute
__init__(lower_open, upper_open, lower=None, upper=None)
from_json(json)
classmethod
Source code in zendriver/cdp/indexed_db.py
to_json()
Source code in zendriver/cdp/indexed_db.py
ObjectStore
dataclass
Object store.
Source code in zendriver/cdp/indexed_db.py
auto_increment: bool
instance-attribute
indexes: typing.List[ObjectStoreIndex]
instance-attribute
key_path: KeyPath
instance-attribute
name: str
instance-attribute
__init__(name, key_path, auto_increment, indexes)
from_json(json)
classmethod
Source code in zendriver/cdp/indexed_db.py
to_json()
Source code in zendriver/cdp/indexed_db.py
ObjectStoreIndex
dataclass
Object store index.
Source code in zendriver/cdp/indexed_db.py
key_path: KeyPath
instance-attribute
multi_entry: bool
instance-attribute
name: str
instance-attribute
unique: bool
instance-attribute
__init__(name, key_path, unique, multi_entry)
from_json(json)
classmethod
clear_object_store(database_name, object_store_name, security_origin=None, storage_key=None, storage_bucket=None)
Clears all entries from an object store.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
security_origin
|
Optional[str]
|
(Optional) At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin. |
None
|
storage_key
|
Optional[str]
|
(Optional) Storage key. |
None
|
storage_bucket
|
Optional[StorageBucket]
|
(Optional) Storage bucket. If not specified, it uses the default bucket. |
None
|
database_name
|
str
|
Database name. |
required |
object_store_name
|
str
|
Object store name. |
required |
Source code in zendriver/cdp/indexed_db.py
delete_database(database_name, security_origin=None, storage_key=None, storage_bucket=None)
Deletes a database.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
security_origin
|
Optional[str]
|
(Optional) At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin. |
None
|
storage_key
|
Optional[str]
|
(Optional) Storage key. |
None
|
storage_bucket
|
Optional[StorageBucket]
|
(Optional) Storage bucket. If not specified, it uses the default bucket. |
None
|
database_name
|
str
|
Database name. |
required |
Source code in zendriver/cdp/indexed_db.py
delete_object_store_entries(database_name, object_store_name, key_range, security_origin=None, storage_key=None, storage_bucket=None)
Delete a range of entries from an object store
Parameters:
Name | Type | Description | Default |
---|---|---|---|
security_origin
|
Optional[str]
|
(Optional) At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin. |
None
|
storage_key
|
Optional[str]
|
(Optional) Storage key. |
None
|
storage_bucket
|
Optional[StorageBucket]
|
(Optional) Storage bucket. If not specified, it uses the default bucket. |
None
|
database_name
|
str
|
|
required |
object_store_name
|
str
|
|
required |
key_range
|
KeyRange
|
Range of entry keys to delete |
required |
Source code in zendriver/cdp/indexed_db.py
disable()
enable()
get_metadata(database_name, object_store_name, security_origin=None, storage_key=None, storage_bucket=None)
Gets metadata of an object store.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
security_origin
|
Optional[str]
|
(Optional) At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin. |
None
|
storage_key
|
Optional[str]
|
(Optional) Storage key. |
None
|
storage_bucket
|
Optional[StorageBucket]
|
(Optional) Storage bucket. If not specified, it uses the default bucket. |
None
|
database_name
|
str
|
Database name. |
required |
object_store_name
|
str
|
Object store name. |
required |
Returns:
Type | Description |
---|---|
Generator[T_JSON_DICT, T_JSON_DICT, Tuple[float, float]]
|
A tuple with the following items: 0. entriesCount - the entries count 1. keyGeneratorValue - the current value of key generator, to become the next inserted key into the object store. Valid if objectStore.autoIncrement is true. |
Source code in zendriver/cdp/indexed_db.py
request_data(database_name, object_store_name, index_name, skip_count, page_size, security_origin=None, storage_key=None, storage_bucket=None, key_range=None)
Requests data from object store or index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
security_origin
|
Optional[str]
|
(Optional) At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin. |
None
|
storage_key
|
Optional[str]
|
(Optional) Storage key. |
None
|
storage_bucket
|
Optional[StorageBucket]
|
(Optional) Storage bucket. If not specified, it uses the default bucket. |
None
|
database_name
|
str
|
Database name. |
required |
object_store_name
|
str
|
Object store name. |
required |
index_name
|
str
|
Index name, empty string for object store data requests. |
required |
skip_count
|
int
|
Number of records to skip. |
required |
page_size
|
int
|
Number of records to fetch. |
required |
key_range
|
Optional[KeyRange]
|
(Optional) Key range. |
None
|
Returns:
Type | Description |
---|---|
Generator[T_JSON_DICT, T_JSON_DICT, Tuple[List[DataEntry], bool]]
|
A tuple with the following items: 0. objectStoreDataEntries - Array of object store data entries. 1. hasMore - If true, there are more entries to fetch in the given range. |
Source code in zendriver/cdp/indexed_db.py
request_database(database_name, security_origin=None, storage_key=None, storage_bucket=None)
Requests database with given name in given frame.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
security_origin
|
Optional[str]
|
(Optional) At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin. |
None
|
storage_key
|
Optional[str]
|
(Optional) Storage key. |
None
|
storage_bucket
|
Optional[StorageBucket]
|
(Optional) Storage bucket. If not specified, it uses the default bucket. |
None
|
database_name
|
str
|
Database name. |
required |
Returns:
Type | Description |
---|---|
Generator[T_JSON_DICT, T_JSON_DICT, DatabaseWithObjectStores]
|
Database with an array of object stores. |
Source code in zendriver/cdp/indexed_db.py
request_database_names(security_origin=None, storage_key=None, storage_bucket=None)
Requests database names for given security origin.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
security_origin
|
Optional[str]
|
(Optional) At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin. |
None
|
storage_key
|
Optional[str]
|
(Optional) Storage key. |
None
|
storage_bucket
|
Optional[StorageBucket]
|
(Optional) Storage bucket. If not specified, it uses the default bucket. |
None
|
Returns:
Type | Description |
---|---|
Generator[T_JSON_DICT, T_JSON_DICT, List[str]]
|
Database names for origin. |