MySQL侦听通知等效 [英] MySQL listen notify equivalent

查看:107
本文介绍了MySQL侦听通知等效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否存在PostgresQL的通知监听?基本上,我需要在Java应用程序服务器中监听触发器.

Is there an equivalent of PostgresQL's notify and listen in MySQL? Basically, I need to listen to triggers in my Java application server.

推荐答案

否,还没有像这样的内置函数. 您需要使用诸如"read" 0/1之类的预制标志进行选择来"ping"(每1-5秒)数据库.

No, there aren't any built-in functions like these yet. You need to "ping" (every 1-5 seconds) database with selecting with premade flag like "read" 0/1. After

SELECT * FROM mytable WHERE read = 0

使用读取= 1更新它

这篇关于MySQL侦听通知等效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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