0

在离线 html5 项目上工作,我有以下商店:

            outreach_answers = {
                name: 'outreach_answers',
                keyPath: ['device_unique_id', 'outreach_id', 'question_id'],
                indexes: [
                    {
                        keyPath: 'outreach_id'
                    },
                    {
                        keyPath: 'section_id'
                    },
                    {
                        keyPath: 'question_id'
                    },
                    {
                        keyPath: 'answer'
                    }
                ]
            }

我需要进行这样的查询:

SELECT records FROM outreach_answers 
WHERE question_id = 12 AND section_id = 2 AND outreach_id = 'AB-56'

我能够使用的大多数方法(例如db.get()db.values()甚至db.from()...where().list())似乎都非常严格。

其中,最后一种方法似乎是最有希望的,直到我真的需要运行一个应该同时过滤的question_id查询。section_idoutreach_id

先感谢您!

4

1 回答 1

0

You can find article about multiple filtered query with YDN-DB and some tips on this answer.

于 2014-06-25T00:57:40.497 回答