noctis.repository.neo4j.neo4j_queries.AbstractQuery¶
- pydantic model noctis.repository.neo4j.neo4j_queries.AbstractQuery[source]¶
Abstract class representing a query
Show JSON schema
{ "title": "AbstractQuery", "description": "Abstract class representing a query", "type": "object", "properties": { "query": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "string" } ], "title": "Query" }, "graph_schema": { "anyOf": [ { "$ref": "#/$defs/GraphSchema" }, { "type": "null" } ], "default": { "base_nodes": { "chemical_equation": "ChemicalEquation", "molecule": "Molecule" }, "base_relationships": { "product": { "end_node": "molecule", "start_node": "chemical_equation", "type": "PRODUCT" }, "reactant": { "end_node": "chemical_equation", "start_node": "molecule", "type": "REACTANT" } }, "extra_nodes": {}, "extra_relationships": {} } } }, "$defs": { "GraphSchema": { "additionalProperties": false, "description": "Base model representing the schema of a NOCtis graph", "properties": { "base_nodes": { "additionalProperties": { "type": "string" }, "default": { "chemical_equation": "ChemicalEquation", "molecule": "Molecule" }, "minProperties": 2, "title": "Base Nodes", "type": "object" }, "base_relationships": { "additionalProperties": { "additionalProperties": { "type": "string" }, "type": "object" }, "default": { "product": { "end_node": "molecule", "start_node": "chemical_equation", "type": "PRODUCT" }, "reactant": { "end_node": "chemical_equation", "start_node": "molecule", "type": "REACTANT" } }, "minProperties": 2, "title": "Base Relationships", "type": "object" }, "extra_nodes": { "additionalProperties": { "type": "string" }, "title": "Extra Nodes", "type": "object" }, "extra_relationships": { "additionalProperties": { "additionalProperties": { "type": "string" }, "type": "object" }, "title": "Extra Relationships", "type": "object" } }, "title": "GraphSchema", "type": "object" } }, "required": [ "query" ] }
- Config:
arbitrary_types_allowed: bool = True
- Fields:
- Validators:
validate_query_kwargs»all fields
- field graph_schema: GraphSchema | None = GraphSchema(base_nodes={'chemical_equation': 'ChemicalEquation', 'molecule': 'Molecule'}, base_relationships={'product': {'type': 'PRODUCT', 'start_node': 'chemical_equation', 'end_node': 'molecule'}, 'reactant': {'type': 'REACTANT', 'start_node': 'molecule', 'end_node': 'chemical_equation'}}, extra_nodes={}, extra_relationships={})¶
- Validated by:
- field query: list[str] | str [Required]¶
- Validated by:
- classmethod list_arguments() dict[source]¶
Helper method to list the required and optional arguments of a query
- validator validate_query_kwargs » all fields[source]¶
Class method to validate the required and optional arguments
- parameters_embedded: ClassVar[bool]¶
- query_args_optional: ClassVar[list[str]] = []¶
- query_args_required: ClassVar[list[str]]¶
- query_name: ClassVar[str]¶
- query_type: ClassVar[str]¶