Appearance
Configuration Class
Definition
Configuration for Database operations. Overrides any conflicting property names from JASE Core Config
- Namespace:
JASE.Database - Assembly:
JASE.Database.dll
Properties
| Name | Description |
|---|---|
ApplicationName | Application Name used in connection strings for supported providers |
CacheMode | Specifies the Cache Mode for caching of database operational data (Default: Isolated) |
CommandHistoryMaxSize | Maximum number of commands tracked in a Connection's CommandHistory property (Default: 500) |
DefaultCharacterMaxLength | Default length of character fields if not expressly set (Default: 255) |
DefaultCommandHistoryTracking | The default value for tracking command history on a Connection instance (Default: false) |
DefaultCommandTimeout | The default timeout in seconds when executing a database command (Default: 60 seconds) |
DefaultDiagnostics | Default Diagnostics level for SQL performance tracking (Default: Off) |
DefaultGracefulReaderShutdown | The default value for handling open Readers when a database Connection instance is closed (Default: true) |
DefaultIndexFillFactor | Default Fill Factor used when creating an index with an unspecified Fill Factor (Default: 85) |
DefaultLogConfig | Default logging configuration for a database connection |
DefaultTableInfoOptions | Default values for deriving TableInfo from a Type |
ExposeConnectionStrings | The value for deciding if ConnectionStrings are exposed on Connection instances (Default: false) |
LockEntranceTimeout | Timeout when entering a lock (specified in milliseconds, default: 3000) |
LogFactory | Optional library-wide logger factory for JASE.Database sessions. |
MemoryCachePercent | Returns the percentage of memory (Default: 5%) |
NamingStrategy | Specifies the naming strategy to use when generating SQL (default: snake_case). |
PostgreSqlConnectionDefaults | Default values for a generated PostgreSQL Connection String |
PostgreSqlDefaultSslMode | Value for SSL Mode key in a generated PostgreSQL connection string (Default: Prefer). |
PostgreSqlGeneratorDefaults | Default values for a PostgreSQL Generator |
PostgreSqlStatTupleInstalled | Indicates install status of PostgreSql extention pgstattuple |
PrettyIndent | Indentation used for PrettySQl (Default: 4 spaces) |
PrettySQL | Generate more readable SQL statements (Default: true) |
PrimaryJoinAlias | Table alias used for the PRIMARY table in a JOIN operation (Default: PRIMARYTABLE) |
ReservedMemoryCacheBytes | Returns the number of bytes that should be reserved for MemoryCache |
SqlServerConnectionDefaults | Default values for a generated SQL Server Connection String |
SqlServerGeneratorDefaults | Default values for a SQL Server Generator |
SqlServerTrustServerCertificate | Trust the SQL Server's certificate, even if it's self-signed or not issued by a trusted Certificate Authority (CA) (Default: false) |
TableInfoCacheDuration | TimeSpan reprensting how long TableInfo data should be retained in memory cache (Default: 60 minutes) |
Methods
| Name | Description |
|---|---|
void SetApplicationName(string value) | Set the value for ApplicationName property |
void SetCacheMode(CacheMode cacheMode) | Sets the value CacheMode |
bool SetCommandHistoryMaxSize(int value) | Set the value for MaxCommandHistorySize Must be a non-negative number and less than |
void SetDefaultCharacterMaxLength(int value) | Set the value for DefaultCharacterMaxLength |
void SetDefaultCommandHistoryTracking(bool value) | Set the value for DefaultCommandHistoryTracking |
void SetDefaultCommandTimeout(int value) | Set the value for DefaultCommandTimeout |
void SetDefaultDiagnostics(Diagnostics level) | Set the value for DefaultDiagnostics |
void SetDefaultGracefulReaderShutdown(bool value) | Set the value for DefaultGracefulReaderShutdown |
bool SetDefaultIndexFillFactor(int value) | Sets the global default fill factor to be used when creating indexes, including auto-increment column indexes, if no specific value is set. DefaultIndexFillFactor |
void SetDefaultTableInfoOptions(TableInfoOptions options) | Set the value for DefaultTableInfoOptions |
void SetExposeConnectionStrings(bool value) | Set the value for ExposeConnectionStrings |
bool SetLockEntranceTimeout(int value) | Sets the lock entrance timeout in milliseconds. Must be non-negative. |
void SetLogFactory(ILoggerFactory factory) | Sets the library-wide logger factory for JASE.Database. |
bool SetMemoryCachePercent(int value) | Sets the value for MemoryCachePercent. Must be in the range of 1-50. |
bool SetNamingStrategy(NamingStrategy value) | Sets the value for NamingStrategy - Also updates NamingStrategy default for built-in generators |
void SetPostgreSqlConnectionDefaults(string defaults) | Set the values for PostgreSqlConnectionDefaults |
void SetPostgreSqlDefaultSslMode(PostgreSqlSslMode mode) | Sets PostgreSqlDefaultSslMode and keeps PostgreSqlConnectionDefaults in sync when that defaults dictionary already contains an SSL Mode entry. |
void SetPostgreSqlGeneratorDefaults(PostgreSqlGeneratorOptions options) | Sets the value for PostgreSqlGeneratorDefaults |
void SetPostgreSqlStatTupleInstalled(bool value) | Set the value for PostgreSqlStatTupleInstalled |
void SetPrettySQL(bool value) | Sets the value for PrettySQL |
void SetPrimaryJoinAlias(string alias) | Sets the value for PrimaryJoinAlias |
void SetSqlServerConnectionDefaults(string defaults) | Set the values for SqlServerConnectionDefaults |
void SetSqlServerGeneratorDefaults(SqlServerGeneratorOptions options) | Set the value for SqlServerGeneratorDefaults |
void SetSqlServerTrustServerCertificate(bool value) | Set the value for SqlServerTrustServerCertificate |
bool SetTableInfoCacheDuration(int minutes) | Update the TableInfoCacheDuration based on the number of minutes. Must be in the range of 1-10,080 (1 week) |