SQL-003: AddressVerificationQueryProvider.GetVerifiedAddress¶
This statement is a read operation invoked through ORM (NHibernate LINQ). Executed by AddressVerificationQueryProvider.GetVerifiedAddress.
Classification¶
| Field | Value |
|---|---|
| SQL ID | SQL-003 |
| Operation type | Read |
| Execution method | ORM (NHibernate LINQ) |
| Database | Oracle* |
| Schema | [unqualified]** |
| Command type | N/A (ORM-generated) |
| Business object | AddressVerificationQueryProvider |
| Criteria property | N/A — ORM |
| Lifecycle method | GetVerifiedAddress |
Parameters¶
| Parameter | Direction | Type | Max length | Description |
|---|---|---|---|---|
verifiedAddressSeqNum |
Input | long | N/A | Method argument of AddressVerificationQueryProvider.GetVerifiedAddress bound into the ORM expression; NHibernate generates the bind variable at runtime |
Tables¶
| Table | Access | Columns used |
|---|---|---|
| VERIFIED_ADDRESS | SELECT | VERIFIED_ADDRESS_SEQ_NUM, UPDATE_NUM, VERIFICATION_DATE, VERIFICATION_CANCEL_DATE, ADDRESS_LINE1, ADDRESS_LINE2, CITY_NAME, STATE_CODE, ZIP_CODE, ZIP_CODE_EXT, UPDATE_DATE, UPDATE_USER |
LINQ statement¶
Source: Data/SAIF.Data/Queries/AddressVerification/AddressVerificationQueryProvider.cs:49. The repository is a class field initialised from Factory.GetRepository<VerifiedAddress>().Query() at Data/SAIF.Data/Queries/AddressVerification/AddressVerificationQueryProvider.cs:20.
return verifiedAddressRepository.SingleOrDefault(x => x.Id == verifiedAddressSeqNum
&& x.CancelDate == null);
Sample SQL¶
Inferred SQL: This SQL was inferred from the LINQ statement above and the NHibernate mappings. It is not concrete SQL from source code; NHibernate generates the executed statement at runtime, so aliases, column order, join syntax, and bind-parameter names may differ.
-- Inferred from LINQ (NHibernate mapping translation); not concrete SQL
SELECT
VA.VERIFIED_ADDRESS_SEQ_NUM,
VA.UPDATE_NUM,
VA.VERIFICATION_DATE,
VA.VERIFICATION_CANCEL_DATE,
VA.ADDRESS_LINE1,
VA.ADDRESS_LINE2,
VA.CITY_NAME,
VA.STATE_CODE,
VA.ZIP_CODE,
VA.ZIP_CODE_EXT,
VA.UPDATE_DATE,
VA.UPDATE_USER
FROM VERIFIED_ADDRESS VA
WHERE VA.VERIFIED_ADDRESS_SEQ_NUM = :verifiedAddressSeqNum
AND VA.VERIFICATION_CANCEL_DATE IS NULL
-- NHibernate expects at most one row
Translation notes:
- The property CancelDate maps to the column VERIFICATION_CANCEL_DATE, not to CANCEL_DATE.
Operations and processes¶
Sources¶
Data/SAIF.Data/Queries/AddressVerification/AddressVerificationQueryProvider.cs:49