Home

Parameter IN mode should be specified explicitly

Rule description

  • Parameter IN mode should be specified explicitly

 

Non-compliant Code Example

function GetCompleteCustomerDetails(customerId INTEGER)       --Non compliant code (Parameter IN mode is not specified)
		return CUSTOMER_T 
		Is
		BEGIN
			Select FIRSTNAME, LASTNAME, AREA, CITY Into CUSTOMER_T.FirstName, CUSTOMER_T.LastName, CUSTOMER_T.Area, CUSTOMER_T.City FROM CUSTOMERS Where Id = customerId;
			RETURN CUSTOMER_T; 
	END GetCompleteCustomerDetails;

Compliant Code Example

function GetCompleteCustomerDetails(customerId In INTEGER)     --Compliant code (Parameter IN mode specified)
		return CUSTOMER_T 
		Is
		BEGIN
			Select FIRSTNAME, LASTNAME, AREA, CITY Into CUSTOMER_T.FirstName, CUSTOMER_T.LastName, CUSTOMER_T.Area, CUSTOMER_T.City FROM CUSTOMERS Where Id = customerId;
			RETURN CUSTOMER_T; 
	END GetCompleteCustomerDetails;
Visual Expert 2020
 VEPLSQLRULE179