Search code examples
memgraphdb

Is there a way to create database trigger in Memgraph by using Python-native function calls?


I'd like to create and use database triggers in Memgraph. I'm using Python, so the best possible solution for me would be something that uses Python-native function calls. Is there a such thing?


Solution

  • Yes there is. please take a look at GQLAlchemy because it's exactly what you are looking for. E.g. for triggers, there is a DatabaseTrigger class under gqlalchemy/models.py which is actually creating the database trigger under the hood (you don't have to know Cypher for that)