Multiple instances of SQLite database open simultaneously on different threads (QT)

Is there a problem while using multiple open connections from different threads at the same time?

From what I read, it is still safe by default, but can this degrade performance rather than improve it?

+4
source share
2 answers

the documentation says:

A connection can only be used from the thread that created it. Moving connections between threads or creating requests from another thread is not supported.

, , QSqlDrivers, SQL . .

, , . docs QSqlDatabase :

QSqlDatabase .

QSqlDatabase . QSqlDatabase . , QSqlDriver.

(, QSqlDatabase), addDatabase(), (, ?) .

addDatabase() - .

Renzo , SQLite . , () , - . docs.

+1

, , , - , SQLite concurrency . SQlite :

SQLite , . . . , . , concurrency, .

SQLite - "" : , SQL " " . , concurrency ( db).

, , - , PostgreSQL.

0

Source: https://habr.com/ru/post/1598689/


All Articles