MariaDB/MySQL数据库上的SQLDependency [英] SQLDependency on a MariaDB/MySQL database

查看:119
本文介绍了MariaDB/MySQL数据库上的SQLDependency的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了一个Web仪表板,该仪表板需要显示实时信息(ASP.NET C#).通常我使用SQLServer,因此SignalR + SQLDependency的组合效果很好.但是现在我必须使用MariaDB/MySQL数据库,并且找不到与SQLDependency等效的库.是否有技巧"来通知数据库中的更改?

我找到了这个库:解决方案

在MySQL中,您可能会利用触发器和用户定义函数(UDF).

另一个选项是MySqlDependency,但是我认为这将需要购买的驱动程序:

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

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

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 ...

解决方案

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/

这篇关于MariaDB/MySQL数据库上的SQLDependency的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆