RDBMS Configuration
Connection properties, driver setup, and database-specific settings for RDBSource and its provider-specific subclasses.
Connection Properties
All RDBMS data sources use ConnectionProperties (TheTechIdea.Beep.ConfigUtil). Required fields:
| Property | Required | Example | Notes |
|---|---|---|---|
DataSourceType | ✅ | SqlServer | Must match an [AddinAttribute] DataSourceType |
ConnectionName | ✅ | MyProdDB | Display name in Beep tree |
Host | ✅ | localhost or IP | Omit for file-based DBs (SQLite) |
Port | 🟡 | 1433 | Default varies by engine |
Database | ✅ | AdventureWorks | Database/catalog name |
UserID | 🟡 | sa | Omit for integrated/windows auth |
Password | 🟡 | — | Stored encrypted in Beep config |
SchemaName | 🟡 | dbo | Defaults to engine-specific (dbo, public, etc.) |
ConnectionString | 🟡 | Full ADO.NET string | Overrides host/port/db/user/password if set |
Driver Configuration
Database drivers are resolved via DataSourceDriver entries in Beep config. The RDBSource uses DMEEditor.assemblyHandler.GetInstance(DataSourceDriver.DbConnectionType) to instantiate the ADO.NET connection at runtime.
| Engine | DbConnectionType | Default Port |
|---|---|---|
| SQL Server | Microsoft.Data.SqlClient.SqlConnection | 1433 |
| MySQL | MySql.Data.MySqlClient.MySqlConnection | 3306 |
| PostgreSQL | Npgsql.NpgsqlConnection | 5432 |
| Oracle | Oracle.ManagedDataAccess.Client.OracleConnection | 1521 |
| SQLite | Microsoft.Data.Sqlite.SqliteConnection | — |
Resilience Settings
Configured via properties on RDBSource:
| Setting | Default | Description |
|---|---|---|
EnableResilience | true | Enable Polly retry + circuit breaker |
MaxRetryAttempts | 3 | Exponential backoff retries |
RetryBaseDelay | 1s | Base delay before first retry |
CircuitBreakerThreshold | 5 | Failures before opening circuit |
CircuitBreakerDuration | 30s | Time circuit stays open |
HealthCheckTimeout | 5s | Timeout for connection health ping |
Cache Settings
| Setting | Default | Description |
|---|---|---|
EnableResultCache | false | Enable MemoryCache for query results |
| Result cache TTL | 5 min | Sliding expiration per cached entry |
| Result cache size limit | 1024 entries | MemoryCache size limit |
| Query cache | Always on | ConcurrentDictionary for compiled queries |
EnableResultCache is false by default for backward compatibility. Enable it for read-heavy workloads where stale data is acceptable within the TTL window.
Bulk Operation Settings
| Setting | Default | Description |
|---|---|---|
DefaultBatchSize | 1000 | Rows per batch in bulk operations |
MaxParametersPerBatch | 2000 | Max parameters per SQL batch (DB limits vary) |
EnableBulkOptimizations | — | Use multi-row INSERT when available |
UseBulkTransactions | — | Wrap batch operations in transactions |
Bulk operations can use transactions for atomicity, but the Commit() method is currently a stub. Verify transaction support before relying on UseBulkTransactions.