SQL Dependency concept in the GOlang

I am working on Golang API with MS SQL Server database . I want to achieve the SQL Dependency concept in the golang.

Is it possible or not ? if it possible , please give me the solution.

If you have any other solution like SQL Dependency in golang , please let me know,

I want to Listen the SQL Server database changes from GOlang API.

Please give me the solution as soon as possible.

This is a cool SQL feature, namely you can “listen” for any changes in the database.

I have found this forum post: sql - How can I catch an event of a new postgreSQL record with golang - Stack Overflow

The second reply recommends GitHub - lib/pq: Pure Go Postgres driver for database/sql , and even has a small example Go Playground - The Go Programming Language

I am looking the solution for MS SQL Server Database
Please give me the solution for MS SQL Table Dependency in Golang

First off: you’re going to want the microsoft/go-mssqldb SQL driver to connect to a MSSQL DB. Second: SqlDependency isn’t a MSSQL feature as far as I know. I believe it is an abstraction in the .NET framework. You could dig around the source to see what they’re doing:

The short answer is: it’s possible, but it’s not going to be easy. It might be better to use an approach like @heidi linked to, depending on your requirements.

Could you give me the solution for below requirement ?

I want to Listen the SQL Server database changes from Golang API.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.