Share via


SqliteConnectionStringBuilder Class

Definition

Provides a simple way to create and manage the contents of connection strings used by SqliteConnection.

public class SqliteConnectionStringBuilder : System.Data.Common.DbConnectionStringBuilder
type SqliteConnectionStringBuilder = class
    inherit DbConnectionStringBuilder
Public Class SqliteConnectionStringBuilder
Inherits DbConnectionStringBuilder
Inheritance
SqliteConnectionStringBuilder

Constructors

SqliteConnectionStringBuilder()

Initializes a new instance of the SqliteConnectionStringBuilder class.

SqliteConnectionStringBuilder(String)

Initializes a new instance of the SqliteConnectionStringBuilder class.

Properties

Cache

Gets or sets the caching mode used by the connection.

DataSource

Gets or sets the database file.

DefaultTimeout

Gets or sets the default DefaultTimeout value.

ForeignKeys

Gets or sets a value indicating whether to enable foreign key constraints. When true, PRAGMA foreign_keys = 1 is sent immediately after opening the connection. When false, PRAGMA foreign_keys = 0 is sent. When null, no pragma is sent. There is no need to enable foreign keys if, like in e_sqlite3, SQLITE_DEFAULT_FOREIGN_KEYS was used to compile the native library.

Item[String]

Gets or sets the value associated with the specified key.

Keys

Gets a collection containing the keys used by the connection string.

Mode

Gets or sets the connection mode.

Password

Gets or sets the encryption key. Warning, this has no effect when the native SQLite library doesn't support encryption. When specified, PRAGMA key is sent immediately after opening the connection.

Pooling

Gets or sets a value indicating whether the connection will be pooled.

RecursiveTriggers

Gets or sets a value indicating whether to enable recursive triggers. When true, PRAGMA recursive_triggers is sent immediately after opening the connection. When false, no pragma is sent.

Values

Gets a collection containing the values used by the connection string.

Methods

Clear()

Clears the contents of the builder.

ContainsKey(String)

Determines whether the specified key is used by the connection string.

Remove(String)

Removes the specified key and its value from the connection string.

ShouldSerialize(String)

Determines whether the specified key should be serialized into the connection string.

TryGetValue(String, Object)

Gets the value of the specified key if it is used.

Applies to