rethinkdb 或 php 驱动程序的 where 查询

rethinkdb or where query on php driver

我正在使用 rethinkdb PHP driver 并尝试执行 or where 查询,下面是我尝试过的方法

$query = r\db('cn_chat')->table('messages')->filter(
         r\row('origin')->eq('connectnigeria')->or(r\row('origin')->eq('business'))
        )->run($conn);

但运气不好,请提供任何帮助,想法。

它returns

Fatal error: Call to undefined method r\Queries\Math\Eq::or()

根据您所附的文档 (http://danielmewes.dnsalias.net/~daniel/php-rql-api/#Math+and+logic),

应该是r或:

$query = r\db('cn_chat')->table('messages')->filter(
     r\row('origin')->eq('connectnigeria')->rOr(r\row('origin')->eq('business'))
    )->run($conn);