monitor-table-change-with-sqltabledependency | Get SQL Server notification on record table change | SQL Database library
kandi X-RAY | monitor-table-change-with-sqltabledependency Summary
kandi X-RAY | monitor-table-change-with-sqltabledependency Summary
Get SQL Server notification on record table change
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of monitor-table-change-with-sqltabledependency
monitor-table-change-with-sqltabledependency Key Features
monitor-table-change-with-sqltabledependency Examples and Code Snippets
Community Discussions
Trending Discussions on monitor-table-change-with-sqltabledependency
QUESTION
I've got an F# project that loads some files to an outside subsystem and then uses Table Dependency to wait for some rows to be added to a table as a side effect.
Table Dependency is used in the type below to watch for the db changes. It fires a custom event when a row is added/changed/whatever:
...ANSWER
Answered 2018-Nov-05 at 23:04Given that you are using Observable.takeWhile
in your example, I'm assuming that you are using the FSharp.Control.Reactive wrapper to get access to the full range of reactive combinators.
Your approach has some good ideas, such as using takeWhile
to wait until you collect all IDs, but the use of mutation is quite unfortunate - it might not even be safe to do this because of possible race conditions.
A nice alternative is to use one of the various scan
function to collect a state as the events happen. You can use Observable.scanInit
to start with an empty set and add all IDs; followed by Observable.takeWhile
to keep accepting events until you have all the IDs you're waiting for. To actually wait (and block), you can use Observable.wait
. Something like this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install monitor-table-change-with-sqltabledependency
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page