Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Pragma Restrict_References Question.
did the approach work?
Bill Lucas wrote:
> Thanks, > Bill > > "abhijith" <abhijit_at_nomail.com> wrote in message > news:3EF15061.5090704_at_nomail.com... >
> it >>>>
>>>to accept a variety of inputs.
> the >
> problem >
> call >>>>
>>>to another package it says we are violating the Restrictions but if we
>>>populate the call write from the function it seems to accept the
>>>restrictions.
>>>
>>>Here is an example (with a question at the bottom)...
>>>
>>>This one works fine
>>>/*****************************************************************/
>>>FUNCTION Dataset_Property(vcDatasetID IN VARCHAR2, recEnum IN
>>>BMQR_TYPES.ENUMERATIONS_RT) RETURN BOOLEAN AS
>>>
>>>recDS BMQR_Types.DATASETS_RT;
>>>
>>>BEGIN
>>>
>>>recDS.DatasetID := vcDatasetID;
> we >>>>
>>>are violating our pragma
>>>
>>>SELECT *
>>>INTO recDS
>>>FROM tblDatasets
>>>WHERE DatasetID = recDS.DatasetID;
>>>
>>>RETURN(BITAND(recDS.Options,
>>>recEnum.BitValue) = recEnum.BitValue);
>>>
>>>END Dataset_Property;
>>>/*****************************************************************/
>>>
>>>This one below says we are violating the restriction
>>>
>>>/*****************************************************************/
>>>FUNCTION Dataset_Property(vcDatasetID IN VARCHAR2, recEnum IN
>>>BMQR_TYPES.ENUMERATIONS_RT) RETURN BOOLEAN AS
>>>
>>>recDS BMQR_Types.DATASETS_RT;
>>>
>>>BEGIN
>>>
>>>recDS.DatasetID := vcDatasetID;
> are >>>>
>>>violatiung our pragma
>>>
>>>RETURN(BITAND(recDS.Options,
>>>recEnum.BitValue) = recEnum.BitValue);
>>>
>>>END Dataset_Property;
>>>/*****************************************************************/
> does >>>>
>>>this...
>>>
>>>/*****************************************************************/
>>>PROCEDURE GET_DATASETS(rec IN OUT NOCOPY BMQR_TYPES.DATASETS_RT) IS
>>>BEGIN
>>>SELECT *
>>>INTO rec
>>>FROM tblDatasets
>>>
>>>WHERE DatasetID = rec.DatasetID; -- <<tblDatasets>>;
>>>END;
>>>END Dataset_Property;
>>>/*****************************************************************/
> it >>>>
>>>inline in my function then there is no issues using the restrictions,
>>>however I have to duplicate this about 4 times through the various
>>>overloading. My Question is
> function >
> use >>>>
>>>the call to a BMQR_SQL.GET_Datasets and override the restrictions with a
>>>pragma Restrict_References DATASET_PROPERTY, TRUST?
>>>
>>>Any thoughts on the best practice in this case would be appreciated.
>>>
>>>Regards,
>>>Bill Lucas