查找空闲时间段的 Firestore 查询

问题描述

我有一个 mysql 查询,可以在 mysql 中找到空闲时间段,我需要做同样的事情是 Firestore。我已经检查了互联网,但找不到 Firestore 的时间段查询示例。这是 MySQL 查询。基本上是一张带有 datetimeStart 和 datetimeEnd 的表。我没有看到 firestore 文档发生任何变化。那么服务器上的 firestore 中的等价物最好是什么?

  $freeSots = $db->raw()
        ->bind( ":today_start",$today_start )
        ->bind( ":today_end",$today_end )
        ->exec( "SELECT a.`interviewDateTimeEnd` AS free_after
                    FROM applicationForm a
                    WHERE NOT EXISTS
                    (
                       SELECT 1
                         FROM applicationForm b
                        WHERE b.`interviewDateTime` 
                      BETWEEN a.`interviewDateTimeEnd` 
                          AND a.`interviewDateTimeEnd` + INTERVAL 20 MINUTE
                    )
                    
         AND a.`interviewDateTimeEnd` BETWEEN :today_start AND :today_end 
         ORDER BY a.`interviewDateTimeEnd` DESC " )->fetchAll();

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...