Energy Source Standard
This document describes standard behavior for the Energy.Source database layer.
Connection
Connection
Wraps an ADO.NET connection of type
T.Thread-safe.
Supports cloning and persistent connections.
Provides
Test(),Scalar<T>(),Execute(), andQuery()operations.
Configuration
Configuration
ConnectionStringis built from properties based onDialect.SQL Server and MySQL connection strings are fully implemented.
Other dialects provide a
GetDSNPrefix()value.
Error handling
Error.Catch
Classifies database exceptions by error number.
Returns
Error.Resultwith flags for retryable errors (timeout, deadlock, damaged connection) and final errors (syntax, missing object).
Structure
Structure.Table
A table has a
Name,Schema,Identity, and collections ofColumns,Indexes, andRows.Columns.GetPrimary()returns the first primary key column.