简体   繁体   中英

Is there liking query operator ,join query In “playhouse extensions to peewee”?

I can use total CRUD by the MySQLDatabase that imported "from peewee import *"

But when I see the "playhouse,extensions to peewee".
I prefre this CRUD by the DataSet that improted "from playhouse.dataset import DataSet".
It seems likes the "pymongo" syntax, emmmmmm. It is so convenient!!

But, I can't find the detail query in the document。 such as query operator, join query.......

like the following example:
prepare data in database:

id name
1  Tom

I want to find the name contains 'om' in database. by the "from peewee import *" way:

Owner.select().where(Owner.name.contains('om'))  

by the "from playhouse.dataset import DataSet" way:

owner = db['owner']
owner.find(??????????)     #  how to use contains  

finally I want to know that what scene I should use the DataSet's CRUD ???

The dataset API is designed for only the simplest kinds of usage. It is never intended to be a full replacement for the expressiveness of SQL.

dataset is designed to allow you to easily import/export/explore data, or work with it in a simple manner.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM