Skip to content
Advertisement

Tag: peewee

Is connect_timeout a valid URL parameter acquiring a connection via Peewee’s playhouse.db_url.connect?

I’m using Peewee as ORM and connect to a Postgres database (psycopg2) using the Playhouse extension db_url.connect. My URL is a vanilla postgresql://username:pass@host:port/dbname?options=… so not using pooling or anything advanced at the moment. Some times when I call connect it hangs for a long time and doesn’t come back. So I appended to my database URL the parameter &connect_timeout=3 meaning

How to correctly set the SQLITE_MAX_VARIABLE_NUMBER from a connection?

I’m using Peewee and obtain my connection from an URL like this: How can I correctly increase the SQLITE_MAX_VARIABLE_NUMBER? I am stuck in an older 2.x SQLite version and can’t upgrade unfortunately … corporate policies. I am aware that the latest versions of SQLite have increased the default limit beyond 999. Answer See the documentation here: https://www.sqlite.org/limits.html#max_variable_number You will need

Peewee – Recursive CTEs – problem with the documentation example – OperationalError no such column: base.id

I have a problem with Peewee-3 and one of the tutorials in documentation: http://docs.peewee-orm.com/en/latest/peewee/querying.html#recursive-ctes When I’m trying to run this code (nearly exact copy from doc) it’s rising an error: Exception has occurred: OperationalError no such column: base.id Here is my code (there is commented part with some testing categories): What am I doing wrong and how can I fix

Advertisement