soci icon indicating copy to clipboard operation
soci copied to clipboard

Support for database notification

Open NobodyXu opened this issue 4 years ago • 5 comments

Several database supported by SOCI, including

It is useful to clients who are interested in particular tables and need to keep the information on that table up-to-date.

I think a uniformed API in SOCI that implements notification portable, either by local support or via manual polling, might prove to be useful for users of this library.

NobodyXu avatar Oct 26 '20 08:10 NobodyXu

This would be definitely very nice to have, although we'd still need to provide a polling-based generic fallback to make it usable with other databases.

Unfortunately I don't foresee having time to work on this myself in the near future, but any contributions would be very welcome.

vadz avatar Oct 28 '20 22:10 vadz

I am not familiar with SOCI, but I will try understanding it and add a callback when I am free.

NobodyXu avatar Oct 30 '20 05:10 NobodyXu

I have implemented this and a few other firebird features for my own needs, feel free to use it! https://github.com/IMAXAGaming/soci contains:

  • firebird transaction flags
  • commit-retain and rollback-retain
  • firebird events

TwentyPast4 avatar Jul 07 '22 14:07 TwentyPast4

Thanks, it's definitely a good start, but we need to at least check if this API is implementable with the other systems mentioned above.

And, of course, we need docs and tests if this is to be integrate into the official SOCI.

vadz avatar Jul 09 '22 15:07 vadz

Thanks, it's definitely a good start, but we need to at least check if this API is implementable with the other systems mentioned above.

And, of course, we need docs and tests if this is to be integrate into the official SOCI.

Yeah definitely. I've looked around a bit to see if some of this could be generalized, and I think it could. I sadly don't have any time I could take to do this, so I suggest that if wanted, someone take this and work it into something more appropriate for a PR.

Great work on this lib though! ✌️

TwentyPast4 avatar Jul 09 '22 16:07 TwentyPast4