Replies: 4 comments
-
It looks like the driver supports setting up the subscription but not consuming the changes, which are delivered by Service Broker. ADO.Net has a process-wide listener implemented here https://github.com/dotnet/SqlClient/blob/main/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlDependencyListener.cs I'd say the Go driver implementation is far from complete. |
Beta Was this translation helpful? Give feedback.
-
Thank you for you analysis!
Depends on the expected convenience level. Seen from your mentioned example of https://github.com/dotnet/SqlClient/blob/main/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlDependencyListener.cs and the boilerplate the .net class takes care of - yes. Given that consuming shouldn't be more than But alas no public golang examples. |
Beta Was this translation helpful? Give feedback.
-
any update on how to use it? |
Beta Was this translation helpful? Give feedback.
-
Just search for "RECEIVE TOP language:go" on github This one pops up |
Beta Was this translation helpful? Give feedback.
-
https://learn.microsoft.com/en-us/dotnet/framework/data/adonet/sql/detecting-changes-with-sqldependency provides an example how to register to mssql query notifications.
This driver supports Query notifications
https://github.com/microsoft/go-mssqldb#features
It is uncelar how this feature can be used in golang, a sample would be welcomed.
Beta Was this translation helpful? Give feedback.
All reactions