Postgres meta
Classes¶
ExternalPostgresJSONDidMeta ¶
ExternalPostgresJSONDidMeta(
host=None,
port=None,
db=None,
user=None,
password=None,
db_schema=None,
table=None,
table_is_managed=None,
table_column_vo=None,
table_column_scope=None,
table_column_name=None,
table_column_data=None,
)
Functions¶
_verify_table_schema ¶
_verify_table_schema(
table_column_vo,
table_column_scope,
table_column_name,
table_column_data,
)
Rudimentary verification that the metadata table schema meets the requirements for the plugin.
Should be called when using externally managed database tables as a sanity check.
PARAMETER | DESCRIPTION |
---|---|
table_column_vo
|
The table column used for the vo
|
table_column_scope
|
The table column used for the scope
|
table_column_name
|
The table column used for the name
|
table_column_data
|
The table column used for the data
|
get_metadata ¶
get_metadata(scope, name, *, session=None)
Get data identifier metadata.
PARAMETER | DESCRIPTION |
---|---|
scope
|
The scope name
|
name
|
The data identifier name
|
session
|
The database session in use
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
the metadata for the did |
set_metadata ¶
set_metadata(
scope,
name,
key,
value,
recursive=False,
*,
session=None
)
Set single metadata key.
PARAMETER | DESCRIPTION |
---|---|
scope
|
the scope of did
|
name
|
the name of the did
|
key
|
the key to be added
|
value
|
the value of the key to be added
|
recursive
|
recurse into DIDs (not supported)
DEFAULT:
|
session
|
The database session in use
TYPE:
|
set_metadata_bulk ¶
set_metadata_bulk(
scope, name, metadata, recursive=False, *, session=None
)
Bulk set metadata keys.
PARAMETER | DESCRIPTION |
---|---|
scope
|
the scope of did
|
name
|
the name of the did
|
metadata
|
dictionary of metadata keypairs to be added
|
recursive
|
recurse into DIDs (not supported)
DEFAULT:
|
session
|
The database session in use
TYPE:
|
delete_metadata ¶
delete_metadata(scope, name, key, *, session=None)
Delete a key from metadata.
PARAMETER | DESCRIPTION |
---|---|
scope
|
the scope of did
|
name
|
the name of the did
|
key
|
the key to be deleted
|
session
|
the database session in use
TYPE:
|
get_plugin_name ¶
get_plugin_name()
Returns a unique identifier for this plugin. This can be later used for filtering down results to this plugin only.
RETURNS | DESCRIPTION |
---|---|
The name of the plugin |