On 2019-09-20 12:16, Rustam rusta...@ukr.net [firebird-support] wrote:
> I am also looking for somthing like that. Typical task - inform
> clients about changes in some records: client need an record ID.
> 
>> It's hardly compatible with the existing events architecture and
>> API, so
>> I'm still somewhat sceptical about its implementation.
>> 
>> Dmitry
> 
> I don't now API details, but my idea: what if we can specify 'mask' in
> Event name on clients, e.g.  "ORDER_CHANGED*"?
> 
>> 
> 
> Then client subscribes to event "ORDER_CHANGED*", and his code receive
> all events, who name is starting with "ORDER_CHANGED".
> 
> On DB side in trigger we can fire event like that:
> 
> POST_EVENT('ORDER_CHANGED' || new.ID)
> 
> In client's code he get an actual event name, like '
> ORDER_CHANGED9999'. Then he can parse received string as he need.

You could try and use Firebird 3's RDB$RECORD_VERSION to check what 
changed. However that approach has its flaws, because it is possible 
that 'older' record versions will appear when an 'older' transaction is 
committed after a 'newer' transaction with a higher transaction id, and 
depending on how you use the record version pseudo-column, you might 
miss those records.

Mark
    • RE: ... 'Andrew Zenz' and...@aimsoftware.com.au [firebird-support]
  • Re: [fire... Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
  • RE: [fire... liviuslivius liviusliv...@poczta.onet.pl [firebird-support]
    • RE: ... 'Andrew Zenz' and...@aimsoftware.com.au [firebird-support]
    • Re: ... Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
      • ... 'Andrew Zenz' and...@aimsoftware.com.au [firebird-support]
      • ... 'P-Soft - Fabio Codebue' f.code...@p-soft.biz [firebird-support]
        • ... Dmitry Yemanov dim...@users.sourceforge.net [firebird-support]
          • ... 'P-Soft - Fabio Codebue' f.code...@p-soft.biz [firebird-support]
          • ... Rustam rusta...@ukr.net [firebird-support]
            • ... Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
            • ... Dmitry Yemanov dim...@users.sourceforge.net [firebird-support]
      • ... Mikkel Andersen mik...@cito.dk [firebird-support]

Reply via email to