aiida.storage.psql_dos.models package#

Module to define the database models for the SqlAlchemy backend.

Submodules#

Module to manage authentification information for the SQLA backend.

class aiida.storage.psql_dos.models.authinfo.DbAuthInfo(**kwargs)[source]#

Bases: sqlalchemy.orm.decl_api.Model

Database model to store data for aiida.orm.AuthInfo, and keep computer authentication data, per user.

Specifications are user-specific of how to submit jobs in the computer. The model also has an enabled logical switch that indicates whether the device is available for use or not. This last one can be set and unset by the user.

__init__(**kwargs)#

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

__mapper__ = <Mapper at 0x7efc12e100d0; DbAuthInfo>#
__module__ = 'aiida.storage.psql_dos.models.authinfo'#
__str__()[source]#

Return str(self).

__table__ = Table('db_dbauthinfo', MetaData(), Column('id', Integer(), table=<db_dbauthinfo>, primary_key=True, nullable=False), Column('aiidauser_id', Integer(), ForeignKey('db_dbuser.id'), table=<db_dbauthinfo>, nullable=False), Column('dbcomputer_id', Integer(), ForeignKey('db_dbcomputer.id'), table=<db_dbauthinfo>, nullable=False), Column('metadata', JSONB(astext_type=Text()), table=<db_dbauthinfo>, nullable=False, default=ColumnDefault(<function dict>)), Column('auth_params', JSONB(astext_type=Text()), table=<db_dbauthinfo>, nullable=False, default=ColumnDefault(<function dict>)), Column('enabled', Boolean(), table=<db_dbauthinfo>, nullable=False, default=ColumnDefault(True)), schema=None)#
__table_args__ = (UniqueConstraint(Column('aiidauser_id', Integer(), ForeignKey('db_dbuser.id'), table=<db_dbauthinfo>, nullable=False), Column('dbcomputer_id', Integer(), ForeignKey('db_dbcomputer.id'), table=<db_dbauthinfo>, nullable=False)),)#
__tablename__ = 'db_dbauthinfo'#
_metadata#
_sa_class_manager = {'_metadata': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'aiidauser': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'aiidauser_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'auth_params': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'dbcomputer': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'dbcomputer_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'enabled': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
aiidauser#
aiidauser_id#
auth_params#
dbcomputer#
dbcomputer_id#
enabled#
id#

Base SQLAlchemy models.

class aiida.storage.psql_dos.models.base.Model[source]#

Bases: object

Base ORM model.

__dict__ = mappingproxy({'__module__': 'aiida.storage.psql_dos.models.base', '__doc__': 'Base ORM model.', '__repr__': <function Model.__repr__>, '__dict__': <attribute '__dict__' of 'Model' objects>, '__weakref__': <attribute '__weakref__' of 'Model' objects>, '__annotations__': {}})#
__module__ = 'aiida.storage.psql_dos.models.base'#
__repr__() str[source]#

Return a representation of the row columns

__weakref__#

list of weak references to the object (if defined)

aiida.storage.psql_dos.models.base.get_orm_metadata() sqlalchemy.sql.schema.MetaData[source]#

Return the populated metadata object.

aiida.storage.psql_dos.models.base.instant_defaults_listener(target, args, kwargs)[source]#

Loop over the columns of the target model instance and populate defaults.

SqlAlchemy does not set default values for table columns upon construction of a new instance, but will only do so when storing the instance. Any attributes that do not have a value but have a defined default, will be populated with this default. This does mean however, that before the instance is stored, these attributes are undefined, for example the UUID.

This should be used as: https://docs.sqlalchemy.org/en/14/orm/events.html#sqlalchemy.orm.InstanceEvents.init

Module to manage comments for the SQLA backend.

class aiida.storage.psql_dos.models.comment.DbComment(**kwargs)[source]#

Bases: sqlalchemy.orm.decl_api.Model

Database model to store data for aiida.orm.Comment.

Comments can be attach to the nodes by the users.

__init__(**kwargs)#

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

__mapper__ = <Mapper at 0x7efc12dcd4c0; DbComment>#
__module__ = 'aiida.storage.psql_dos.models.comment'#
__str__()[source]#

Return str(self).

__table__ = Table('db_dbcomment', MetaData(), Column('id', Integer(), table=<db_dbcomment>, primary_key=True, nullable=False), Column('uuid', UUID(as_uuid=True), table=<db_dbcomment>, nullable=False, default=ColumnDefault(<function get_new_uuid>)), Column('dbnode_id', Integer(), ForeignKey('db_dbnode.id'), table=<db_dbcomment>, nullable=False), Column('ctime', DateTime(timezone=True), table=<db_dbcomment>, nullable=False, default=ColumnDefault(<function now>)), Column('mtime', DateTime(timezone=True), table=<db_dbcomment>, nullable=False, onupdate=ColumnDefault(<function now>), default=ColumnDefault(<function now>)), Column('user_id', Integer(), ForeignKey('db_dbuser.id'), table=<db_dbcomment>, nullable=False), Column('content', Text(), table=<db_dbcomment>, nullable=False, default=ColumnDefault('')), schema=None)#
__tablename__ = 'db_dbcomment'#
_sa_class_manager = {'content': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'ctime': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'dbnode': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'dbnode_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'mtime': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'user': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'user_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'uuid': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
content#
ctime#
dbnode#
dbnode_id#
id#
mtime#
user#
user_id#
uuid#

Module to manage computers for the SQLA backend.

class aiida.storage.psql_dos.models.computer.DbComputer(**kwargs)[source]#

Bases: sqlalchemy.orm.decl_api.Model

Database model to store data for aiida.orm.Computer.

Computers represent (and contain the information of) the physical hardware resources available. Nodes can be associated with computers if they are remote codes, remote folders, or processes that had run remotely.

Computers are identified within AiiDA by their label (and thus it must be unique for each one in the database), whereas the hostname is the label that identifies the computer within the network from which one can access it.

The scheduler_type column contains the information of the scheduler (and plugin) that the computer uses to manage jobs, whereas the transport_type the information of the transport (and plugin) required to copy files and communicate to and from the computer. The metadata contains some general settings for these communication and management protocols.

__init__(**kwargs)#

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

__mapper__ = <Mapper at 0x7efc12e20df0; DbComputer>#
__module__ = 'aiida.storage.psql_dos.models.computer'#
__str__()[source]#

Return str(self).

__table__ = Table('db_dbcomputer', MetaData(), Column('id', Integer(), table=<db_dbcomputer>, primary_key=True, nullable=False), Column('uuid', UUID(as_uuid=True), table=<db_dbcomputer>, nullable=False, default=ColumnDefault(<function get_new_uuid>)), Column('label', String(length=255), table=<db_dbcomputer>, nullable=False), Column('hostname', String(length=255), table=<db_dbcomputer>, nullable=False, default=ColumnDefault('')), Column('description', Text(), table=<db_dbcomputer>, nullable=False, default=ColumnDefault('')), Column('scheduler_type', String(length=255), table=<db_dbcomputer>, nullable=False, default=ColumnDefault('')), Column('transport_type', String(length=255), table=<db_dbcomputer>, nullable=False, default=ColumnDefault('')), Column('metadata', JSONB(astext_type=Text()), table=<db_dbcomputer>, nullable=False, default=ColumnDefault(<function dict>)), schema=None)#
__table_args__ = (Index('ix_pat_db_dbcomputer_label', Column('label', String(length=255), table=<db_dbcomputer>, nullable=False)),)#
__tablename__ = 'db_dbcomputer'#
_metadata#
_sa_class_manager = {'_metadata': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'description': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'hostname': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'label': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'scheduler_type': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'transport_type': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'uuid': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
description#
hostname#
id#
label#
property pk#
scheduler_type#
transport_type#
uuid#

Module to manage computers for the SQLA backend.

class aiida.storage.psql_dos.models.group.DbGroup(**kwargs)[source]#

Bases: sqlalchemy.orm.decl_api.Model

Database model to store aiida.orm.Group data.

A group may contain many different nodes, but also each node can be included in different groups.

Users will typically identify and handle groups by using their label (which, unlike the labels in other models, must be unique). Groups also have a type, which serves to identify what plugin is being instanced, and the extras property for users to set any relevant information.

__init__(**kwargs)#

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

__mapper__ = <Mapper at 0x7efc12deb6a0; DbGroup>#
__module__ = 'aiida.storage.psql_dos.models.group'#
__str__()[source]#

Return str(self).

__table__ = Table('db_dbgroup', MetaData(), Column('id', Integer(), table=<db_dbgroup>, primary_key=True, nullable=False), Column('uuid', UUID(as_uuid=True), table=<db_dbgroup>, nullable=False, default=ColumnDefault(<function get_new_uuid>)), Column('label', String(length=255), table=<db_dbgroup>, nullable=False), Column('type_string', String(length=255), table=<db_dbgroup>, nullable=False, default=ColumnDefault('')), Column('time', DateTime(timezone=True), table=<db_dbgroup>, nullable=False, default=ColumnDefault(<function now>)), Column('description', Text(), table=<db_dbgroup>, nullable=False, default=ColumnDefault('')), Column('extras', JSONB(astext_type=Text()), table=<db_dbgroup>, nullable=False, default=ColumnDefault(<function dict>)), Column('user_id', Integer(), ForeignKey('db_dbuser.id'), table=<db_dbgroup>, nullable=False), schema=None)#
__table_args__ = (UniqueConstraint(Column('label', String(length=255), table=<db_dbgroup>, nullable=False), Column('type_string', String(length=255), table=<db_dbgroup>, nullable=False, default=ColumnDefault(''))), Index('ix_pat_db_dbgroup_label', Column('label', String(length=255), table=<db_dbgroup>, nullable=False)), Index('ix_pat_db_dbgroup_type_string', Column('type_string', String(length=255), table=<db_dbgroup>, nullable=False, default=ColumnDefault(''))))#
__tablename__ = 'db_dbgroup'#
_sa_class_manager = {'dbnodes': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'description': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'extras': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'label': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'time': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'type_string': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'user': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'user_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'uuid': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
dbnodes#
description#
extras#
id#
label#
property pk#
time#
type_string#
user#
user_id#
uuid#
class aiida.storage.psql_dos.models.group.DbGroupNode(**kwargs)[source]#

Bases: sqlalchemy.orm.decl_api.Model

Database model to store group-to-nodes relations.

__init__(**kwargs)#

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

__mapper__ = <Mapper at 0x7efc12dde640; DbGroupNode>#
__module__ = 'aiida.storage.psql_dos.models.group'#
__table__ = Table('db_dbgroup_dbnodes', MetaData(), Column('id', Integer(), table=<db_dbgroup_dbnodes>, primary_key=True, nullable=False), Column('dbnode_id', Integer(), ForeignKey('db_dbnode.id'), table=<db_dbgroup_dbnodes>, nullable=False), Column('dbgroup_id', Integer(), ForeignKey('db_dbgroup.id'), table=<db_dbgroup_dbnodes>, nullable=False), schema=None)#
__table_args__ = (UniqueConstraint(Column('dbgroup_id', Integer(), ForeignKey('db_dbgroup.id'), table=<db_dbgroup_dbnodes>, nullable=False), Column('dbnode_id', Integer(), ForeignKey('db_dbnode.id'), table=<db_dbgroup_dbnodes>, nullable=False)),)#
__tablename__ = 'db_dbgroup_dbnodes'#
_sa_class_manager = {'dbgroup_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'dbnode_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
dbgroup_id#
dbnode_id#
id#

Module to manage logs for the SQLA backend.

class aiida.storage.psql_dos.models.log.DbLog(**kwargs)[source]#

Bases: sqlalchemy.orm.decl_api.Model

Database model to data for aiida.orm.Log, corresponding to aiida.orm.ProcessNode.

__init__(**kwargs)#

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

__mapper__ = <Mapper at 0x7efc12df8910; DbLog>#
__module__ = 'aiida.storage.psql_dos.models.log'#
__str__()[source]#

Return str(self).

__table__ = Table('db_dblog', MetaData(), Column('id', Integer(), table=<db_dblog>, primary_key=True, nullable=False), Column('uuid', UUID(as_uuid=True), table=<db_dblog>, nullable=False, default=ColumnDefault(<function get_new_uuid>)), Column('time', DateTime(timezone=True), table=<db_dblog>, nullable=False, default=ColumnDefault(<function now>)), Column('loggername', String(length=255), table=<db_dblog>, nullable=False), Column('levelname', String(length=50), table=<db_dblog>, nullable=False), Column('dbnode_id', Integer(), ForeignKey('db_dbnode.id'), table=<db_dblog>, nullable=False), Column('message', Text(), table=<db_dblog>, nullable=False, default=ColumnDefault('')), Column('metadata', JSONB(astext_type=Text()), table=<db_dblog>, nullable=False, default=ColumnDefault(<function dict>)), schema=None)#
__table_args__ = (Index('ix_pat_db_dblog_loggername', Column('loggername', String(length=255), table=<db_dblog>, nullable=False)), Index('ix_pat_db_dblog_levelname', Column('levelname', String(length=50), table=<db_dblog>, nullable=False)))#
__tablename__ = 'db_dblog'#
_metadata#
_sa_class_manager = {'_metadata': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'dbnode': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'dbnode_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'levelname': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'loggername': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'message': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'time': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'uuid': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
dbnode#
dbnode_id#
id#
levelname#

How critical the message is

loggername#

What process recorded the message

message#
time#
uuid#

Module to manage nodes for the SQLA backend.

Bases: sqlalchemy.orm.decl_api.Model

Database model to store links between aiida.orm.Node.

Each entry in this table contains not only the id information of the two nodes that are linked, but also some extra properties of the link themselves. This includes the type of the link (see the Concepts section for all possible types) as well as a label which is more specific and typically determined by the procedure generating the process node that links the data nodes.

__init__(**kwargs)#

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

__mapper__ = <Mapper at 0x7efc12da5430; DbLink>#
__module__ = 'aiida.storage.psql_dos.models.node'#
__str__()[source]#

Return str(self).

__table__ = Table('db_dblink', MetaData(), Column('id', Integer(), table=<db_dblink>, primary_key=True, nullable=False), Column('input_id', Integer(), ForeignKey('db_dbnode.id'), table=<db_dblink>, nullable=False), Column('output_id', Integer(), ForeignKey('db_dbnode.id'), table=<db_dblink>, nullable=False), Column('label', String(length=255), table=<db_dblink>, nullable=False), Column('type', String(length=255), table=<db_dblink>, nullable=False), schema=None)#
__table_args__ = (Index('ix_pat_db_dblink_label', Column('label', String(length=255), table=<db_dblink>, nullable=False)), Index('ix_pat_db_dblink_type', Column('type', String(length=255), table=<db_dblink>, nullable=False)))#
__tablename__ = 'db_dblink'#
_sa_class_manager = {'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'input': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'input_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'label': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'output': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'output_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'type': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
id#
input#
input_id#
label#
output#
output_id#
type#
class aiida.storage.psql_dos.models.node.DbNode(**kwargs)[source]#

Bases: sqlalchemy.orm.decl_api.Model

Database model to store data for aiida.orm.Node.

Each node can be categorized according to its node_type, which indicates what kind of data or process node it is. Additionally, process nodes also have a process_type that further indicates what is the specific plugin it uses.

Nodes can also store two kind of properties:

  • attributes are determined by the node_type, and are set before storing the node and can’t be modified afterwards.

  • extras, on the other hand, can be added and removed after the node has been stored and are usually set by the user.

__init__(**kwargs)#

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

__mapper__ = <Mapper at 0x7efc12d92640; DbNode>#
__module__ = 'aiida.storage.psql_dos.models.node'#
__str__()[source]#

Get string object out of DbNode object.

__table__ = Table('db_dbnode', MetaData(), Column('id', Integer(), table=<db_dbnode>, primary_key=True, nullable=False), Column('uuid', UUID(as_uuid=True), table=<db_dbnode>, nullable=False, default=ColumnDefault(<function get_new_uuid>)), Column('node_type', String(length=255), table=<db_dbnode>, nullable=False, default=ColumnDefault('')), Column('process_type', String(length=255), table=<db_dbnode>), Column('label', String(length=255), table=<db_dbnode>, nullable=False, default=ColumnDefault('')), Column('description', Text(), table=<db_dbnode>, nullable=False, default=ColumnDefault('')), Column('ctime', DateTime(timezone=True), table=<db_dbnode>, nullable=False, default=ColumnDefault(<function now>)), Column('mtime', DateTime(timezone=True), table=<db_dbnode>, nullable=False, onupdate=ColumnDefault(<function now>), default=ColumnDefault(<function now>)), Column('attributes', JSONB(astext_type=Text()), table=<db_dbnode>, default=ColumnDefault(<function dict>)), Column('extras', JSONB(astext_type=Text()), table=<db_dbnode>, default=ColumnDefault(<function dict>)), Column('repository_metadata', JSONB(astext_type=Text()), table=<db_dbnode>, nullable=False, default=ColumnDefault(<function dict>)), Column('dbcomputer_id', Integer(), ForeignKey('db_dbcomputer.id'), table=<db_dbnode>), Column('user_id', Integer(), ForeignKey('db_dbuser.id'), table=<db_dbnode>, nullable=False), schema=None)#
__table_args__ = (Index('ix_pat_db_dbnode_label', Column('label', String(length=255), table=<db_dbnode>, nullable=False, default=ColumnDefault(''))), Index('ix_pat_db_dbnode_node_type', Column('node_type', String(length=255), table=<db_dbnode>, nullable=False, default=ColumnDefault(''))), Index('ix_pat_db_dbnode_process_type', Column('process_type', String(length=255), table=<db_dbnode>)))#
__tablename__ = 'db_dbnode'#
_sa_class_manager = {'attributes': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'ctime': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'dbcomputer': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'dbcomputer_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'description': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'extras': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'label': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'mtime': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'node_type': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'outputs_q': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'process_type': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'repository_metadata': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'user': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'user_id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'uuid': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
attributes#
ctime#
dbcomputer#
dbcomputer_id#
description#
extras#
get_simple_name(invalid_result=None)[source]#

Return a string with the last part of the type name.

If the type is empty, use ‘Node’. If the type is invalid, return the content of the input variable invalid_result.

Parameters

invalid_result – The value to be returned if the node type is not recognized.

id#
property inputs#
label#
mtime#
node_type#
property outputs#
outputs_q#
property pk#
process_type#
repository_metadata#
user#
user_id#
uuid#

Module to manage node settings for the SQLA backend.

class aiida.storage.psql_dos.models.settings.DbSetting(**kwargs)[source]#

Bases: sqlalchemy.orm.decl_api.Model

Database model to store global settings.

__init__(**kwargs)#

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

__mapper__ = <Mapper at 0x7efc12e74610; DbSetting>#
__module__ = 'aiida.storage.psql_dos.models.settings'#
__str__()[source]#

Return str(self).

__table__ = Table('db_dbsetting', MetaData(), Column('id', Integer(), table=<db_dbsetting>, primary_key=True, nullable=False), Column('key', String(length=1024), table=<db_dbsetting>, nullable=False), Column('val', JSONB(astext_type=Text()), table=<db_dbsetting>, default=ColumnDefault({})), Column('description', Text(), table=<db_dbsetting>, nullable=False, default=ColumnDefault('')), Column('time', DateTime(timezone=True), table=<db_dbsetting>, nullable=False, onupdate=ColumnDefault(<function now>), default=ColumnDefault(<function now>)), schema=None)#
__table_args__ = (Index('ix_pat_db_dbsetting_key', Column('key', String(length=1024), table=<db_dbsetting>, nullable=False)),)#
__tablename__ = 'db_dbsetting'#
_sa_class_manager = {'description': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'key': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'time': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'val': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
description#
id#
key#
time#
val#

Module to manage users for the SQLA backend.

class aiida.storage.psql_dos.models.user.DbUser(**kwargs)[source]#

Bases: sqlalchemy.orm.decl_api.Model

Database model to store data for aiida.orm.User.

Every node that is created has a single user as its author.

The user information consists of the most basic personal contact details.

__init__(**kwargs)#

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

__mapper__ = <Mapper at 0x7efc12e37eb0; DbUser>#
__module__ = 'aiida.storage.psql_dos.models.user'#
__str__()[source]#

Return str(self).

__table__ = Table('db_dbuser', MetaData(), Column('id', Integer(), table=<db_dbuser>, primary_key=True, nullable=False), Column('email', String(length=254), table=<db_dbuser>, nullable=False), Column('first_name', String(length=254), table=<db_dbuser>, nullable=False, default=ColumnDefault('')), Column('last_name', String(length=254), table=<db_dbuser>, nullable=False, default=ColumnDefault('')), Column('institution', String(length=254), table=<db_dbuser>, nullable=False, default=ColumnDefault('')), schema=None)#
__table_args__ = (Index('ix_pat_db_dbuser_email', Column('email', String(length=254), table=<db_dbuser>, nullable=False)),)#
__tablename__ = 'db_dbuser'#
_sa_class_manager = {'email': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'first_name': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'id': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'institution': <sqlalchemy.orm.attributes.InstrumentedAttribute object>, 'last_name': <sqlalchemy.orm.attributes.InstrumentedAttribute object>}#
email#
first_name#
id#
institution#
last_name#