louisganlu's recent timeline updates
louisganlu

louisganlu

V2EX member #236484, joined on 2017-06-21 12:21:56 +08:00
louisganlu's recent replies
May 30, 2018
Replied to a topic by simple2025 › Python › 有使用过 Python tinydb 这个库的吗,求助
http://tinydb.readthedocs.io/en/latest/usage.html
The second, traditional way of constructing queries is as follows:

>>> from tinydb import where
>>> db.search(where('field') == 'value')
Using where('field') is a shorthand for the following code:

>>> db.search(Query()['field'] == 'value')
Accessing nested fields with this syntax can be achieved like this:

>>> db.search(where('birthday').year == 1900)
>>> db.search(where('birthday')['year'] == 1900)
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   5365 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 14ms · UTC 09:36 · PVG 17:36 · LAX 02:36 · JFK 05:36
♥ Do have faith in what you're doing.