P
P
Python Newbie2022-01-24 12:42:58
Python
Python Newbie, 2022-01-24 12:42:58

How to do a search in peewee python?

Hello, I want to fetch data from sqlite3 database by partial text in any case in peewee ORM. How to do it?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vladimir Kuts, 2022-01-24
@fox_12

Probably - read the documentation

D
Dr. Bacon, 2022-01-24
@bacon

your Wishlist is called not "by partial text in any case", but full-text search https://docs.peewee-orm.com/en/latest/peewee/sqlit...

S
Sergey Karbivnichy, 2022-01-24
@hottabxp

You need to enable the sqlite extension. I didn't use peewee myself, but here's what I found - SQLite Extensions(peewee)
sqlean - a huge list of extensions for sqlite. You can download both sources and so/dll/dylib. Specifically, you need a plugin called unicode .
Specifically, how to connect it to peewee - did not look. If you use the sqlite3 standard library, then like this:

import sqlite3

connection = sqlite3.connect(":memory:")
connection.enable_load_extension(True)
connection.load_extension("./unicode.dll")

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question