SQLDependency on a MariaDB/MySQL database

倾然丶 夕夏残阳落幕 提交于 2019-12-13 03:56:31

问题


I developed a web dashboard that needs to display real-time information (ASP.NET C #). Usually I use SQLServer, so the combination SignalR + SQLDependency works very well. But now I have to use a MariaDB / MySQL database and I can not find a library equivalent to SQLDependency. Is there a "trick" for notifying a change in a database?

I found this library : https://www.devart.com/dotconnect/mysql/docs/Devart.Data.MySql~Devart.Data.MySql.MySqlDependency.html but it's not free ...


回答1:


In MySQL, you could potentially utilize a trigger and a user-defined function (UDF).

Another option would be MySqlDependency, however I believe that would require a purchased driver:

https://dev.mysql.com/doc/refman/8.0/en/create-trigger.html

https://www.devart.com/dbx/mysql/



来源:https://stackoverflow.com/questions/51292906/sqldependency-on-a-mariadb-mysql-database

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!