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   ·   Solana   ·   873 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 15ms · UTC 20:02 · PVG 04:02 · LAX 13:02 · JFK 16:02
♥ Do have faith in what you're doing.