pipeline functions and linq

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
yosel
Posts: 7
Joined: Fri 20 Mar 2009 15:56

pipeline functions and linq

Post by yosel » Wed 30 Jun 2010 16:03

if I have

The first step is to define the format of the rows that are going to be returned. In this case here, we're going to return a INT, DATE followed by a VARCHAR2(25).

CREATE OR REPLACE TYPE myObjectFormat
AS OBJECT
(
A INT,
B DATE,
C VARCHAR2(25)
)
/

Next a collection type for the type previously defined must be created.

CREATE OR REPLACE TYPE myTableType
AS TABLE OF myObjectFormat
/

Finally, the producer function is packaged in a package. It is a pipelined function as indicated by the keyword pipelined.

CREATE OR REPLACE PACKAGE myDemoPack
AS
FUNCTION prodFunc RETURN myTableType PIPELINED;
END;
/

CREATE OR REPLACE PACKAGE BODY myDemoPack AS
FUNCTION prodFunc RETURN myTableType PIPELINED IS
BEGIN
FOR i in 1 .. 5
LOOP
PIPE ROW (myObjectFormat(i,SYSDATE+i,'Row '||i));
END LOOP;
RETURN;
END;
END;
/

Test It:

ALTER SESSION SET NLS_DATE_FORMAT='dd.mm.yyyy';


SELECT * FROM TABLE(myDemoPack.prodFunc())



How can I use a function using pipeline in a join with other tables?

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Mon 05 Jul 2010 13:14

Thank you for the report, we have reproduced the issue.
I will let you know as soon as the problem is fixed.
You can use a temporary workaround - just add the function definition with the return type definition manually to the .lqml file using XML editor in the following way:

Code: Select all

  
    
    
    
  
  
    
  

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Tue 10 Aug 2010 09:33

The problem is fixed. Could you please upgrade to the latest build of dotConnect for Oracle?
It can be downloaded from Registered Users' Area.

Post Reply