public class SQLRepository<T, TId> implements Repository<T, TId>, RelationalQuerySource:
Read-only, no-tracking repository over one mapped SQL table or view.
Direct repositories open one connection per execution. Repositories owned by an EntityManager borrow its lazily opened session connection, allowing transaction continuity without changing this public repository contract. Application values are always bound parameters and never concatenated into SQL text.
users = SQLRepository<User, Int>(configuration) active = query: from users user where user.active
| Modifier and Type | Member | Description |
|---|---|---|
| public readonly property | configurationconfiguration as SQLConfiguration |
Immutable provider configuration. |
| public readonly property | mappingmapping as SQLMapping<T, TId> |
Validated entity mapping resolved once at construction. |
| public readonly property | relationalPushdownrelationalPushdown as Boolean: |
SQL lowers complete relational QIR plans in the provider. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | SQLRepositorySQLRepository(
configuration as SQLConfiguration,
mapping as SQLMapping<T, TId>,
session as SQLProviderSession,
tracker as SQLIdentityTracker,
catalog as SQLMappingCatalog
): |
Creates a repository borrowing one EntityManager SQL session. |
| public | SQLRepositorySQLRepository(configuration as SQLConfiguration): |
Creates a direct no-tracking repository with an inferred SQL mapping. |
| public | SQLRepositorySQLRepository(configuration as SQLConfiguration, mapping as SQLMapping<T, TId>): |
Creates a direct no-tracking repository with an explicit mapping. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | asQueryasQuery() as Query<T>: |
Returns a lazy identity query over this SQL repository. |
| public | countcount() as Long: |
Returns the exact number of mapped source entities. |
| public | countPlancountPlan(plan as QueryPlanBase) as Long: |
Executes an exact SQL-side count over the canonical result window. |
| public | executePlanexecutePlan(plan as QueryPlanBase) as Object: |
Executes one canonical plan into its concrete specialized result list. |
| public | existsPlanexistsPlan(plan as QueryPlanBase) as Boolean: |
Executes a one-row SQL existence probe. |
| public | openStreamopenStream(plan as QueryPlanBase) as Object: |
Opens a true cursor-backed stream with independent provider resources. |
| public | planExecutionModeplanExecutionMode(plan as QueryPlanBase) as ProviderExecutionMode: |
SQL query plans execute through a native forward-only result cursor. |
| public | planWarnings | SQL plan rendering does not expose bound values or hidden fallback. |
| public | providerCapabilitiesproviderCapabilities() as ProviderCapabilities: |
Returns dialect-aware relational provider capabilities. |
| public | providerDomainproviderDomain() as Object: |
Identifies one SQL endpoint without exposing credentials in diagnostics. |
| public | providerNameproviderName() as String: |
Returns the stable SQL provider identifier. |
| public | providerTextproviderText(plan as QueryPlanBase) as String: |
Returns rendered SQL without exposing bound parameter values. |
| public | relationalRootrelationalRoot() as QuerySource: |
This repository is the concrete SQL execution root. |
| public | validateBeforeReadvalidateBeforeRead() as Repository<T, TId>: |
Validates null and duplicate identities before subsequent reads. |