mirror of
https://github.com/safing/portmaster
synced 2025-09-10 23:14:35 +00:00
Add option to use prepared statements for SQLite PutMany
This commit is contained in:
parent
2c8ab54104
commit
9b12dfffc2
3 changed files with 216 additions and 0 deletions
|
@ -205,6 +205,11 @@ func (db *SQLite) PutMany(shadowDelete bool) (chan<- record.Record, <-chan error
|
|||
db.wg.Add(1)
|
||||
defer db.wg.Done()
|
||||
|
||||
// Check if we should use prepared statement optimized inserting.
|
||||
if UsePreparedStatements {
|
||||
return db.putManyWithPreparedStmts(shadowDelete)
|
||||
}
|
||||
|
||||
batch := make(chan record.Record, 100)
|
||||
errs := make(chan error, 1)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue