apoc.trigger.stop
Syntax |
|
||
Description |
Eventually stops the given trigger. |
||
Input arguments |
Name |
Type |
Description |
|
|
The name of the database the trigger is on. |
|
|
|
The name of the trigger to drop. |
|
Return arguments |
Name |
Type |
Description |
|
|
The name of the trigger. |
|
|
|
The query belonging to the trigger. |
|
|
|
`{ phase = "before" :: ["before", "rollback", "after", "afterAsync"] } |
|
|
|
The parameters for the given Cypher statement. |
|
|
|
Whether or not the trigger was installed. |
|
|
|
Whether or not the trigger was paused. |
Enable Triggers
By default triggers are disabled.
We can enable them by setting the following property in apoc.conf
:
apoc.trigger.enabled=true
apoc.trigger.refresh=60000
Option Key | Value | Description |
---|---|---|
apoc.trigger.enabled |
true/false, default false |
Enable/Disable the feature |
apoc.trigger.refresh |
number, default 60000 |
Interval in ms after which a replication check is triggered across all cluster nodes |
Usage Examples
The There are several ways of doing this:
Moreover, the |
Installing, updating, or removing a trigger is an eventually consistent operation.
Therefore, they are not immediately added/updated/removed,
but have a refresh rate handled by the APOC configuration |
This example assumes that an apoc.trigger.install
has already been executed.
In this case, it is possible to stop the trigger by running the following query:
CALL apoc.trigger.stop('neo4j', 'count-removals');
name | query | selector | params | installed | paused |
---|---|---|---|---|---|
"count-removals" |
{} |
{} |
TRUE |
FALSE |