Skip to content

SQL-004: AuditNoteQueryProvider.GetAuditNote

This statement is a read operation invoked through ORM (NHibernate LINQ). Executed by AuditNoteQueryProvider.GetAuditNote.

Classification

Field Value
SQL ID SQL-004
Operation type Read
Execution method ORM (NHibernate LINQ)
Database Oracle*
Schema [unqualified]**
Command type N/A (ORM-generated)
Business object AuditNoteQueryProvider
Criteria property N/A — ORM
Lifecycle method GetAuditNote

Parameters

Parameter Direction Type Max length Description
noteId Input long N/A Method argument of AuditNoteQueryProvider.GetAuditNote bound into the ORM expression; NHibernate generates the bind variable at runtime

Tables

Table Access Columns used
CBP_NOTE SELECT CBP_NOTE_SEQ_NUM, UPDATE_NUM, ACTIVE_FLAG, CREATE_DATE, CREATE_USER, UPDATE_DATE, UPDATE_USER, NOTE_TXT, CLAIM_ID, NOTE_TYPE_CODE, NOTE_CATEGORY_CODE, BILL_ID

LINQ statement

Source: Data/SAIF.Data/Queries/Claims/AuditNoteQueryProvider.cs:19. The repository is a class field initialised from Factory.GetRepository<CbpNote>().Query() at Data/SAIF.Data/Queries/Claims/AuditNoteQueryProvider.cs:14.

return repository.SingleOrDefault(x => x.Id == noteId);

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
  CN.CBP_NOTE_SEQ_NUM,
  CN.UPDATE_NUM,
  CN.ACTIVE_FLAG,
  CN.CREATE_DATE,
  CN.CREATE_USER,
  CN.UPDATE_DATE,
  CN.UPDATE_USER,
  CN.NOTE_TXT,
  CN.CLAIM_ID,
  CN.NOTE_TYPE_CODE,
  CN.NOTE_CATEGORY_CODE,
  CN.BILL_ID
FROM CBP_NOTE CN
WHERE CN.CBP_NOTE_SEQ_NUM = :noteId
-- NHibernate expects at most one row

Operations and processes

Sources

  • Data/SAIF.Data/Queries/Claims/AuditNoteQueryProvider.cs:19