Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/oracle/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Oracle utplsql高级数据比较中的点表示法_Oracle_Plsql_Utplsql - Fatal编程技术网

Oracle utplsql高级数据比较中的点表示法

Oracle utplsql高级数据比较中的点表示法,oracle,plsql,utplsql,Oracle,Plsql,Utplsql,我在utPLSQL网站上看到了下面的代码片段 procedure test_cur_skip_columns_eq is l_expected sys_refcursor; l_actual sys_refcursor; begin open l_expected for select 'text' ignore_me, d.* from user_tables d; open l_actual for select sysdate "ADate", d.* from

我在utPLSQL网站上看到了下面的代码片段

procedure test_cur_skip_columns_eq is
  l_expected sys_refcursor;
  l_actual   sys_refcursor;
begin
  open l_expected for select 'text' ignore_me, d.* from user_tables d;
  open l_actual   for select sysdate "ADate",  d.* from user_tables d;
  ut.expect( l_actual ).to_equal( l_expected ).exclude( 'IGNORE_ME,ADate' );
end;

procedure test_cur_skip_columns_cn is
  l_expected sys_refcursor;
  l_actual   sys_refcursor;
begin
  open l_expected for select 'text' ignore_me, d.* from user_tables d where rownum = 1;
  open l_actual   for select sysdate "ADate",  d.* from user_tables d;
  ut.expect( l_actual ).to_contain( l_expected ).exclude( 'IGNORE_ME,ADate' );
end;
它有一行带点符号的代码,
ut.expect(l_实际)。to_contain(l_预期)。exclude('IGNORE_ME,ADate')。我阅读了一些oracle文档,了解点表示法的用法,它在任何地方都会显示package\u name.object\u name或schema\u name.table\u name。但是上面提到的代码行与这些代码都不一样。我很想知道每个点之间的物体是什么。感谢您的帮助

我很想知道每个点之间的物体是什么

实际上,这些是(又称用户定义类型,又称用户定义类型)

这里发生了什么:

  • 包包含一个名为的函数,该函数返回类型为
    ut\u expectation\u component
    的对象
  • 是定义两个成员函数的类型:和。它们都返回
    ut\u expection\u component
    ,这允许像这样链接方法调用
您可能需要阅读以了解该主题的介绍。还请阅读-它应该为您关于PLSQL语法的大多数问题提供答案

ut.expect( l_actual ).to_contain( l_expected ).exclude( 'IGNORE_ME,ADate' );