Skip to content

AgentPrismSqliteOptions

Namespace AgentPrism · Assembly AgentPrism.Sqlite.dll

Settings for AgentPrism’s SQLite persistence layer.

public sealed class AgentPrismSqliteOptions

objectAgentPrismSqliteOptions

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Validation is done manually in AgentPrismSqliteOptionsValidator; DataAnnotations is not used.

public AgentPrismSqliteOptions()

The full path of the configuration section settings are read from.

public const string SectionName = "AgentPrism:Sqlite"

string

Whether pending migrations should be applied automatically at application startup.

public bool AutoApplyMigrations { get; set; }

bool

Upper time limit for a single SQL command (seconds). 0 means unlimited.

public int CommandTimeoutSeconds { get; set; }

int

The SQLite connection string (example: Data Source=agentprism.db).

public string? ConnectionString { get; set; }

string?

A bare Data Source=:memory: is not supported: this library opens a new connection for every operation via DbDataSource.CreateDbConnection, and in SQLite a bare :memory: gives each connection its own isolated, anonymous database — even adding Cache=Shared does not change this (only a URI-form name can be shared). Result: migrations get applied on one connection, the first query lands on a different (empty) database and crashes with “no such table”. Use the URI form for a shared in-memory database instead, e.g. Data Source=file:agentprism?mode=memory&cache=shared or Data Source=file::memory:?cache=shared. This setting is rejected during validation (AgentPrismSqliteOptionsValidator).

The prefix added to the names of AgentPrism tables. The consumer’s own tables are never touched, under any condition.

public string TablePrefix { get; set; }

string

SQLite has no schema concept; this is the SQLite equivalent (“do not touch the consumer’s schema”). The prefix goes through the SAME strict validation as PostgreSQL/SQL Server’s schema name: starts with a lowercase letter or underscore, contains lowercase letters, digits, and underscores, at most 63 characters.