CDT Diff Utilities

Overview

This plugin contains two functions to track changes in CDT instances for audit requirements.

Key Features & Functionality

  • The cdtdifference() function takes two instances of the same CDT and returns an array of differences in the form: [attributeName, previousValue=, currentValue=]. The primary use case for this function is to take two rows from a database, read them into the same CDT type, pass them to the function and return the differences so as to support an audit requirement of what changed between versions of the data.
  • The cdtcomparison() function takes two instances of the same CDT and returns an array of ALL of the elements from the two CDTs with their previous and current values, along with a Boolean flag indicating if the values are different, in the form: [attributeName, isDifferent, previousValue=, currentValue=]. The primary use case is similar to that of the cdtdifference() function, but allows for a full side-by-side comparison of the data as opposed to just the differences.
Anonymous
Parents
  • Hi All, 

    My cdt is of array type, I was using cdtdifference() plugin, but it's not working with array type cdt. 

    NAME              |    TYPE             |  ARRAY

    -------------------------------------------------

    dummyCdt_1  |    d_cdt _1         |   Yes

    dummyCdt_2  |    d_cdt_2          |   Yes

     

    cdtdifference(dummyCdt_1, dummyCdt_2)

    ERROR : One or both are not of CDT(s) type

     

    How can I get difference ? if anyone know about it please share.

Comment
  • Hi All, 

    My cdt is of array type, I was using cdtdifference() plugin, but it's not working with array type cdt. 

    NAME              |    TYPE             |  ARRAY

    -------------------------------------------------

    dummyCdt_1  |    d_cdt _1         |   Yes

    dummyCdt_2  |    d_cdt_2          |   Yes

     

    cdtdifference(dummyCdt_1, dummyCdt_2)

    ERROR : One or both are not of CDT(s) type

     

    How can I get difference ? if anyone know about it please share.

Children
No Data