SQL-002: Oracle sequence-based ID generation for ImageSystem¶
This statement is a direct SQL escape hatch used by ImageRepositoryExtensions.GetNextTowId to obtain the next long value of the tower_seq Oracle sequence, bypassing the mapped-entity ID-generation path (the ImageSystem entity's TOWID identity column has no GeneratedBy clause, so this call is its only path to an ID).
Classification¶
| Field | Value |
|---|---|
| SQL ID | SQL-002 |
| Operation type | Sequence |
| Execution method | Inline SQL (ISessionStrategy.CreateSqlQuery) |
| Database | Oracle |
| Schema | [unqualified]** |
| Command type | Text |
| Business object | ImageSystem (via IRepository<ImageSystem> extension) |
| Criteria property | N/A — no IBusinessCriteria exists in this library |
| Lifecycle method | ImageRepositoryExtensions.GetNextTowId |
Parameters¶
No parameters — this is a literal, parameterless sequence-name query with no bind variables.
Tables¶
| Table | Access | Columns used |
|---|---|---|
| IMGSYS | SELECT (sequence value only; no table row read) | — (tower_seq.nextval, no column reference) |
Sample SQL¶
Operations and processes¶
Business rules¶
No business rule governs this statement directly — the sequence read is unconditional. The generated value's use is governed by BR-005 once the caller assigns it to a new ImageSystem and calls Add().
Sources¶
Repositories/Imaging/ImageRepositoryExtensions.cs