Skip to content

SQL-092: EbillDocumentQueryProvider.GetDocument

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

Classification

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

Parameters

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

Tables

Table Access Columns used
EBILL_DOCUMENT SELECT EBILL_DOCUMENT_SEQ_NUM, UPDATE_NUM, EBILL_DOCUMENT_SUB_NUM, EBILL_DOCUMENT_CONTROL_NUM, IMAGE_SEQ_NUM, UPDATE_USER, UPDATE_DATE, EBILL_SEQ_NUM, EBILL_DOCUMENT_TYPE_CODE

LINQ statement

Source: Data/SAIF.Data/Queries/Claims/Ebilling/EbillDocumentQueryProvider.cs:22. The repository is obtained at Data/SAIF.Data/Queries/Claims/Ebilling/EbillDocumentQueryProvider.cs:16.

// Data/SAIF.Data/Queries/Claims/Ebilling/EbillDocumentQueryProvider.cs:16
_repository = Factory.GetRepository<EbillDocument>().Query();

// Data/SAIF.Data/Queries/Claims/Ebilling/EbillDocumentQueryProvider.cs:22
return _repository.Single(doc => doc.Id == documentId);

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
  ED.EBILL_DOCUMENT_SEQ_NUM,
  ED.UPDATE_NUM,
  ED.EBILL_DOCUMENT_SUB_NUM,
  ED.EBILL_DOCUMENT_CONTROL_NUM,
  ED.IMAGE_SEQ_NUM,
  ED.UPDATE_USER,
  ED.UPDATE_DATE,
  ED.EBILL_SEQ_NUM,
  ED.EBILL_DOCUMENT_TYPE_CODE
FROM EBILL_DOCUMENT ED
WHERE ED.EBILL_DOCUMENT_SEQ_NUM = :documentId
-- NHibernate expects at most one row

Translation notes:

  • Single() throws when no row, or more than one row, is returned.

Operations and processes

Sources

  • Data/SAIF.Data/Queries/Claims/Ebilling/EbillDocumentQueryProvider.cs:22