SQL-001: Oracle sequence-based ID generation for Image¶
This statement is a direct SQL escape hatch used by ImageRepositoryExtensions.GetNextImageId to obtain the next long value of the image_seq Oracle sequence, bypassing the mapped-entity ID-generation path (the Image entity's image_seq_num identity column has no GeneratedBy clause, so this call is its only path to an ID).
Classification¶
| Field | Value |
|---|---|
| SQL ID | SQL-001 |
| Operation type | Sequence |
| Execution method | Inline SQL (ISessionStrategy.CreateSqlQuery) |
| Database | Oracle |
| Schema | [unqualified]** |
| Command type | Text |
| Business object | Image (via IRepository<Image> extension) |
| Criteria property | N/A — no IBusinessCriteria exists in this library |
| Lifecycle method | ImageRepositoryExtensions.GetNextImageId |
Parameters¶
No parameters — this is a literal, parameterless sequence-name query with no bind variables.
Tables¶
| Table | Access | Columns used |
|---|---|---|
| image | SELECT (sequence value only; no table row read) | — (image_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 Image and calls Add().
Sources¶
Repositories/Imaging/ImageRepositoryExtensions.cs