Class SplitDomainDbInserter
- Namespace
- VpnHood.Core.Filtering.Sqlite
- Assembly
- VpnHood.Core.Filtering.Sqlite.dll
Inserts domain names into a split domain database during its build.
public sealed class SplitDomainDbInserter : IDisposable
- Inheritance
-
SplitDomainDbInserter
- Implements
- Inherited Members
Remarks
SplitDomainDbBuilder makes one for its InsertDomainsAsync; the rows join the build's
transaction. It checks the build's cancellation every 20,000 rows.
Methods
Dispose()
Releases the inserter's statements.
public void Dispose()
Insert(FilterAction, string)
Inserts a domain name into a set.
public void Insert(FilterAction action, string invertedDomain)
Parameters
actionFilterActioninvertedDomainstringThe name, as NormalizeDomain(string?) gives it, with its labels reversed by InvertDomain(string):
com.exampleforexample.com.
Exceptions
- ArgumentOutOfRangeException
actionis Default.- SqliteException
SQLite refused the row.
- OperationCanceledException
The build's cancellation was requested.