如何从连接中正确设置 SQLITE_MAX_VARIABLE_NUMBER?

How to correctly set the SQLITE_MAX_VARIABLE_NUMBER from a connection?

我正在使用 Peewee 并通过这样的 URL 获取我的连接:

from playhouse.db_url import connect

db = connect('sqlite:///C:/some/file.db')
connection = db.connection()
connection.execute('PRAGMA foreign_keys=ON')
# How can I set the SQLITE_MAX_VARIABLE_NUMBER here?
connection.execute('?????????????????')

如何正确增加SQLITE_MAX_VARIABLE_NUMBER?我被困在较旧的 2.x SQLite 版本中,不幸的是无法升级……公司政策。我知道最新版本的 SQLite 已将默认限制提高到 999 以上。

在此处查看文档:https://www.sqlite.org/limits.html#max_variable_number

您需要重新编译 Sqlite 以提高限制。