Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add ability to exclude columns/attributes for cursor/object/collection comparison #242

@jgebal

Description

@jgebal

When comparing cursors/object/collections it is often very convenient to be able to skip/ignore some columns/attributes.
The most common scenario would be when the tested data contains create/update timestamp.
This data cannot be compared accurately when it is derived from sysdate/systimestamp.

The ut_equal matcher should have 2 additional forms:

  • accept additional attribute a_exclude varchar2 - a_exclude is a comma separated values list of columns/attributes to remove
  • accept additional attribute a_exclude_list ut_varchar2_list - a_exclude_list is a list of columns/attributes to remove

The implementation could be done by simply removing the XML:

select deletexml( l_xmltype, '//COLUMN' ) from stream;

https://docs.oracle.com/cd/E11882_01/server.112/e41084/functions051.htm#SQLRF06202

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions