freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Richard Hughes <cyreve AT gmail.com>
- To: freetds AT lists.ibiblio.org
- Subject: [freetds] MS query notifications patch
- Date: Wed, 16 Apr 2014 19:12:44 +0100
Hi all,
I needed support for SQL Server 2005's Query Notifications feature, so
here's a patch against tip.
I've only given the patch a light sprinkling of testing so far, but
could I ask somebody to review it and confirm that I'm on the right
track so that I can create a v2 patch that is (hopefully) mergeable?
Both the Microsoft API and the TDS implementation feel extremely
kludgy to me and hence some of that kludginess needed to be reflected
in the patch; sorry about that, but don't shoot the messenger.
About Query Notifications:
Query Notifications are designed to support client-side caching of
datasets by providing a mechanism to allow the application to be
notified whenever its cache may have become out of date (i.e. because
somebody updated the underlying table(s)). Fundamentally the feature
works by delivering a query to the server and, rather than executing
it, the server does internal magic to register that query and a
user-specified cookie. When the result set that the query would have
returned (had it actually been executed) changes, the cookie is
delivered back to the caller through a WAITFOR/RECEIVE statement.
User-level doc: http://technet.microsoft.com/en-us/library/ms130764.aspx
Protocol doc: http://msdn.microsoft.com/en-us/library/dd304949.aspx
Only the registering of the query and cookie with the server needs
FreeTDS changes. The WAITFOR statement is just executed as a normal
statement with a normal result set.
Richard.
Attachment:
freetds-mssql-query-notifications-v1.diff
Description: Binary data
-
[freetds] MS query notifications patch,
Richard Hughes, 04/16/2014
-
Re: [freetds] MS query notifications patch,
Frediano Ziglio, 04/18/2014
- Re: [freetds] MS query notifications patch, Richard Hughes, 04/23/2014
-
Re: [freetds] MS query notifications patch,
Frediano Ziglio, 04/18/2014
Archive powered by MHonArc 2.6.24.