SQLDependency on a MariaDB/MySQL database(MariaDB/MySQL 数据库上的 SQLDependency)
问题描述
我开发了一个需要显示实时信息的 Web 仪表板 (ASP.NET C#).通常我使用 SQLServer,所以 SignalR + SQLDependency 的组合效果很好.但是现在我必须使用 MariaDB/MySQL 数据库,我找不到与 SQLDependency 等效的库.通知数据库更改是否有技巧"?
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?
我找到了这个库:https://www.devart.com/dotconnect/mysql/docs/Devart.Data.MySql~Devart.Data.MySql.MySqlDependency.html 但它不是免费的......
I found this library : https://www.devart.com/dotconnect/mysql/docs/Devart.Data.MySql~Devart.Data.MySql.MySqlDependency.html but it's not free ...
推荐答案
在 MySQL 中,您可能会利用触发器和用户定义函数 (UDF).
In MySQL, you could potentially utilize a trigger and a user-defined function (UDF).
另一个选项是 MySqlDependency,但我认为这需要购买驱动程序:
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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:MariaDB/MySQL 数据库上的 SQLDependency
基础教程推荐
- 当值可以是对象或空数组时反序列化 JSON 2022-01-01
- 如何使用 .Net 检查 Active Directory 服务器是否已启动并正在运行? 2022-01-01
- WPF 模态进度窗口 2022-01-01
- Azure Functions:CosmosDBTrigger 未在 Visual Studio 中触发 2022-01-01
- Moq It.Is<>不匹配 2022-01-01
- 我应该在后面的代码中直接使用 Linq To SQL 还是使 2022-01-01
- C# 从 List<List<int>> 中删除重 2022-01-01
- 禁止输入少量字符,例如'<'、'&a 2022-01-01
- 如果有人提交恶意软件Nuget包怎么办? 2022-01-01
- .NET SerialPort DataReceived 事件未触发 2022-01-01
