Page 1 of 1

Callback when db is updated?

Posted: Tue Jan 30, 2018 8:48 am
by jams
Hi,

I wonder if Everything SDK provides a way to be notified when the internal database is updated ? Especially I'd like to have a C# event that could do some work each time the database is updated.

Is it already possible, or is it a feature you could add?

Thanks,
Julien.

Re: Callback when db is updated?

Posted: Wed Jan 31, 2018 10:13 am
by void
Currently, no there is no callback when the database is updated.

I did implemented this for Everything 1.4, however disabled it due to poor performance.

I will be exploring plug-ins for Everything 1.5 which could be used to receive update notifications.

Re: Callback when db is updated?

Posted: Tue Jun 25, 2019 8:46 pm
by jams
Hello,
I thought I could find a workaround for this feature by creating a file watcher on everything.db to detect any change.
But sadly (probably for performance reason) the file is saved only when the client is exited.
Do you have any idea on how I could move forward on this track?

Today to detect any new/modified file I execute the same query every minutes only changing the modification date criteria. It's working but I don't like timers ...

One addition to the SDK that could be convenient is a way to get the path to the currently used database.

Any news about v1.5?

Re: Callback when db is updated?

Posted: Wed Jun 26, 2019 11:27 am
by void
Do you have any idea on how I could move forward on this track?
Currently, no.
As you have found out, the Everything.db is only saved to disk when you exit Everything.
One addition to the SDK that could be convenient is a way to get the path to the currently used database.
I'll consider an SDK call to get the database location.
Please also consider that the user may not have an Everything.db (eg: -no-db)
Thanks for the suggestion.

There's still a bit more to do for an Everything 1.5 alpha release.
I hope to update the SDK during alpha/beta stage.

Somethings I'll be looking at for Everything 1.5 SDK update:
  • "custom tasks" that can be triggered by an event (such as a file matching a filter is modified) and perform an action (such as running an bat file)
  • plug-in support for direct access to db changes.
  • IPC search watchers to trigger when a search result has changed.

Re: Callback when db is updated?

Posted: Wed Jun 26, 2019 12:55 pm
by jams
Thanks for your answer.
The three improvements you are describing should completely fulfill my needs.
I'm really looking forward to get this new version !