How to use Postgres' NOTIFY/LISTEN from DataMapper?

23 views
Skip to first unread message

Abe Voelker

unread,
Mar 29, 2013, 3:52:06 PM3/29/13
to datam...@googlegroups.com
I'm trying to take advantage of Postgres' awesome NOTIFY/LISTEN feature to avoid polling a table for changes, but am having trouble trying to figure out how to use them from DataMapper.  With the pg driver you can call wait_for_notify, which blocks until the server sends a NOTIFY response, but how would I execute this from a DataMapper context?

Also, if anyone has any experience with the JDBC driver, is it true that it doesn't support the wait_for_notify type behavior that the pg driver does so I would be unable to avoid polling using JRuby?

Thanks!
Reply all
Reply to author
Forward
0 new messages