text:
Help with using Collections in a stored proc

Hi I have a number of stored procs which contain arrays in the parameters. To make things easier I would like to use a Collection as the parameter.
I'm a little confused with the structure / use of Collection and I'm getting the following error
ORA-00931: Missing Identifier
This is how I'm declaring it
Collection attribIdArray(TypeInfo(con, "VARCHAR2", TypeInfo::Type));
The error occurs after I step over this.
The collection is for the p_Attrib_Id parameter in the stored proc header below
Thank you for your assistance.
Cheers
John
PROCEDURE Modify (
p_Slot_SUN               IN        wp_domain.TS_Slot_SUN,               --
p_Slot_Type_Cd              OUT    wp_domain.TS_Slot_Type_Cd,           --
p_Slot_No                IN OUT    wp_domain.TS_Slot_No,                --
p_Compnt_Classn_Id       IN        wp_domain.TS_Compnt_Classn_Id,       --
p_Slot_Status_Cd         IN OUT    wp_domain.TS_Slot_Status_Cd,         --
p_Slot_Alias             IN OUT    wp_domain.TS_Slot_Alias,             --
p_Dest_Label_Tx          IN        wp_domain.TS_Dest_Label_Tx,          --
p_Slot_SysLock              OUT    wp_domain.TS_SysLock,                --
p_Site_SUN               IN        wp_domain.TS_Site_SUN,               --
p_Parent_Slot_SUN        IN        wp_domain.TS_Parent_Slot_SUN,        --
p_Recursive              IN OUT    VARCHAR2,                            -- ?????
p_row_status_cd          IN        wp_domain.TS_Row_status_cd,          -- Deprecated. Always set to constant value as specified in wp_constant
p_Ntwrk_Point_SUN        IN        wp_domain.TS_Ntwrk_Point_SUN,        -- The reference to the spatial point for the slot
p_Mapping_Symbol_Cd      IN        wp_domain.TS_Mapping_Symbol_Cd,      --
p_Symbol_Rotn_Val        IN        wp_domain.TS_Symbol_Rotn_Val,        --
p_Asmbly_Templt_SUN      IN        wp_domain.TS_Asmbly_Templt_SUN,      -- The reference to the template that was used to creat the slot
p_Reason_Code_Val        IN        wp_domain.TEvent_Reason_Code_Val,    -- Deprecated by NFM 1.6 prop_change mechanism
p_Event_Dt               IN OUT    wp_domain.TEvent_Event_Dt,           -- Deprecated by NFM 1.6 prop_change mechanism
p_Event_Note_Tx          IN        wp_domain.TEvent_Event_Note_Tx,      -- Deprecated by NFM 1.6 prop_change mechanism
p_Event_SUN                 OUT    wp_domain.TEvent_Event_SUN,          -- Deprecated by NFM 1.6 prop_change mechanism
p_Event_Syslock             OUT    wp_domain.TEvent_Syslock,            -- Deprecated by NFM 1.6 prop_change mechanism
p_Works_Order_Id         IN        wp_domain.TWOrder_works_order_id,    -- Deprecated by NFM 1.6 prop_change mechanism
p_Plant_Item_Id          IN        wp_domain.TPl_Plant_Item_Id,         -- The plant item to be installed in the slot
p_Spec_SUN               IN        wp_domain.TSP_Spec_SUN,              -- The spec to be installed in the slot
p_Spec_Changed           IN        VARCHAR2,
p_Slot_Normal_Swtchd_Sts IN        wp_domain.TS_Slot_Normal_Swtchd_Sts, --
p_Display_Seq_No         IN        NUMBER,                              --
p_Attrib_Ct              IN        NUMBER,                              -- The number of attributes in the array
p_Attrib_Id              IN        NFM_Mntatts.Tbl_Attrib_Id,           --
p_Attrib_Val             IN        NFM_Mntatts.Tbl_Attrib_Val,          --
p_Compnt_Attrib_Sun      IN        NFM_Mntatts.Tbl_Compnt_Attrib_SUN,
p_LCC_Code               IN        VARCHAR2,
p_Install_Date           IN        DATE,
p_Install_Date_Override  IN        VARCHAR2
);

Hi,
The issue has been investigating and we exchanged with the OP by email about it.
It appears that the stored proc as a parameter that is a package defined indexed by table.
such PL/SQL types are only supported for binding in OCI since Oracle 12c that allowed using PL/SQL records, types and boolean in OCI).
Prior to Oracle 12c, only nested tables and varrays can be binded to host variable using OCI.
Unfortunately, the OP has an 11g server accessed by a 12C client.
As Oracle 12c is required on both side (client and server) to bind a package defined type, tthe only options left are:

change the procedure signature and use a different type (nested table OR varray) that are supported by OCI since Oracle 8i
use a anonymous PL/SQL block that wrap the procedure call and map the index by table to a nested table or varray

Best regards,
Vincent

Can you post your C++ code sample ?

Hi Vince,
Did you get a chance to check this?
Cheers
John Gaeta
From: GAETA John (SPARQ)
Sent: Thursday, 18 October 2018 4:26 PM
To: 'vrogier/ocilib'; vrogier/ocilib
Cc: Author
Subject: RE: [vrogier/ocilib] Help with using Collections in a stored proc (#178)
C++ code sample as requested
This worked using OCI_BindArrayOfStrings
            Statement st(con);
            ostring sql = ostring("Begin wp_slot.Modify_Associative  (:p01, :p02); End;");
            st.Prepare(sql);

            otext tab_str[4][254];

            int arrayNum = 4;
            st.Bind(":p01", arrayNum, BindInfo::In);
            strcpy(tab_str[0], "POLE - SPECIES");
            strcpy(tab_str[1], "6 SIGMA");
            strcpy(tab_str[2], "POLE - OWNER");
            strcpy(tab_str[3], "POLE - FOUNDN");
            OCI_BindArrayOfStrings(st, OTEXT(":p02"), (otext*)tab_str, 254, 4);
            st.ExecutePrepared();

Using vector bind didn’t work
            Statement st(con);
            ostring sql = ostring("Begin wp_slot.Modify_Associative  (:p01, :p02); End;");
            st.Prepare(sql);

            int arrayNum = 4;
            std::vector<ostring> attribIdArray;
            attribIdArray.push_back("POLE - SPECIES");
            attribIdArray.push_back("6 SIGMA");
            attribIdArray.push_back("POLE - OWNER");
            attribIdArray.push_back("POLE - FOUNDN");

            st.Bind(":p01", arrayNum, BindInfo::In);
            st.Bind(":p02", attribIdArray, 254, BindInfo::In);
            st.ExecutePrepared();

"Oracle Error => ORA-06550: line 1, column 7:\nPLS-00306: wrong number or types of arguments in call to 'MODIFY_ASSOCIATIVE'\nORA-06550: line 1, column 7:\nPL/SQL: Statement ignored\n"
Stored proc parameter for the array was
TYPE Associative_Array IS TABLE OF VARCHAR2(255)
INDEX BY BINARY_INTEGER;
From: Vincent Rogier [mailto:notifications@github.com]
Sent: Thursday, 18 October 2018 3:45 PM
To: vrogier/ocilib
Cc: GAETA John (SPARQ); Author
Subject: Re: [vrogier/ocilib] Help with using Collections in a stored proc (#178)
Can you post your C++ code sample ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/vrogier/ocilib/issues/178#issuecomment-430882580, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ApUg5S24LHbhYEU_kJsysi01nKH9G9A5ks5umBV5gaJpZM4XJll1.
To report this email as spam, please forward to asa@websense.com

This email message (including any file attachments transmitted with it) is for the sole use of the intended recipient(s) and may contain confidential and legally privileged information. Any unauthorised review, use, alteration, disclosure or distribution of this email (including any attachments) by an unintended recipient is prohibited. If you have received this email in error, please notify the sender by return email and destroy all copies of the original message. Any confidential or legal professional privilege is not waived or lost by any mistaken delivery of the email. Energy Queensland Limited accepts no responsibility for the content of any email which is sent by an employee which is of a personal nature.
Sender Details:
Energy Queensland Limited
Level 6, 420 Flinders Street Townsville QLD 4810
(07) 4766 2900
Energy Queensland Limited policy is to not send unsolicited electronic messages. Suspected breaches of this policy can be reported by replying to this message including the original message and the word "UNSUBSCRIBE" in the subject.

Hi,
I've created issue #182 about it.
C++ API was able to bind vectors for regular array DML operation but not for PL/SQL tables.
The fix is committed on branch v4.6.0 (should be released next week).
As C++ is header only, you can retrieve ocilib.hpp and ocilib_impl.hpp from branch 'develop-4.6.0'
Best regards,
Vincent

Thanks Vincent, I’m looking forward to the new version.
From: Vincent Rogier [mailto:notifications@github.com]
Sent: Thursday, 25 October 2018 11:43 PM
To: vrogier/ocilib
Cc: GAETA John (SPARQ); Author
Subject: Re: [vrogier/ocilib] Help with using Collections in a stored proc (#178)
Hi,
I've created issue #182https://github.com/vrogier/ocilib/issues/182 about it.
C++ API was able to bind vectors for regular array DML operation but not for PL/SQL tables.
The fix is committed on branch v4.6.0 (should be released next week).
As C++ is header only, you can retrieve ocilib.hpp and ocilib_impl.hpp from branch 'develop-4.6.0'
Best regards,
Vincent
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/vrogier/ocilib/issues/178#issuecomment-433056130, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ApUg5TqrI_ELMfuN1VvNHmvZnQHyGgShks5uob_xgaJpZM4XJll1.
To report this email as spam, please forward to asa@websense.com

This email message (including any file attachments transmitted with it) is for the sole use of the intended recipient(s) and may contain confidential and legally privileged information. Any unauthorised review, use, alteration, disclosure or distribution of this email (including any attachments) by an unintended recipient is prohibited. If you have received this email in error, please notify the sender by return email and destroy all copies of the original message. Any confidential or legal professional privilege is not waived or lost by any mistaken delivery of the email. Energy Queensland Limited accepts no responsibility for the content of any email which is sent by an employee which is of a personal nature.
Sender Details:
Energy Queensland Limited
Level 6, 420 Flinders Street Townsville QLD 4810
(07) 4766 2900
Energy Queensland Limited policy is to not send unsolicited electronic messages. Suspected breaches of this policy can be reported by replying to this message including the original message and the word "UNSUBSCRIBE" in the subject.

Hi Vincent,
Will 4.6.0 be available soon?
Cheers
John
From: GAETA John (SPARQ)
Sent: Friday, 26 October 2018 11:08 AM
To: 'vrogier/ocilib'
Subject: RE: [vrogier/ocilib] Help with using Collections in a stored proc (#178)
Thanks Vincent, I’m looking forward to the new version.
From: Vincent Rogier [mailto:notifications@github.com]
Sent: Thursday, 25 October 2018 11:43 PM
To: vrogier/ocilib
Cc: GAETA John (SPARQ); Author
Subject: Re: [vrogier/ocilib] Help with using Collections in a stored proc (#178)
Hi,
I've created issue #182https://github.com/vrogier/ocilib/issues/182 about it.
C++ API was able to bind vectors for regular array DML operation but not for PL/SQL tables.
The fix is committed on branch v4.6.0 (should be released next week).
As C++ is header only, you can retrieve ocilib.hpp and ocilib_impl.hpp from branch 'develop-4.6.0'
Best regards,
Vincent
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/vrogier/ocilib/issues/178#issuecomment-433056130, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ApUg5TqrI_ELMfuN1VvNHmvZnQHyGgShks5uob_xgaJpZM4XJll1.
To report this email as spam, please forward to asa@websense.com

This email message (including any file attachments transmitted with it) is for the sole use of the intended recipient(s) and may contain confidential and legally privileged information. Any unauthorised review, use, alteration, disclosure or distribution of this email (including any attachments) by an unintended recipient is prohibited. If you have received this email in error, please notify the sender by return email and destroy all copies of the original message. Any confidential or legal professional privilege is not waived or lost by any mistaken delivery of the email. Energy Queensland Limited accepts no responsibility for the content of any email which is sent by an employee which is of a personal nature.
Sender Details:
Energy Queensland Limited
Level 6, 420 Flinders Street Townsville QLD 4810
(07) 4766 2900
Energy Queensland Limited policy is to not send unsolicited electronic messages. Suspected breaches of this policy can be reported by replying to this message including the original message and the word "UNSUBSCRIBE" in the subject.

Hi,
Unfortunately, I was unable to publish v4.6.0 as planned last week.
I am currently away for few days.
I have already modified v4.6 .0 milestone release date to November 22nd.
Sorry for the delay.
Regards,
Vincent

Hi Vincent,
Is this still scheduled for the 22nd Nov?
Cheers
John Gaeta
From: Vincent Rogier [mailto:notifications@github.com]
Sent: Monday, 5 November 2018 4:02 PM
To: vrogier/ocilib
Cc: GAETA John (SPARQ); Author
Subject: Re: [vrogier/ocilib] Help with using Collections in a stored proc (#178)
Hi,
Unfortunately, I was unable to publish v4.6.0 as planned last week.
I am currently away for few days.
I have already modified v4.6 .0 milestone release date to November 22nd.
Sorry for the delay.
Regards,
Vincent
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/vrogier/ocilib/issues/178#issuecomment-435763908, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ApUg5RYLmghxivAbpPqvuCQZYen9Vfwwks5ur9RhgaJpZM4XJll1.
To report this email as spam, please forward to asa@websense.com

This email message (including any file attachments transmitted with it) is for the sole use of the intended recipient(s) and may contain confidential and legally privileged information. Any unauthorised review, use, alteration, disclosure or distribution of this email (including any attachments) by an unintended recipient is prohibited. If you have received this email in error, please notify the sender by return email and destroy all copies of the original message. Any confidential or legal professional privilege is not waived or lost by any mistaken delivery of the email. Energy Queensland Limited accepts no responsibility for the content of any email which is sent by an employee which is of a personal nature.
Sender Details:
Energy Queensland Limited
Level 6, 420 Flinders Street Townsville QLD 4810
(07) 4766 2900
Energy Queensland Limited policy is to not send unsolicited electronic messages. Suspected breaches of this policy can be reported by replying to this message including the original message and the word "UNSUBSCRIBE" in the subject.

Hi,
Yes it is :)
I expect to create the release this evening (France timezone).
Regards,
Vincent

Thanks Vincent,
I see it there now. I will update this and let you know how I go.
Cheers
John
From: Vincent Rogier [mailto:notifications@github.com]
Sent: Wednesday, 21 November 2018 5:30 PM
To: vrogier/ocilib
Cc: GAETA John (SPARQ); Author
Subject: Re: [vrogier/ocilib] Help with using Collections in a stored proc (#178)
Hi,
Yes it is :)
I expect to create the release this evening (France timezone).
Regards,
Vincent
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/vrogier/ocilib/issues/178#issuecomment-440564545, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ApUg5VrdMTWcQbXNs00b9Bzm0xdX0aSyks5uxQEBgaJpZM4XJll1.
To report this email as spam, please forward to asa@websense.com

This email message (including any file attachments transmitted with it) is for the sole use of the intended recipient(s) and may contain confidential and legally privileged information. Any unauthorised review, use, alteration, disclosure or distribution of this email (including any attachments) by an unintended recipient is prohibited. If you have received this email in error, please notify the sender by return email and destroy all copies of the original message. Any confidential or legal professional privilege is not waived or lost by any mistaken delivery of the email. Energy Queensland Limited accepts no responsibility for the content of any email which is sent by an employee which is of a personal nature.
Sender Details:
Energy Queensland Limited
Level 6, 420 Flinders Street Townsville QLD 4810
(07) 4766 2900
Energy Queensland Limited policy is to not send unsolicited electronic messages. Suspected breaches of this policy can be reported by replying to this message including the original message and the word "UNSUBSCRIBE" in the subject.

Hi Vince,
Sadly I am getting the same error
I have updated to version 4.6.0 and am still getting the same error as before.
          Statement st(con);
          ostring sql = ostring("Begin wp_slot.Modify_Associative (:p01, :p02); End;");
          st.Prepare(sql); int arrayNum = 4;
          std::vector<ostring> attribIdArray;
          attribIdArray.push_back(ostring("POLE - SPECIES"));
          attribIdArray.push_back(ostring("6 SIGMA"));
          attribIdArray.push_back(ostring("POLE - OWNER"));
          attribIdArray.push_back(ostring("POLE - FOUNDN"));
          st.Bind(ostring(":p01"), arrayNum, BindInfo::In);
          st.Bind(ostring(":p02"), attribIdArray, 254, BindInfo::In);
          st.ExecutePrepared();

"Oracle Error => ORA-06550: line 1, column 7:\nPLS-00306: wrong number or types of arguments in call to 'MODIFY_ASSOCIATIVE'\nORA-06550: line 1, column 7:\nPL/SQL: Statement ignored\n"
As I mentioned before OCI_BindArrayOfStrings works with the same stored proc. Can you see anything I’m doing wrong?
Stored proc I am calling…
TYPE Associative_Array IS TABLE OF VARCHAR2(255) INDEX BY BINARY_INTEGER;
PROCEDURE Modify_Associative (                              --
p_Attrib_Ct              IN        NUMBER,                              -- The number of attributes in the array
p_Attrib_Id              IN        wp_slot.Associative_Array
)
IS
ctr INTEGER;
BEGIN
FOR ctr IN 1..p_Attrib_Ct LOOP
LogMessage('p_Attrib_Id(' || ctr || '):' || p_Attrib_Id(ctr)) ;
END LOOP;
LogMessage('Associative_Array');
END;
From: GAETA John (SPARQ)
Sent: Friday, 23 November 2018 8:13 AM
To: 'vrogier/ocilib'; vrogier/ocilib; vincent rogier (vince.rogier@gmail.com)
Cc: Author
Subject: RE: [vrogier/ocilib] Help with using Collections in a stored proc (#178)
Thanks Vincent,
I see it there now. I will update this and let you know how I go.
Cheers
John
From: Vincent Rogier [mailto:notifications@github.com]
Sent: Wednesday, 21 November 2018 5:30 PM
To: vrogier/ocilib
Cc: GAETA John (SPARQ); Author
Subject: Re: [vrogier/ocilib] Help with using Collections in a stored proc (#178)
Hi,
Yes it is :)
I expect to create the release this evening (France timezone).
Regards,
Vincent
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/vrogier/ocilib/issues/178#issuecomment-440564545, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ApUg5VrdMTWcQbXNs00b9Bzm0xdX0aSyks5uxQEBgaJpZM4XJll1.
To report this email as spam, please forward to asa@websense.com

This email message (including any file attachments transmitted with it) is for the sole use of the intended recipient(s) and may contain confidential and legally privileged information. Any unauthorised review, use, alteration, disclosure or distribution of this email (including any attachments) by an unintended recipient is prohibited. If you have received this email in error, please notify the sender by return email and destroy all copies of the original message. Any confidential or legal professional privilege is not waived or lost by any mistaken delivery of the email. Energy Queensland Limited accepts no responsibility for the content of any email which is sent by an employee which is of a personal nature.
Sender Details:
Energy Queensland Limited
Level 6, 420 Flinders Street Townsville QLD 4810
(07) 4766 2900
Energy Queensland Limited policy is to not send unsolicited electronic messages. Suspected breaches of this policy can be reported by replying to this message including the original message and the word "UNSUBSCRIBE" in the subject.

Hi Vincent,
Just check if you have had time to check this.
Cheers
John
From: GAETA John (SPARQ)
Sent: Friday, 23 November 2018 12:24 PM
To: 'vrogier/ocilib'; 'vrogier/ocilib'; vincent rogier (vince.rogier@gmail.com)
Cc: 'Author'
Subject: RE: [vrogier/ocilib] Help with using Collections in a stored proc (#178)
Hi Vincent,
Just a follow up
I tested using  vector this didn’t return an error but the stored proc did not run.
Cheers
John
From: GAETA John (SPARQ)
Sent: Friday, 23 November 2018 11:33 AM
To: 'vrogier/ocilib'; 'vrogier/ocilib'; vincent rogier (vince.rogier@gmail.com)
Cc: 'Author'
Subject: RE: [vrogier/ocilib] Help with using Collections in a stored proc (#178)
Hi Vince,
Sadly I am getting the same error
I have updated to version 4.6.0 and am still getting the same error as before.
          Statement st(con);
          ostring sql = ostring("Begin wp_slot.Modify_Associative (:p01, :p02); End;");
          st.Prepare(sql); int arrayNum = 4;
          std::vector<ostring> attribIdArray;
          attribIdArray.push_back(ostring("POLE - SPECIES"));
          attribIdArray.push_back(ostring("6 SIGMA"));
          attribIdArray.push_back(ostring("POLE - OWNER"));
          attribIdArray.push_back(ostring("POLE - FOUNDN"));
          st.Bind(ostring(":p01"), arrayNum, BindInfo::In);
          st.Bind(ostring(":p02"), attribIdArray, 254, BindInfo::In);
          st.ExecutePrepared();

"Oracle Error => ORA-06550: line 1, column 7:\nPLS-00306: wrong number or types of arguments in call to 'MODIFY_ASSOCIATIVE'\nORA-06550: line 1, column 7:\nPL/SQL: Statement ignored\n"
As I mentioned before OCI_BindArrayOfStrings works with the same stored proc. Can you see anything I’m doing wrong?
Stored proc I am calling…
TYPE Associative_Array IS TABLE OF VARCHAR2(255) INDEX BY BINARY_INTEGER;
PROCEDURE Modify_Associative (                              --
p_Attrib_Ct              IN        NUMBER,                              -- The number of attributes in the array
p_Attrib_Id              IN        wp_slot.Associative_Array
)
IS
ctr INTEGER;
BEGIN
FOR ctr IN 1..p_Attrib_Ct LOOP
LogMessage('p_Attrib_Id(' || ctr || '):' || p_Attrib_Id(ctr)) ;
END LOOP;
LogMessage('Associative_Array');
END;
From: GAETA John (SPARQ)
Sent: Friday, 23 November 2018 8:13 AM
To: 'vrogier/ocilib'; vrogier/ocilib; vincent rogier (vince.rogier@gmail.com)
Cc: Author
Subject: RE: [vrogier/ocilib] Help with using Collections in a stored proc (#178)
Thanks Vincent,
I see it there now. I will update this and let you know how I go.
Cheers
John
From: Vincent Rogier [mailto:notifications@github.com]
Sent: Wednesday, 21 November 2018 5:30 PM
To: vrogier/ocilib
Cc: GAETA John (SPARQ); Author
Subject: Re: [vrogier/ocilib] Help with using Collections in a stored proc (#178)
Hi,
Yes it is :)
I expect to create the release this evening (France timezone).
Regards,
Vincent
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/vrogier/ocilib/issues/178#issuecomment-440564545, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ApUg5VrdMTWcQbXNs00b9Bzm0xdX0aSyks5uxQEBgaJpZM4XJll1.
To report this email as spam, please forward to asa@websense.com

This email message (including any file attachments transmitted with it) is for the sole use of the intended recipient(s) and may contain confidential and legally privileged information. Any unauthorised review, use, alteration, disclosure or distribution of this email (including any attachments) by an unintended recipient is prohibited. If you have received this email in error, please notify the sender by return email and destroy all copies of the original message. Any confidential or legal professional privilege is not waived or lost by any mistaken delivery of the email. Energy Queensland Limited accepts no responsibility for the content of any email which is sent by an employee which is of a personal nature.
Sender Details:
Energy Queensland Limited
Level 6, 420 Flinders Street Townsville QLD 4810
(07) 4766 2900
Energy Queensland Limited policy is to not send unsolicited electronic messages. Suspected breaches of this policy can be reported by replying to this message including the original message and the word "UNSUBSCRIBE" in the subject.

Hi Vincent,
I was hoping to use the OCILIB vector fix in my current project. Do you see this as being looked at soon or will this be some time in future?
If not soon I will release using  OCI_BindArrayOfStrings and OCI_BindArrayOfNumbers.
Would you please confirm when this is scheduled to be checked?
Regards
John Gaeta
From: GAETA John (SPARQ)
Sent: Thursday, 29 November 2018 11:10 AM
To: 'vrogier/ocilib'; 'vrogier/ocilib'; vincent rogier (vince.rogier@gmail.com)
Cc: 'Author'
Subject: RE: [vrogier/ocilib] Help with using Collections in a stored proc (#178)
Hi Vincent,
Just check if you have had time to check this.
Cheers
John
From: GAETA John (SPARQ)
Sent: Friday, 23 November 2018 12:24 PM
To: 'vrogier/ocilib'; 'vrogier/ocilib'; vincent rogier (vince.rogier@gmail.com)
Cc: 'Author'
Subject: RE: [vrogier/ocilib] Help with using Collections in a stored proc (#178)
Hi Vincent,
Just a follow up
I tested using  vector this didn’t return an error but the stored proc did not run.
Cheers
John
From: GAETA John (SPARQ)
Sent: Friday, 23 November 2018 11:33 AM
To: 'vrogier/ocilib'; 'vrogier/ocilib'; vincent rogier (vince.rogier@gmail.com)
Cc: 'Author'
Subject: RE: [vrogier/ocilib] Help with using Collections in a stored proc (#178)
Hi Vince,
Sadly I am getting the same error
I have updated to version 4.6.0 and am still getting the same error as before.
          Statement st(con);
          ostring sql = ostring("Begin wp_slot.Modify_Associative (:p01, :p02); End;");
          st.Prepare(sql); int arrayNum = 4;
          std::vector<ostring> attribIdArray;
          attribIdArray.push_back(ostring("POLE - SPECIES"));
          attribIdArray.push_back(ostring("6 SIGMA"));
          attribIdArray.push_back(ostring("POLE - OWNER"));
          attribIdArray.push_back(ostring("POLE - FOUNDN"));
          st.Bind(ostring(":p01"), arrayNum, BindInfo::In);
          st.Bind(ostring(":p02"), attribIdArray, 254, BindInfo::In);
          st.ExecutePrepared();

"Oracle Error => ORA-06550: line 1, column 7:\nPLS-00306: wrong number or types of arguments in call to 'MODIFY_ASSOCIATIVE'\nORA-06550: line 1, column 7:\nPL/SQL: Statement ignored\n"
As I mentioned before OCI_BindArrayOfStrings works with the same stored proc. Can you see anything I’m doing wrong?
Stored proc I am calling…
TYPE Associative_Array IS TABLE OF VARCHAR2(255) INDEX BY BINARY_INTEGER;
PROCEDURE Modify_Associative (                              --
p_Attrib_Ct              IN        NUMBER,                              -- The number of attributes in the array
p_Attrib_Id              IN        wp_slot.Associative_Array
)
IS
ctr INTEGER;
BEGIN
FOR ctr IN 1..p_Attrib_Ct LOOP
LogMessage('p_Attrib_Id(' || ctr || '):' || p_Attrib_Id(ctr)) ;
END LOOP;
LogMessage('Associative_Array');
END;
From: GAETA John (SPARQ)
Sent: Friday, 23 November 2018 8:13 AM
To: 'vrogier/ocilib'; vrogier/ocilib; vincent rogier (vince.rogier@gmail.com)
Cc: Author
Subject: RE: [vrogier/ocilib] Help with using Collections in a stored proc (#178)
Thanks Vincent,
I see it there now. I will update this and let you know how I go.
Cheers
John
From: Vincent Rogier [mailto:notifications@github.com]
Sent: Wednesday, 21 November 2018 5:30 PM
To: vrogier/ocilib
Cc: GAETA John (SPARQ); Author
Subject: Re: [vrogier/ocilib] Help with using Collections in a stored proc (#178)
Hi,
Yes it is :)
I expect to create the release this evening (France timezone).
Regards,
Vincent
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/vrogier/ocilib/issues/178#issuecomment-440564545, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ApUg5VrdMTWcQbXNs00b9Bzm0xdX0aSyks5uxQEBgaJpZM4XJll1.
To report this email as spam, please forward to asa@websense.com

This email message (including any file attachments transmitted with it) is for the sole use of the intended recipient(s) and may contain confidential and legally privileged information. Any unauthorised review, use, alteration, disclosure or distribution of this email (including any attachments) by an unintended recipient is prohibited. If you have received this email in error, please notify the sender by return email and destroy all copies of the original message. Any confidential or legal professional privilege is not waived or lost by any mistaken delivery of the email. Energy Queensland Limited accepts no responsibility for the content of any email which is sent by an employee which is of a personal nature.
Sender Details:
Energy Queensland Limited
Level 6, 420 Flinders Street Townsville QLD 4810
(07) 4766 2900
Energy Queensland Limited policy is to not send unsolicited electronic messages. Suspected breaches of this policy can be reported by replying to this message including the original message and the word "UNSUBSCRIBE" in the subject.

To make it work, you need to use the flag added in 4.6.0 !
 `       st.Bind(ostring(":p02"), attribIdArray, 254, BindInfo::In, BindInfo::AsPlSqlTable);`

Regards,
Vincent

Hi Vincent
This is still not working for me. It no longer returns any error message or throw any exceptions but it doesn’t run the stored proc see below. It doesn’t even hit the first line which sends a simple message to a log table. I have tried / tested for both vector and vector.
As I mentioned before OCI_BindArrayOfStrings and OCI_BindArrayOfNumbers works.
Regards
John Gaeta
          ostring sql = ostring("Begin wp_slot.Modify_Associative (:p01, :p02); End;");
          st.Prepare(sql);

          Number arrayNum = 4;
          //std::vector<Number> attribIdArray;
          std::vector<ostring> attribIdArray;
          attribIdArray.push_back(ostring("1.3"));
          attribIdArray.push_back(ostring("3.6"));
          attribIdArray.push_back(ostring("100"));
          attribIdArray.push_back(ostring("200"));
          st.Bind(ostring(":p01"), arrayNum, BindInfo::In);

//            st.Bind(ostring(":p02"), attribIdArray, BindInfo::In, BindInfo::AsPlSqlTable);
st.Bind(ostring(":p02"), attribIdArray, 254, BindInfo::In, BindInfo::AsPlSqlTable);
st.ExecutePrepared();
--TYPE Associative_Array IS TABLE OF NUMBER(5,1)
--        INDEX BY BINARY_INTEGER;
TYPE Associative_Array IS TABLE OF VARCHAR2(255)
INDEX BY BINARY_INTEGER;
PROCEDURE Modify_Associative (                              --
p_Attrib_Ct              IN        NUMBER,                              -- The number of attributes in the array
p_Attrib_Id              IN OUT       wp_slot.Associative_Array
)
IS
ctr INTEGER;
BEGIN
LogMessage('Associative_Array');
FOR ctr IN 1..p_Attrib_Ct LOOP
LogMessage('p_Attrib_Id(' || ctr || '):' || to_char(p_Attrib_Id(ctr))) ;
p_Attrib_Id(ctr) := ctr;
END LOOP;
LogMessage('Associative_Array');
END;
From: Vincent Rogier [mailto:notifications@github.com]
Sent: Sunday, 9 December 2018 9:58 PM
To: vrogier/ocilib
Cc: GAETA John (SPARQ); Author
Subject: Re: [vrogier/ocilib] Help with using Collections in a stored proc (#178)
To make it work, you need to use the flag added in 4.6.0 !
       st.Bind(ostring(":p02"), attribIdArray, 254, BindInfo::In, BindInfo::AsPlSqlTable);
Regards,
Vincent
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/vrogier/ocilib/issues/178#issuecomment-445531335, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ApUg5VOaHOtBBholBpy6NybqGO7SW14kks5u3PrdgaJpZM4XJll1.
To report this email as spam, please forward to asa@websense.com

This email message (including any file attachments transmitted with it) is for the sole use of the intended recipient(s) and may contain confidential and legally privileged information. Any unauthorised review, use, alteration, disclosure or distribution of this email (including any attachments) by an unintended recipient is prohibited. If you have received this email in error, please notify the sender by return email and destroy all copies of the original message. Any confidential or legal professional privilege is not waived or lost by any mistaken delivery of the email. Energy Queensland Limited accepts no responsibility for the content of any email which is sent by an employee which is of a personal nature.
Sender Details:
Energy Queensland Limited
Level 6, 420 Flinders Street Townsville QLD 4810
(07) 4766 2900
Energy Queensland Limited policy is to not send unsolicited electronic messages. Suspected breaches of this policy can be reported by replying to this message including the original message and the word "UNSUBSCRIBE" in the subject.

Hi,
In fact, the previous fix allowed the vector data being passed to Oracle Client.
But only the content of 1st element of the vector was passed to Oracle.
I've just committed a fix on a new branch develop-4.6.1.
using this PL/SQL:
CREATE OR REPLACE PACKAGE WP_SLOT AS

TYPE Associative_Array IS TABLE OF VARCHAR2(255) INDEX BY BINARY_INTEGER;

END WP_SLOT;
/

CREATE OR REPLACE  PROCEDURE Modify_Associative
(
    p_Attrib_Ct              IN        NUMBER,
    p_Attrib_Id              IN        WP_SLOT.Associative_Array
  )
 IS
ctr INTEGER;
BEGIN

  FOR ctr IN 1..p_Attrib_Ct LOOP
    DBMS_OUTPUT.PUT_LINE('p_Attrib_Id(' || ctr || '):' || p_Attrib_Id(ctr)) ;
  END LOOP;

  DBMS_OUTPUT.PUT_LINE('Associative_Array');

END;
/

And following code:
            con.EnableServerOutput(10000, 10, 200);
            ostring sql = ostring("Begin Modify_Associative (:p01, :p02); End;");
            st.Prepare(sql); int arrayNum = 4;
            std::vector<ostring> attribIdArray;
            attribIdArray.push_back(ostring("POLE - SPECIES"));
            attribIdArray.push_back(ostring("6 SIGMA"));
            attribIdArray.push_back(ostring("POLE - OWNER"));
            attribIdArray.push_back(ostring("POLE - FOUNDN"));
            st.Bind(ostring(":p01"), arrayNum, BindInfo::In);
            st.Bind(ostring(":p02"), attribIdArray, 254, BindInfo::In, BindInfo::AsPlSqlTable);
            st.ExecutePrepared();

            std::string line;
            while (con.GetServerOutput(line))
            {
                ocout << line << oendl;
            }

Gives the following expected output:
p_Attrib_Id(1):POLE - SPECIES
p_Attrib_Id(2):6 SIGMA
p_Attrib_Id(3):POLE - OWNER
p_Attrib_Id(4):POLE - FOUNDN
Associative_Array

you can  retrieve the 3  hpp files in ocilib/include from the 4.6.1 branch for testing.
I will make a release shortly.
Best regards,
Vincent.

Thanks Vincent,
I have retrieved the 3 hpp files in ocilib/include from the 4.6.1 branch. I now get the following compile / link error
error LNK2005: "public: unsigned int __cdecl ocilib::BindArray::GetSize(void)" (?GetSize@BindArray@ocilib@@QEAAIXZ) already defined in wpautocad.obj
error LNK2005: "public: unsigned int __cdecl ocilib::BindArray::GetSizeForBindCall(void)" (?GetSizeForBindCall@BindArray@ocilib@@QEAAIXZ) already defined in wpautocad.obj
I have a class that inherits from ocilib::Connection
Am I doing something wrong?
Regards
John
From: Vincent Rogier [mailto:notifications@github.com]
Sent: Tuesday, 11 December 2018 9:50 PM
To: vrogier/ocilib
Cc: GAETA John (SPARQ); Author
Subject: Re: [vrogier/ocilib] Help with using Collections in a stored proc (#178)
Hi,
In fact, the previous fix allowed the vector data being passed to Oracle Client.
But only the content of 1st element of the vector was passed to Oracle.
I've just committed a fix on a new branch develop-4.6.1.
using this PL/SQL:
CREATE OR REPLACE PACKAGE WP_SLOT AS
TYPE Associative_Array IS TABLE OF VARCHAR2(255) INDEX BY BINARY_INTEGER;
END WP_SLOT;
/
CREATE OR REPLACE  PROCEDURE Modify_Associative
(
p_Attrib_Ct              IN        NUMBER,

p_Attrib_Id              IN        WP_SLOT.Associative_Array

)
IS
ctr INTEGER;
BEGIN
FOR ctr IN 1..p_Attrib_Ct LOOP
DBMS_OUTPUT.PUT_LINE('p_Attrib_Id(' || ctr || '):' || p_Attrib_Id(ctr)) ;

END LOOP;
DBMS_OUTPUT.PUT_LINE('Associative_Array');
END;
/
And following code:
        con.EnableServerOutput(10000, 10, 200);

        ostring sql = ostring("Begin Modify_Associative (:p01, :p02); End;");

        st.Prepare(sql); int arrayNum = 4;

        std::vector<ostring> attribIdArray;

        attribIdArray.push_back(ostring("POLE - SPECIES"));

        attribIdArray.push_back(ostring("6 SIGMA"));

        attribIdArray.push_back(ostring("POLE - OWNER"));

        attribIdArray.push_back(ostring("POLE - FOUNDN"));

        st.Bind(ostring(":p01"), arrayNum, BindInfo::In);

        st.Bind(ostring(":p02"), attribIdArray, 254, BindInfo::In, BindInfo::AsPlSqlTable);

        st.ExecutePrepared();

        std::string line;

        while (con.GetServerOutput(line))

        {

            ocout << line << oendl;

        }

Gives the following expected output:
p_Attrib_Id(1):POLE - SPECIES
p_Attrib_Id(2):6 SIGMA
p_Attrib_Id(3):POLE - OWNER
p_Attrib_Id(4):POLE - FOUNDN
Associative_Array
you can retrieve the 3 hpp files in ocilib/include from the 4.6.1 branch for testing.
I will make a release shortly.
Best regards,
Vincent.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/vrogier/ocilib/issues/178#issuecomment-446175334, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ApUg5UGqleA6n63tIEF2PDI39CoUjKE9ks5u35vZgaJpZM4XJll1.
To report this email as spam, please forward to asa@websense.com

This email message (including any file attachments transmitted with it) is for the sole use of the intended recipient(s) and may contain confidential and legally privileged information. Any unauthorised review, use, alteration, disclosure or distribution of this email (including any attachments) by an unintended recipient is prohibited. If you have received this email in error, please notify the sender by return email and destroy all copies of the original message. Any confidential or legal professional privilege is not waived or lost by any mistaken delivery of the email. Energy Queensland Limited accepts no responsibility for the content of any email which is sent by an employee which is of a personal nature.
Sender Details:
Energy Queensland Limited
Level 6, 420 Flinders Street Townsville QLD 4810
(07) 4766 2900
Energy Queensland Limited policy is to not send unsolicited electronic messages. Suspected breaches of this policy can be reported by replying to this message including the original message and the word "UNSUBSCRIBE" in the subject.

Hi,
I've forgotten the keyword 'inline' on the 2 newly added methods in
previous commit.
I've just committed the change on the 4.6.1 branch.
Get again ocilib_impl.hpp file.
Regards
Vincent

Thanks, that makes sense.
I will try again
Regards
John
From: Vincent Rogier [mailto:notifications@github.com]
Sent: Wednesday, 12 December 2018 3:39 PM
To: vrogier/ocilib
Cc: GAETA John (SPARQ); Author
Subject: Re: [vrogier/ocilib] Help with using Collections in a stored proc (#178)
Hi,
I've forgotten the keyword 'inline' on the 2 newly added methods in
previous commit.
I've just committed the change on the 4.6.1 branch.
Get again ocilib_impl.hpp file.
Regards
Vincent
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/vrogier/ocilib/issues/178#issuecomment-446468714, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ApUg5VrwdWAnmHGlNYgIKmW0xWRW854eks5u4JaRgaJpZM4XJll1.
To report this email as spam, please forward to asa@websense.com

This email message (including any file attachments transmitted with it) is for the sole use of the intended recipient(s) and may contain confidential and legally privileged information. Any unauthorised review, use, alteration, disclosure or distribution of this email (including any attachments) by an unintended recipient is prohibited. If you have received this email in error, please notify the sender by return email and destroy all copies of the original message. Any confidential or legal professional privilege is not waived or lost by any mistaken delivery of the email. Energy Queensland Limited accepts no responsibility for the content of any email which is sent by an employee which is of a personal nature.
Sender Details:
Energy Queensland Limited
Level 6, 420 Flinders Street Townsville QLD 4810
(07) 4766 2900
Energy Queensland Limited policy is to not send unsolicited electronic messages. Suspected breaches of this policy can be reported by replying to this message including the original message and the word "UNSUBSCRIBE" in the subject.

Compiled ok, I will test tomorrow morning.
Regards
john
From: GAETA John (SPARQ)
Sent: Wednesday, 12 December 2018 3:41 PM
To: 'vrogier/ocilib'; vrogier/ocilib
Cc: Author
Subject: RE: [vrogier/ocilib] Help with using Collections in a stored proc (#178)
Thanks, that makes sense.
I will try again
Regards
John
From: Vincent Rogier [mailto:notifications@github.com]
Sent: Wednesday, 12 December 2018 3:39 PM
To: vrogier/ocilib
Cc: GAETA John (SPARQ); Author
Subject: Re: [vrogier/ocilib] Help with using Collections in a stored proc (#178)
Hi,
I've forgotten the keyword 'inline' on the 2 newly added methods in
previous commit.
I've just committed the change on the 4.6.1 branch.
Get again ocilib_impl.hpp file.
Regards
Vincent
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/vrogier/ocilib/issues/178#issuecomment-446468714, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ApUg5VrwdWAnmHGlNYgIKmW0xWRW854eks5u4JaRgaJpZM4XJll1.
To report this email as spam, please forward to asa@websense.com

This email message (including any file attachments transmitted with it) is for the sole use of the intended recipient(s) and may contain confidential and legally privileged information. Any unauthorised review, use, alteration, disclosure or distribution of this email (including any attachments) by an unintended recipient is prohibited. If you have received this email in error, please notify the sender by return email and destroy all copies of the original message. Any confidential or legal professional privilege is not waived or lost by any mistaken delivery of the email. Energy Queensland Limited accepts no responsibility for the content of any email which is sent by an employee which is of a personal nature.
Sender Details:
Energy Queensland Limited
Level 6, 420 Flinders Street Townsville QLD 4810
(07) 4766 2900
Energy Queensland Limited policy is to not send unsolicited electronic messages. Suspected breaches of this policy can be reported by replying to this message including the original message and the word "UNSUBSCRIBE" in the subject.

Hi Vincent,
The vector binding for BindInfo::In is working now but I am getting some peculiar results using out direction (BindInfo::InOut).
For “Number” the vector appears to retain the IN values
For “VARCHAR2” I only get 1 char returned.
Would you please test BindInfo::InOut / BindInfo::Out for Number and VARCHAR2 to see what you get.
Regards
John Gaeta
From: Vincent Rogier [mailto:notifications@github.com]
Sent: Tuesday, 11 December 2018 9:50 PM
To: vrogier/ocilib
Cc: GAETA John (SPARQ); Author
Subject: Re: [vrogier/ocilib] Help with using Collections in a stored proc (#178)
Hi,
In fact, the previous fix allowed the vector data being passed to Oracle Client.
But only the content of 1st element of the vector was passed to Oracle.
I've just committed a fix on a new branch develop-4.6.1.
using this PL/SQL:
CREATE OR REPLACE PACKAGE WP_SLOT AS
TYPE Associative_Array IS TABLE OF VARCHAR2(255) INDEX BY BINARY_INTEGER;
END WP_SLOT;
/
CREATE OR REPLACE  PROCEDURE Modify_Associative
(
p_Attrib_Ct              IN        NUMBER,

p_Attrib_Id              IN        WP_SLOT.Associative_Array

)
IS
ctr INTEGER;
BEGIN
FOR ctr IN 1..p_Attrib_Ct LOOP
DBMS_OUTPUT.PUT_LINE('p_Attrib_Id(' || ctr || '):' || p_Attrib_Id(ctr)) ;

END LOOP;
DBMS_OUTPUT.PUT_LINE('Associative_Array');
END;
/
And following code:
        con.EnableServerOutput(10000, 10, 200);

        ostring sql = ostring("Begin Modify_Associative (:p01, :p02); End;");

        st.Prepare(sql); int arrayNum = 4;

        std::vector<ostring> attribIdArray;

        attribIdArray.push_back(ostring("POLE - SPECIES"));

        attribIdArray.push_back(ostring("6 SIGMA"));

        attribIdArray.push_back(ostring("POLE - OWNER"));

        attribIdArray.push_back(ostring("POLE - FOUNDN"));

        st.Bind(ostring(":p01"), arrayNum, BindInfo::In);

        st.Bind(ostring(":p02"), attribIdArray, 254, BindInfo::In, BindInfo::AsPlSqlTable);

        st.ExecutePrepared();

        std::string line;

        while (con.GetServerOutput(line))

        {

            ocout << line << oendl;

        }

Gives the following expected output:
p_Attrib_Id(1):POLE - SPECIES
p_Attrib_Id(2):6 SIGMA
p_Attrib_Id(3):POLE - OWNER
p_Attrib_Id(4):POLE - FOUNDN
Associative_Array
you can retrieve the 3 hpp files in ocilib/include from the 4.6.1 branch for testing.
I will make a release shortly.
Best regards,
Vincent.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/vrogier/ocilib/issues/178#issuecomment-446175334, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ApUg5UGqleA6n63tIEF2PDI39CoUjKE9ks5u35vZgaJpZM4XJll1.
To report this email as spam, please forward to asa@websense.com

This email message (including any file attachments transmitted with it) is for the sole use of the intended recipient(s) and may contain confidential and legally privileged information. Any unauthorised review, use, alteration, disclosure or distribution of this email (including any attachments) by an unintended recipient is prohibited. If you have received this email in error, please notify the sender by return email and destroy all copies of the original message. Any confidential or legal professional privilege is not waived or lost by any mistaken delivery of the email. Energy Queensland Limited accepts no responsibility for the content of any email which is sent by an employee which is of a personal nature.
Sender Details:
Energy Queensland Limited
Level 6, 420 Flinders Street Townsville QLD 4810
(07) 4766 2900
Energy Queensland Limited policy is to not send unsolicited electronic messages. Suspected breaches of this policy can be reported by replying to this message including the original message and the word "UNSUBSCRIBE" in the subject.

Hi,
Regarding the vector, I have created the issue #189  an committed a fix for it in v4.6.1 branch (3016761)
For vector of numbers, I get the content of the vector updated as expected.
Regards,
Vincent

Hi Vincent,
This is still not working for both “Out” vector and  vector binds
“In” vector binds are working.
For bind “Out” vector it appears to get the first element returned from the stored proc, but each char of the returned string is spread over the vector see example below
Expected returned strings from stored proc
‘First’, ‘Second’, ‘Third’,  ‘Forth’
std::vector attribIdArray;
attribIdArray[0] is ‘F’
attribIdArray[1] is ‘i’
attribIdArray[2] is ‘r’
attribIdArray[3] is ‘s’
For bind “Out” vector
Expected returned numbers from stored proc 311, 312, 313, 314
std::vector attribIdArray;
I get “Access violation reading location” when using
attribIdArray[0].ToString();
As before it works ok for OCI_BindArrayOfStrings and OCI_BindArrayOfNumbers.
Regards
John Gaeta
From: Vincent Rogier [mailto:notifications@github.com]
Sent: Friday, 14 December 2018 10:07 PM
To: vrogier/ocilib
Cc: GAETA John (SPARQ); Author
Subject: Re: [vrogier/ocilib] Help with using Collections in a stored proc (#178)
Hi,
Regarding the vector, I have created the issue #189https://github.com/vrogier/ocilib/issues/189 an committed a fix for it in v4.6.1 branch (3016761https://github.com/vrogier/ocilib/commit/30167615532d09a38eccd89a98df953fd8d26d0b)
For vector of numbers, I get the content of the vector updated as expected.
Regards,
Vincent
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/vrogier/ocilib/issues/178#issuecomment-447306034, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ApUg5dgu6ZWgLG3QMrCaa3-kyJ5XwrCaks5u45RJgaJpZM4XJll1.
To report this email as spam, please forward to asa@websense.com

This email message (including any file attachments transmitted with it) is for the sole use of the intended recipient(s) and may contain confidential and legally privileged information. Any unauthorised review, use, alteration, disclosure or distribution of this email (including any attachments) by an unintended recipient is prohibited. If you have received this email in error, please notify the sender by return email and destroy all copies of the original message. Any confidential or legal professional privilege is not waived or lost by any mistaken delivery of the email. Energy Queensland Limited accepts no responsibility for the content of any email which is sent by an employee which is of a personal nature.
Sender Details:
Energy Queensland Limited
Level 6, 420 Flinders Street Townsville QLD 4810
(07) 4766 2900
Energy Queensland Limited policy is to not send unsolicited electronic messages. Suspected breaches of this policy can be reported by replying to this message including the original message and the word "UNSUBSCRIBE" in the subject.

After further testing I found that for bind std::vector with bind direction BindInfo::InOut I would get the “Access violation reading location” error after calling ToString();
For bind std::vector with bind direction BindInfo::Out I didn’t get the “Access violation reading location” error after calling ToString() but the return values were NULL. I expected the values to be valid, similar to what was returned using OCI_BindArrayOfNumbers.
Regards
John Gaeta
From: GAETA John (SPARQ)
Sent: Monday, 17 December 2018 1:29 PM
To: 'vrogier/ocilib'; 'vrogier/ocilib'
Cc: 'Author'
Subject: RE: [vrogier/ocilib] Help with using Collections in a stored proc (#178)
Sorry Vincent,
Please ignore my previous email. I was still using the earlier version of ocilib_impl.hpp
After initial tests it appears that bind “Out” vector is working.
I am still having issues with using Number::ToString () this is causing an “Access violation reading location” error
For bind “Out” vector
Expected returned numbers from stored proc 311, 312, 313, 314
std::vector attribIdArray;
I get “Access violation reading location” when using
attribIdArray[0].ToString();
I get the same error if I use:
Number valNum;
ostring val;
valNum = attribIdArray[0];
val = valNum.ToString();
I will continue testing…
Regards
John Gaeta
From: GAETA John (SPARQ)
Sent: Monday, 17 December 2018 12:12 PM
To: 'vrogier/ocilib'; vrogier/ocilib
Cc: Author
Subject: RE: [vrogier/ocilib] Help with using Collections in a stored proc (#178)
Hi Vincent,
This is still not working for both “Out” vector and  vector binds
“In” vector binds are working.
For bind “Out” vector it appears to get the first element returned from the stored proc, but each char of the returned string is spread over the vector see example below
Expected returned strings from stored proc
‘First’, ‘Second’, ‘Third’,  ‘Forth’
std::vector attribIdArray;
attribIdArray[0] is ‘F’
attribIdArray[1] is ‘i’
attribIdArray[2] is ‘r’
attribIdArray[3] is ‘s’
For bind “Out” vector
Expected returned numbers from stored proc 311, 312, 313, 314
std::vector attribIdArray;
I get “Access violation reading location” when using
attribIdArray[0].ToString();
As before it works ok for OCI_BindArrayOfStrings and OCI_BindArrayOfNumbers.
Regards
John Gaeta
From: Vincent Rogier [mailto:notifications@github.com]
Sent: Friday, 14 December 2018 10:07 PM
To: vrogier/ocilib
Cc: GAETA John (SPARQ); Author
Subject: Re: [vrogier/ocilib] Help with using Collections in a stored proc (#178)
Hi,
Regarding the vector, I have created the issue #189https://github.com/vrogier/ocilib/issues/189 an committed a fix for it in v4.6.1 branch (3016761https://github.com/vrogier/ocilib/commit/30167615532d09a38eccd89a98df953fd8d26d0b)
For vector of numbers, I get the content of the vector updated as expected.
Regards,
Vincent
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/vrogier/ocilib/issues/178#issuecomment-447306034, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ApUg5dgu6ZWgLG3QMrCaa3-kyJ5XwrCaks5u45RJgaJpZM4XJll1.
To report this email as spam, please forward to asa@websense.com

This email message (including any file attachments transmitted with it) is for the sole use of the intended recipient(s) and may contain confidential and legally privileged information. Any unauthorised review, use, alteration, disclosure or distribution of this email (including any attachments) by an unintended recipient is prohibited. If you have received this email in error, please notify the sender by return email and destroy all copies of the original message. Any confidential or legal professional privilege is not waived or lost by any mistaken delivery of the email. Energy Queensland Limited accepts no responsibility for the content of any email which is sent by an employee which is of a personal nature.
Sender Details:
Energy Queensland Limited
Level 6, 420 Flinders Street Townsville QLD 4810
(07) 4766 2900
Energy Queensland Limited policy is to not send unsolicited electronic messages. Suspected breaches of this policy can be reported by replying to this message including the original message and the word "UNSUBSCRIBE" in the subject.

Hi,
Problem investigated => Created issue #191
Problem fixed => commit d34074f
Regards,
Vincent

Hi Vincent,
We are getting closer.
For bind std::vector with bind direction BindInfo::InOut this is now working
For bind std::vector with bind direction BindInfo::Out this returns values as NULL after calling ToString()
Should I be adding SetBindArraySize? If I do, I get the following error after st.ExecutePrepared()
“Unhandled exception at 0x000007FEB7E0E752 (orageneric12.dll) in acad.exe: 0xC0000005: Access violation reading location 0x000000000005C102.”
Also, if I don’t add the dummy values for the array (which is strange for  BindInfo::Out) I get the following error.
"ORA-06550: line 1, column 7:\nPLS-00306: wrong number or types of arguments in call to 'MODIFY_ASSOCIATIVE'\nORA-06550: line 1, column 7:\nPL/SQL: Statement ignored\n"
          Statement st(con);

          ostring sql = ostring("Begin wp_slot.Modify_Associative (:p01, :p02); End;");
          st.Prepare(sql);

          Number arrayNum(ostring("4"));
          std::vector<Number> attribIdArray;
          //st.SetBindArraySize(4);

          attribIdArray.push_back(ostring("101.3"));
          attribIdArray.push_back(ostring("7777"));
          attribIdArray.push_back(ostring("1001"));
          attribIdArray.push_back(ostring("2001"));

          ostring val;
          st.Bind(ostring(":p01"), arrayNum, BindInfo::In);

          st.Bind(ostring(":p02"), attribIdArray, BindInfo::Out, BindInfo::AsPlSqlTable);
          st.ExecutePrepared();

          Number valNum;
          for (int i = 0; i < attribIdArray.size(); i++)
          {
                 valNum = attribIdArray[i];
                 val = valNum.ToString();

          }

TYPE Associative_Array IS TABLE OF NUMBER(5,1)
INDEX BY BINARY_INTEGER;
PROCEDURE Modify_Associative (                              --
p_Attrib_Ct              IN        NUMBER,                              -- The number of attributes in the array
p_Attrib_Id                 OUT    wp_slot.Associative_Array
)
IS
ctr INTEGER;
BEGIN
p_Attrib_Id(1) := 100;
p_Attrib_Id(2) := 99.9;
p_Attrib_Id(3) := 200;
p_Attrib_Id(4) := 1000.3;
END;
From: Vincent Rogier [mailto:notifications@github.com]
Sent: Monday, 17 December 2018 6:38 PM
To: vrogier/ocilib
Cc: GAETA John (SPARQ); Author
Subject: Re: [vrogier/ocilib] Help with using Collections in a stored proc (#178)
Hi,
Problem investigated => Created issue #191https://github.com/vrogier/ocilib/issues/191
Problem fixed => commit d34074fhttps://github.com/vrogier/ocilib/commit/d34074fbc8664b1643e0861859696f1d8a4f2b70
Regards,
Vincent
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/vrogier/ocilib/issues/178#issuecomment-447763318, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ApUg5U9G-Aj55Q1dfOjKR8LS1IUEC-Fqks5u51ftgaJpZM4XJll1.
To report this email as spam, please forward to asa@websense.com

This email message (including any file attachments transmitted with it) is for the sole use of the intended recipient(s) and may contain confidential and legally privileged information. Any unauthorised review, use, alteration, disclosure or distribution of this email (including any attachments) by an unintended recipient is prohibited. If you have received this email in error, please notify the sender by return email and destroy all copies of the original message. Any confidential or legal professional privilege is not waived or lost by any mistaken delivery of the email. Energy Queensland Limited accepts no responsibility for the content of any email which is sent by an employee which is of a personal nature.
Sender Details:
Energy Queensland Limited
Level 6, 420 Flinders Street Townsville QLD 4810
(07) 4766 2900
Energy Queensland Limited policy is to not send unsolicited electronic messages. Suspected breaches of this policy can be reported by replying to this message including the original message and the word "UNSUBSCRIBE" in the subject.

Hi,
Problem investigated => Created issue #192
Problem fixed => commit 710285e
Regards,
Vincent

Hi Vincent,
I’m now getting a compile error
Error      122         error C2039: 'Value' : is not a member of 'ocilib::NumericTypeResolver'                c:\user\projects\ocilib\include\ocilib_impl.hpp 1866
Error      123         error C2065: 'Value' : undeclared identifier           c:\user\projects\ocilib\include\ocilib_impl.hpp 1866
Regards
John
From: Vincent Rogier [mailto:notifications@github.com]
Sent: Tuesday, 18 December 2018 6:17 PM
To: vrogier/ocilib
Cc: GAETA John (SPARQ); Author
Subject: Re: [vrogier/ocilib] Help with using Collections in a stored proc (#178)
Hi,
Problem investigated => Created issue #192https://github.com/vrogier/ocilib/issues/192
Problem fixed => commit 710285ehttps://github.com/vrogier/ocilib/commit/710285e4da42bae37a67aa6c64e676cd4dc4e741
Regards,
Vincent
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/vrogier/ocilib/issues/178#issuecomment-448134239, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ApUg5WKnJMO9ersNLeBGW8piLgVZfAiaks5u6KSEgaJpZM4XJll1.
To report this email as spam, please forward to asa@websense.com

This email message (including any file attachments transmitted with it) is for the sole use of the intended recipient(s) and may contain confidential and legally privileged information. Any unauthorised review, use, alteration, disclosure or distribution of this email (including any attachments) by an unintended recipient is prohibited. If you have received this email in error, please notify the sender by return email and destroy all copies of the original message. Any confidential or legal professional privilege is not waived or lost by any mistaken delivery of the email. Energy Queensland Limited accepts no responsibility for the content of any email which is sent by an employee which is of a personal nature.
Sender Details:
Energy Queensland Limited
Level 6, 420 Flinders Street Townsville QLD 4810
(07) 4766 2900
Energy Queensland Limited policy is to not send unsolicited electronic messages. Suspected breaches of this policy can be reported by replying to this message including the original message and the word "UNSUBSCRIBE" in the subject.

What is your visual studio version?

The error occurs if T is not a supported numeric type by operator = (signed/unsigned short, int, big_int, float, double, Number).
If you try to assign something else like a string, you will get the error. I suspect that is what happens to you.
The error thus would be expected.
Use FromString() to assign a string.
Regards,
Vincent

Ok thanks, are you working late?
From: Vincent Rogier [mailto:notifications@github.com]
Sent: Thursday, 20 December 2018 7:41 AM
To: vrogier/ocilib
Cc: GAETA John (SPARQ); Author
Subject: Re: [vrogier/ocilib] Help with using Collections in a stored proc (#178)
The error occurs if T is not a supported numeric type by operator = (signed/unsigned short, int, big_int, float, double, Number).
If you try to assign something else like a string, you will get the error. I suspect that is what happens to you.
The error thus would be expected.
Use FromString() to assign a string.
Regards,
Vincent
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/vrogier/ocilib/issues/178#issuecomment-448753559, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ApUg5bvpJRlPVDNOr0uu9cxpQdHeIA4xks5u6rJogaJpZM4XJll1.
To report this email as spam, please forward to asa@websense.com

This email message (including any file attachments transmitted with it) is for the sole use of the intended recipient(s) and may contain confidential and legally privileged information. Any unauthorised review, use, alteration, disclosure or distribution of this email (including any attachments) by an unintended recipient is prohibited. If you have received this email in error, please notify the sender by return email and destroy all copies of the original message. Any confidential or legal professional privilege is not waived or lost by any mistaken delivery of the email. Energy Queensland Limited accepts no responsibility for the content of any email which is sent by an employee which is of a personal nature.
Sender Details:
Energy Queensland Limited
Level 6, 420 Flinders Street Townsville QLD 4810
(07) 4766 2900
Energy Queensland Limited policy is to not send unsolicited electronic messages. Suspected breaches of this policy can be reported by replying to this message including the original message and the word "UNSUBSCRIBE" in the subject.

authors: J-Gaeta vrogier

repo: vrogier/ocilib


text:
AddressSanitizer reports error in ManagedBuffer

During test with AddressSanitizer ocilib triggers an error in ManagedBuffer:
==tpsworker==1188529==ERROR: AddressSanitizer: alloc-dealloc-mismatch (operator new [] vs operator delete) on 0x61d000042e80
    #0 0x7f609d5a8025 in operator delete(void*, unsigned long) (/lib/x86_64-linux-gnu/libasan.so.5+0x111025)
    #1 0x7f609d45f4e9 in ocilib::core::ManagedBuffer<char>::~ManagedBuffer() /build/share/ocilib/4.7.2/include/ocilibcpp/detail/core/ManagedBuffer.hpp:47
    #2 0x7f609d45f4e9 in ocilib::Lob<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, 2>::Read(unsigned int) /build/share/ocilib/4.7.2/include/ocilibcpp/detail/Lob.hpp:54
    ...
0x61d000042e80 is located 0 bytes inside of 2055-byte region [0x61d000042e80,0x61d000043687)
allocated by thread T10 here:
    #0 0x7f609d5a6b47 in operator new[](unsigned long) (/lib/x86_64-linux-gnu/libasan.so.5+0x10fb47)
    #1 0x7f609d4519b9 in ocilib::core::ManagedBuffer<char>::ManagedBuffer(unsigned long) /build/share/ocilib/4.7.2/include/ocilibcpp/detail/core/ManagedBuffer.hpp:40
    #2 0x7f609d45f34a in ocilib::Lob<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, 2>::Read(unsigned int) /build/share/ocilib/4.7.2/include/ocilibcpp/detail/Lob.hpp:54
    ...

This was on Ubuntu 20.04 using clang 10 with ocilib 4.7.2.

Hi,
Thanks for reporting the issue!
This will fixed.
Regards,
Vincent

Thanks Vincent!  And thanks for a terrific project!

Hi Vincent:
While regression testing this fix I found several other similar issues -- let me know if you'd like me to add to this issue or open a new one.  Thanks!

Hi,
Create a new issue :)
Thanks 👍
Vincent

source: gharchive/issue

authors: bill-torpey vrogier

license_type: permissive

license_source: bigquery


text:
[Icon Request] Support for Edge templating engine

Hey everyone ! 👋
Edge is the new templating engine used by AdonisJs, could be cool to have his icon available directly from this package!
Official website: http://edge.adonisjs.com/

[x] I'm sure this issue is not a duplicate?
[x] I want to create an icon request:
- Type: extension
- Icon Name: Edge
- Sample original Icon: https://github.com/file-icons/source/blob/master/svg/Edge.svg
- Extension: .edge

Also it's part of this repo if that helps https://github.com/file-icons/source/blob/master/svg/Edge.svg

One more thing, the official colour of the icon should be #d8563a 👍

Great, thanks for the heads up. We'll do it when we have more time. We're all busy nowadays. :/

authors: RomainLanz jens1o thetutlage

repo: vscode-icons/vscode-icons

license: mit


text:
[Icon Request] Support for plist

[x] I'm sure this issue is not a duplicate.

[x] I'm submitting an icon request:

Type: extension
Icon Name: plist
Sample original Icon: X Code uses a generic file icon with a 4 cell "grid" on it. Example:
Extensions: .plist

More info:
Property list file (basically a manifest) from Apple. Commonly used in iOS apps, macOS apps, Safari extensions, etc. It's just an XML file with a .plist extension. Example: https://github.com/bitwarden/browser/blob/master/src/safari/Info.plist

@vscode-icons/development I believe this could be associated to the config icon. Thoughts?

Yeah, good idea.

@robertohuertasm Your opinion?

I left a +1 reaction so I'm OK with it. :wink:

Apologies. Totally slipped me by.

Oh, no problem at all! I would have probably miss it myself!

authors: JimiC jens1o kspearrin robertohuertasm


text:
bug: Triple left-click selects the first character on the next line

Check the following:

[X] I have tried setting vscode-neovim.neovimClean in VSCode settings and restarting VSCode.
[X] I have read the vscode-neovim docs.
[X] I have searched existing (closed!) issues.

Neovim version (nvim -v)
v0.10.2
Operating system/version
Linux 6.11.5-arch1-1
Problem (including log messages)
Under normal mode, triple left-click (line-wise selection) also selects the first character on the next line. It should only select the current line.
Insert mode doesn't seem to have this issue.
Steps To Reproduce

Switch to normal mode
Triple left-click on any line
The first character on the next line is selected along the current line

Expected Behavior
Only the current line should be selected

This is the behavior of VS Code, which includes the line break at the end of the triple-clicked line. You can set :set selection=exclusive, but I recommend switching to insert mode before selecting with the mouse.

authors: monyxie xiyaowong

repo: vscode-neovim/vscode-neovim

license: MIT

license_source: github-api


text:
declare multiple vars gives error

The following code,
declare IS_{MAC,UBU,WIN,WIN_WSL,WIN_MSYS,WIN_GITBASH}=false

give this error

I can't replicate:

But regardless, by looking at the problem message, I don't think this is thrown by ShellCheck. Check your other Shell Script extensions.

I also use shell-format.
I disable and enable both extensions then the errors disappear.
Thank you for you time @felipecrs

authors: alanlivio felipecrs

repo: vscode-shellcheck/vscode-shellcheck


text:
Create es.js

Translation to spanish

Thanks!

I need to correcto something in http://vsn4ik.github.io/bootstrap-checkbox/. How could I do it? A new pull request?

Yes. The same you can open new issue or add a comment to the line of file with "code".

Thank you. Already found the way ;)

source: gharchive/pull-request


text:
Add SwiftQueue

Project URL
https://github.com/lucas34/SwiftQueue
Description
Job Scheduler with Concurrent run, failure/retry, persistence, repeat, delay and more
Why it should be included to awesome-ios (optional)
My requirement was quite simple, run tasks with execution constraints. I couldn't find any library for IOS that can do this easily. Existing libs are all lacking of functionalities. So I decided to make my own, inspired by popular job scheduler's library on android like android-priority-jobqueue or android-job.
Checklist

[X] Only one project/change is in this pull request
[X] Addition in chronological order (bottom of category)
[X] Supports iOS 9 / tvOS 10 or later
[X] Supports Swift 3 or later
[X] Has a commit from less than 2 years ago
[X] Has a clear README in English

          1 Warning

:warning:
Found 1 link issue, a project collaborator will take care of these, thanks :)

Link issue by awesome_bot

Line
Status
Link

2369
301
https://github.com/Swiftification/Dispatch redirects tohttps://github.com/JARMourato/Dispatch

  Generated by :no_entry_sign: Danger

Hey @lucas34, thanks for contributing! 👍
Please fix the issue above before we can merge your PR

I haven't worked with Danger before, but the Ci test failed because of "Danger does not have write access to the PR to set a PR status.". The first time I submitted my PR I got the report properly.

He means this issue https://github.com/lucas34/SwiftQueue/issues/3

Well I fix and closed the issue on my repo. If the bot try to update the status on my repo. It won't be able to do it. Should I give permission to awesome-bot on my repo or something ? Or make another PR. I'm a bit clueless about this PR permission issue.

Hey @lucas34, no problem! Thanks again for contributing!

authors: danger-awesome-ios dkhamsing lfarah lucas34

repo: vsouza/awesome-ios


text:
Add SwiftKafka

Project URL

https://github.com/IBM-Swift/SwiftKafka
Category

Messaging
Description

Add SwiftKafka, a Swift SDK for Apache Kafka maintained by IBM
Why it should be included to awesome-ios (mandatory)
Almost first well-shaped Swift SDK for using directly Apache Kafka.
Checklist

[ ] Has 50 GitHub stargazers or more. (Please consider)
[x] Only one project/change is in this pull request
[x] Isn't an archived project
[x] Has more than one contributor
[x] Has unit tests, integration tests or UI tests
[x] Addition in chronological order (bottom of category)
[x] Supports iOS 9 / tvOS 10 or later
[x] Supports Swift 4 or later
[x] Has a commit from less than 2 years ago
[x] Has a clear README in English

          1 Warning

:warning:
Found 3 link issues, a project collaborator will take care of these, thanks :)

Link issues by awesome_bot

Line
Status
Link

1891
301
https://github.com/xcpretty/trainer redirects tohttps://github.com/fastlane-community/trainer

2982
500
https://cocoapods.org/

3221
Error
https://ioscookies.com/  Failed to open TCP connection to ioscookies.com:443 (getaddrinfo: Name or service not known)

  Generated by :no_entry_sign: Danger

😐 would this be maintained?

@metasmile Thanks for contributing!

👍 @IBM-Swift

authors: danger-awesome-ios metasmile vsouza


text:
[WIP] Feature/region

WIP
What's the purpose of this pull request?
Considering the context, what is the problem we'll solve? Where in VTEX's big picture our issue fits in? Write a tweet about the context and the problem itself.
How it works?
Tell us the role of the new feature, or component, in its context.
How to test it?
Describe the steps with bullet points. Is there any external link that can be used to better test it or an example?
References
Spread the knowledge: is there any content you used to create this PR that is worth sharing?
Extra tip: adding references to related issues or mentioning people important to this PR may be good for the documentation and reviewing process

closed in favour of this behemoth https://github.com/vtex/faststore/pull/579/files

repo: vtex/faststore


text:
Feature adicionar itens no carrinho com attachments

[x] Feature
[ ] Bug

Qual o comportamento atual?
Atualmente ao adicionar no carrinho um produto com AddToCart é preciso procurar pelo index dele para poder adicionar o attachment do mesmo.
Qual o comportamento esperado?
Seria interessante uma função AddToCartWithAttachments  que adiciona um ou mais itens no carrinho e inclui os attachments por parâmetro.
Ainda se fosse possível, seria muito bom otimizar a requisição em uma só, adicionando produto + attachment numa unica requisição.

Oi, @ViniciusAudibert, isso foi recentemente lançado na API. Fiz uma alteração no vtex.js para poder fazer isso com ele tambem. Está aguardando revisão do time no PR #36.
Um exemplo de uso seria:
const item = {
  id: '53',
  seller: '1',
  quantity: 1,
  attachments: [
    {
      name: 'Personalização',
      content: {
        Nome: 'Breno'
      }
    }
  ]
}
const items = [ item ];
vtexjs.checkout.addToCart(items);

authors: ViniciusAudibert klzns


text:
Ajax problem for widget.subscribers - one toolbar, two grids

Hello,
I need to add two grids, which could be filtered by one toolbar. I created two different grids with full features, separated controllers and one toolbar with array of subscribers.
Everything works fine if I don't use searching. If I do - only the last grid is filtered. The first one is endless loading.
Iteration by subscribers works, I can see pagerUrl and each subscriber object properly. The problem is that _getPage() execute only the last query:  $.bforms.ajax(ajaxOptions); so the first grid doesn't load corectly.
I would be grateful for any solution.
Ewelina

OK, it seems to be solved by setting uniqueName... :)

repo: vtfuture/BForms


text:
Custom elements that use vue components within have slot elements removed

Vue version
3.4.15
Link to minimal reproduction
https://stackblitz.com/edit/vitejs-vite-c7zg8g?file=src%2FApp.vue
Steps to reproduce
Wait for the stackblitz to show the app in the viewport. No further action is required to reproduce the issue.
What is expected?
I would expect that <slot name="nested-test" /> would appear in the DOM in the same way <slot name="test" /> appears.
What is actually happening?
It appears that the nested-test slot is being parsed as a Vue slot, instead of a standard html slot. Only the test slot appears in the DOM.
System Info
No response
Any additional comments?
No response

That is by design. If the normal component started rendering <slot> DOM elements, you would  lose the ability to use Vue slots in any child component that you use in your web component.
What you can do is this:
<script setup>
import NestedBox from './nested-box.vue';
</script>

<template>
  <slot name="test" />
  <nested-box>
    <template v-slot:nested-test>
      <slot name="nested-test" />
    </template>
  </nested-box>
</template>

authors: LinusBorg jhardbower

repo: vuejs/core


text:
[bug] fail to open assets in editor on macOS

description
fail to open assets in editor on macOS
https://github.com/vuejs/devtools-next/assets/50254496/ce3763c8-1d24-469a-ba98-d0eaf70ab975
version
"vite-plugin-vue-devtools": "^7.0.11",
env info

System:

OS: macOS 14.3
CPU: (10) arm64 Apple M1 Pro
Memory: 3.53 GB / 32.00 GB
Shell: 5.9 - /bin/zsh

Binaries:

Node: 20.11.0 - ~/Library/Caches/fnm_multishells/64820_1705656024800/bin/node
npm: 10.2.4 - ~/Library/Caches/fnm_multishells/64820_1705656024800/bin/npm
pnpm: 8.14.1 - ~/Library/pnpm/pnpm

Browsers:

Chrome: 120.0.6099.234

npmPackages:

vue: ^3.4.15 => 3.4.15

additional context
It works in the stackblitz.
URL: https://stackblitz.com/edit/vitejs-vite-b2m26r?file=vite.config.ts

/cc @webfansplz Does package.json should be here？

Yeah, I think it makes sense to show it.

Same configuration (mostly) and same issue as @LoTwT

@LoTwT Can you show your real file path and the incorrect file path of the assets page? You can hover the file path row to get the details.

@LoTwT Can you show your real file path and the incorrect file path of the assets page? You can hover the file path row to get the details.

The filepath on the assets page:

The filepath copied in VSCode: /Users/caoyujie/codes/vite-assets/package.json.
They are the same indeed.

Unfortunately, I can't reproduce this issue, so we need your help to test it. The capabilities of our openInEditor feature are supported by Vite built-in.
Can you test this Vite feature? That will help us to find out if this is an upstream issue. Thank you.

Unfortunately, I can't reproduce this issue, so we need your help to test it. The capabilities of our openInEditor feature are supported by Vite built-in.
Can you test this Vite feature? That will help us to find out if this is an upstream issue. Thank you.

Thanks.
I tried the URL http://localhost:5173/__open-in-editor?file=package.json manually. It comes into the same error. I will try to find the problem myself locally.

Unfortunately, I can't reproduce this issue, so we need your help to test it. The capabilities of our openInEditor feature are supported by Vite built-in.
Can you test this Vite feature? That will help us to find out if this is an upstream issue. Thank you.

Thanks.
I tried the URL http://localhost:5173/__open-in-editor?file=package.json manually. It comes into the same error. I will try to find the problem myself locally.

No... the query file should be your absolute file path, try it out

After looking around the codebase of launch-editor-middleware, I find that the command to open VSCode on macOS is code. It means that developers must install the command code in PATH. Unfortunately, I didn't set it well.
How to set:

open a VSCode
use Shift + Command + P open All Commands panel
input Shell Command: Install 'code' command in PATH and select
install successfully

After setting it, I successfully open the target file in the VSCode.
Hi, @titibudala . Could you try the above solution? 😊

I'll mention it in the document, also be related to #125

Yesss! That was it @LoTwT, thank you! 🫡

authors: LoTwT alexzhang1030 titibudala webfansplz

repo: vuejs/devtools-next


text:
Vue Detected No Components Shown

Vue devtools version
6.6.3
Link to minimal reproduction
https://play.vuejs.org/#eNp9kUFLwzAUx7/KM5cqzBXR0+gGKgP1oKKCl1xG99ZlpklIXuag9Lv7krK5w9it7//7v/SXthP3zo23EcVEVKH2yhEEpOhm0qjWWU/QgccV9LDytoWCq4U00tTWBII2NDBN/LJ4Qq0tfFuvlxfFlTRVORzHB/FA2Dq9IOQJoFrfzLouL/d9VfKUU2VcJNhet3aJeioFcymgZFiVR/tiJCjw61eqGW+CNWzepX0pats6pdG/OVKsJ8UEMklswXa/LzkjH3G0z+s11j8n8k3YpUyKd48B/RalODBa+AZpwPPPV9zx8wGyfdTcPgM/MFgdk+NQe4hmydpHvWz7nL+/Ms1XmO8ITdhfKommZp/7UvA/eTxz9X/d2/Fd3pOmF/0fEx+nNQ==
Steps to reproduce & screenshots
Spin up React with init vue @ latest
What is expected?
components.
What is actually happening?
there's just no components
System Info
System:
    OS: Linux 5.15 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish)
    CPU: (16) x64 AMD Ryzen 7 7800X3D 8-Core Processor
    Memory: 27.96 GB / 30.91 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 20.11.0 - ~/.asdf/installs/nodejs/20.11.0/bin/node
    Yarn: 1.22.22 - ~/.asdf/installs/nodejs/20.11.0/bin/yarn
    npm: 10.8.2 - ~/.asdf/plugins/nodejs/shims/npm
  npmPackages:
    vue: ^3.4.31 => 3.4.32

Any additional comments?
No response

Looking at your minimal reproduction, I don't think you made a separate component, but is there anything in the component window at all?
I mean I'm just wondering if the minimum  or  thing is not printed at all

We have the same problem. Using chrome, v6.6.3 of devtools. Using vue1 (it worked until latest update).
The vue devtools are just totally blank, no components or data.

+1

authors: Procrustes5 gotemmakindstrom shchegol tetrakra


text:
TS inlay hints disappear in Vue files

In .vue files, the TS inlay hints disapper inside the <script setup lang="ts">:

But in .ts files they are correctly shown:

Related settings:
{
  "editor.inlayHints.enabled": "onUnlessPressed",
  "typescript.inlayHints.functionLikeReturnTypes.enabled": true,
  "typescript.inlayHints.parameterNames.enabled": "all",
  "typescript.inlayHints.parameterTypes.enabled": true,
  "typescript.inlayHints.propertyDeclarationTypes.enabled": true,
  "typescript.inlayHints.variableTypes.enabled": true,
  "vue.inlayHints.inlineHandlerLeading": true,
  "vue.inlayHints.missingProps": true,
  "vue.inlayHints.optionsWrapper": true,
  "vue.inlayHints.vBindShorthand": true,
}

Version info:
Version: 1.87.1 (Universal)
Commit: 1e790d77f81672c49be070e04474901747115651
Date: 2024-03-06T00:23:16.418Z
Electron: 27.3.2
ElectronBuildId: 26836302
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: 11.8.172.18-electron.0
OS: Darwin arm64 23.4.0

Name: Vue - Official
Id: Vue.volar
Description: Language Support for Vue
Version: 2.0.6
Publisher: Vue
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=Vue.volar

For configuring javascript use equivalent typescript.* settings.

For configuring javascript use equivalent javascript.* settings.

Is this a little bit confusing (since I'm using typescript here)?

True. lang=ts script blocks should follow typescript.* settings.

Closing this one as many things have changed since 2.x. Feel free to create a new issue with a minimal reproduction if you're still having issues, thanks!

authors: davidmatter rchl stone-zeng

repo: vuejs/language-tools


text:
Couldn't find package "@vue/cli-plugin-babel" on the "npm" registry

Version
4.2.2
Environment info
System:
    OS: Windows 10 10.0.16299
    CPU: (8) x64 Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz
  Binaries:
    Node: 12.13.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.13.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 6.13.6 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: 41.16299.1480.0
  npmGlobalPackages:
    @vue/cli: Not Found

Steps to reproduce
npm install -g @vue/cli
vue create my-project
What is expected?
New Vue app created
What is actually happening?
When I try create a new app, the error appears: error Couldn't find package "@vue/cli-plugin-babel" on the "npm" registry.

But it does exist: https://www.npmjs.com/package/@vue/cli-plugin-babel
Maybe it's a network/cache problem of npm. Please run npm cache clean -f and try again.

Same problem on Mac OS X 10.15

same news??

authors: MostGG assisgui asssc sodatea

repo: vuejs/vue-cli


text:
new ref sugar is not consistent with non-sugar ref in template refs

Version
3.2.0-beta.7
Reproduction link
https://sfc.vuejs.org/#eyJBcHAudnVlIjoiPHRlbXBsYXRlPlxuICA8ZGl2IHJlZj1cIm9sZFJlZlwiPk9sZFJlZjwvZGl2Plx0XG4gIDxkaXYgcmVmPVwic3VnYXJSZWZcIj5TdWdhclJlZjwvZGl2Plx0XG48L3RlbXBsYXRlPlxuXG48c2NyaXB0IHNldHVwPlxuaW1wb3J0IHsgcmVmIH0gZnJvbSAndnVlJ1xubGV0IG9sZFJlZiA9IHJlZigpXG5sZXQgc3VnYXJSZWYgPSAkcmVmKClcbmNvbnNvbGUubG9nKCdvbGRSZWYnLCBvbGRSZWYpXG5jb25zb2xlLmxvZygnc3VnYXJSZWYnLCBzdWdhclJlZilcbjwvc2NyaXB0PiJ9
Steps to reproduce
go to the minimal reproduction link, open the console and see that the new ref sugar is undefined
What is expected?
getting RefImpl
What is actually happening?
getting undefined

The expected result is getting the HTML element in the onMounted() hook. This is working properly

authors: davidbernegger posva

repo: vuejs/vue-next


text:
slots are not reactive in setup (but are in template via $slots)

Version
3.2.11
Reproduction link
github.com
Steps to reproduce

Run repro: yarn && yarn dev
Click "Toggle footer component"
Observe difference between Happy and Sad components

What is expected?
$slots.NAME and computed(() => !!slots.NAME) should function the same for detecting slot changes
What is actually happening?
Only $slots.name works, slots in the setup context doesn't appear to trigger reactivity.

$slots isn't reactive either and never has been. This would also not work and never worked in Vue 2 as well:

<template>

      <slot />

      <slot name="footer" />

I have detected the footer slot!

</template>

What happens is that the change of the slot content makes the component re-render, and during re-render, $slot.footer is being evaluated in the template.
You can use a simple function instead:
<template>

      <slot />

      <slot name="footer" />

I have detected the footer slot!

</template>

Thanks for the explanation and workaround @LinusBorg - sorry for the bad issue report!

authors: LinusBorg pearofducks


text:
Vue Migration build reports "deprecation WATCH_ARRAY" from RouterView

Version
4.0.8
Reproduction link
https://github.com/mgdodge/vue-router-next-bug
Steps to reproduce
Clone repo - vanilla vue cli project upgraded to vue 3.1.1 (migration build),   vue router and @vue/compat
Run npm ci to install from package-lock.json
Run npm run serve to start up via cli
Open site in browser
Note warning in browser console
What is expected?
No deprecation warnings
What is actually happening?
Seeing the following:
(deprecation WATCH_ARRAY) "watch" option or vm.$watch on an array value will no longer trigger on
array mutation unless the "deep" option is specified. If current usage is intended, you can disable the
compat behavior and suppress this warning with:

configureCompat({ WATCH_ARRAY: false })

Stack trace seems to indicate it is coming from this line in RouterView.ts
I am in the process of migrating a small site to Vue 3. I have addressed all of the browser warnings with the exception of this one. Since the RouterView is central to the app, it seems a critical place to have a warning about lost reactivity.

The compat mode is to be used with Vue router 3
That watcher is correct

@posva

That watcher is correct

if the usage is corrent and since vue-router v4 is only meant to be with vue 3 can't you remove the warning by adding
compatConfig { MODE: 3 }
to RouterView/RouterLink?  I try to upgrade my app to vue 3 but I see a lot of warnings from these components but I don't want to disable WATCH_ARRAY options just yet because I have a lot of stuff to update.

authors: mgdodge posva sqal

repo: vuejs/vue-router-next


text:
beforeRouteEnter Callback Invoked Multiple Times

It appears that anytime I set up beforeRouteEnter on certain routes in my app, they get invoked multiple times. Worth noting that these callbacks are asynchronous (async beforeRouteEnter (...)
Working on multiple apps, I've noticed a commonality between the two applications on this behavior: the amount of times the callback for beforeRouteEnter gets invoked aligns with the depth of nested routes.
For example, if the route I'm visiting happens to be nested to a point where a total of 4 <router-view></router-view> components are rendered, the callback, despite being added to the deepest-nested route, will be invoked 4 times.
This could be a coincidence and not necessarily have to do with the number of <router-view></router-view> components that exist in the application, but I thought it might be worth sharing.
Could somebody point me in the right direction? In my development environment, hitting an API endpoint 4x as frequently as I need to is less of a concern. But once we roll this app out to production, that won't do.
Thanks in advance for your help. Let me know if I can provide any specific snippets of my code that would be helpful.

@wdews hi there, I'm sorry the bot is a little succinct (maybe even harsh) with her replies.
What you describe does not look right to me, but I was not able to reproduce it: https://jsfiddle.net/ttvdhy41/5/
If you can provide a minimal reproduction, please feel free to open a new issue with a link to the reproduction. This would make it much easier for us to tell exactly what is going wrong.

Hey @simplesmiler, thanks for your reply. The bot caught me a little off-guard, but I see now how VueJS manages to regulate its issues so efficiently! Haha.
Thanks for looking in to this. I spent some time after the bot closed my issue attempting to reproduce the issue on a smaller scale in JSFiddle with no luck. That led me to look more closely at my codebase. Namely, the router.beforeEach callback I set up.
In my beforeEach callback, I was iterating over matched routes and, depending on whether or not certain conditions were met in the current iteration's route meta, I'd return next(). This was fine, save for the fact that I was iterating over matched routes using Array.some() so I could easily break out of iterating.
Unfortunately, because of the way I was returning next(), it wasn't properly breaking the iterations through the array. I swapped return next(); for next(); and return true; and I'm no longer invoking the "next" method multiple times.
Hopefully this helps someone else that happens to be running in to the same issue! Got a little sad when I realized how silly the issue was in the end.

Really, I shouldn't even be invoking next() from within the .some() callback whatsoever...

bug?

authors: boyet007 simplesmiler wdews

repo: vuejs/vue-router


text:
How to add ''/' in the end to link 'foo/' instead  'foo'

What problem does this feature solve?
I need add "/" to links in my project. I can change path in router setting on "path//" but i using nuxt , where routing  the generating . How I can settings that?
What does the proposed API look like?
add settings which will be add to path "/"

See https://github.com/vuejs/vue-router/issues/1443#issuecomment-308981849

Please, next time consider using the forum, the Discord server or StackOverflow for questions first. But feel free to come back and open an issue if it turns out to be a bug 🙂


text:
make use of user timing api if available

This introduces a client-side check for availability of the User Timing API and augments the genKey function to use performance.now instead of Date.now if the User Timing API is available.
The benefits of this change are:

the accuracy of the resulting _key is more precise in modern browsers
mitigates a false negative on Lighthouse (giving apps that use vue-router a better score for being a progressive web app)

The result in the key is a bit different though. Can you reference the false negative given by Lighthouse, please?

The result in the key is a bit different though. But it doesn't change anything.

@posva Behavior will likely differ as performance.now outputs microseconds (since the user started navigation) rather than milliseconds (since the unix epoch), i.e. this change will probably generate a larger number of keys in modern browsers

Can you reference the false negative given by Lighthouse, please? It's mostly curiosity

AFAIK there is no way for me to link a reference due to the nature of the tool, so here's a screenshot of the offending rule:

For a closer look, download the official chrome extension and run it on any site that uses vue-router (it works on localhost).

Screenshot is absolutely fine 👍 Thanks for sharing. Didn't know Lighthouse was checking that. Looks like a bit too much 😆

@posva I agree with you 100% - It's as if they've assumed performance.now() is a drop-in alternative to Date.now() for every use case. I shudder to think what users of moment.js will do about this :P

@fnlctrl @yyx990803 maybe you see an edge case I'm missing

@declandewet Unfortunately this doesn't remove the Lighthouse false positive

@posva - this removes the false positive on my end, must be one of your other dependencies :)

@declandewet Yes, I was testing with https://github.com/vuejs/vue-hackernews-2.0
the error disappears for the vendors but there're some Date usage in the app

@posva yeah - unfortunately there are valid use cases for Date over performance and it seems there were some concerns about this in the Lighthouse repo. I'm sure it will be addressed eventually.
The main benefit to focus on here is the one for accuracy - not the lighthouse audit :) since the getKey function is mostly (if not entirely) used in vue-router's scroll behaviour, consider it a progressively-enhanced micro-optimization for modern browsers.

(random rant)
Tried the lighthouse thing out, though I don't really know if all this fuss over Progressive Web App actually make any sense..
I only use Date.now() to get unix timestamps, and I don't care about precision (as long as I get incremental values), yet it marked my website not modern just because of that.
Also, it puts  Has a registered Service Worker on the top of the list. Wow, just wow. Seriously, since when did Google start recommending people something that's still a Working Draft? Service worker isn't even implemented by Safari/Edge yet.
It then suggested service workers can make your site work when offline. Hmm, interesting, but how? With Cache! ..and Guess what? Not supported by Safari/Edge.
Don't know if it's Safari being the new IE by lagging behind, or Chrome itself becoming the new IE by selling people those fancy new APIs when they're just Working Drafts.
(end of random rant)

@declandewet

The main benefit to focus on here is the one for accuracy - not the lighthouse audit :) since the getKey function is mostly (if not entirely) used in vue-router's scroll behaviour

Actually, accuracy isn't a concern here - Date.now() is only being used as unique keys. As long as Date.now() doesn't produce duplicates, it's fine.

I don't really know if all this fuss over Progressive Web App actually make any sense

@fnlctrl "Progressive Web App" is just a term used to describe a website that behaves like a mobile app using a combination of these technologies. When following these best practices, if a user visits your "progressive web app" a second time 5 minutes after their first visit, Chrome on Android will prompt them to install the website to the home screen and have it behave just like any other app on their phone. This removes the need for the user to 1. see the app advertised somewhere 2. search for the app in the play store and 3. download the app - it increases conversions for the site quite marginally. Obviously, there's a very real threat that PWAs might kill app stores - and the Apple App Store is too much of a cash cow for them to allow that to happen, unfortunately :( (I'm sure there are many other reasons too)

Actually, accuracy isn't a concern here - Date.now() is only being used as unique keys. As long as Date.now() doesn't produce duplicates, it's fine.

Date.now() can produce duplicates. It's a 1 in 1,000,000 chance, but it can happen.

Well, for vue-router, Date.now() won't produce duplicates as long as the user doesn't trigger pushState(which triggers genKey) more than once in a ms. If that's what the user wants I think we can just let it happen...
I'm all for web apps killing native apps, but let's be realistic: unless the whole planet is dominated by Chrome and everyone stopped using iPhones (which uses Safari), it's just a waste of time trying to catch up with all these fancy new APIs that Chrome wants you to use. A prompt to install the website to the home screen? Sweet, but on Android only. Meh.

authors: declandewet fnlctrl posva


text:
emitted Collect content that should not be collected

it.only('should does not have click', async () => {
    const Foo = defineComponent({
      name: 'Foo',
      emits: ['click', 'foo'],
      setup(_, ctx) {
        return () =>
          h(
            'div',
            {
              onClick: () => {
                ctx.emit('foo', 'bar')
              }
            },
            'hello world'
          )
      }
    })

    const wrapper = mount(Foo)
    await wrapper.trigger('click')
    console.log(wrapper.emitted()) //  { foo: [ [ 'bar' ] ], click: [ [ [MouseEvent] ] ] }
    expect(wrapper.emitted('foo')).toHaveLength(1)
  })

The example of the above
expect return {foo:[['bar']]} when call emitted()
but actual return  { foo: [ [ 'bar' ] ], click: [ [ [MouseEvent] ] ] }
This may be related to the version of the vue, because do not have this problem when 3.0.4 version
version：
vue: v3.0.7
vtu: 2.0.0-rc.3

Actually this was added in rc.2. See this PR.
Native events (like click) will "bubble" up - this is something some people like to test, so we now record native events, too, not just custom events. An example would be testing a component using the compositionstart event (for example, Japanese/Chinese input components). See this issue for an example a user discovered.
Do you think we should not record native events? Why not?

@lmiller1990
I am so understand
<template>

    <button @click="handleClick">click</button>

</template>

If the user writes it that way
calling emitted function gives you the data -> '{click: [custom click, MouseEvent]}'
If the user has defined 'emits'
<template>

    <button @click="handleClick">click</button>

</template>

Then call emitted  it will only receive click:[custom click]

This behavior is consistent with Vue
If emits:["click"] is not defined in Vue,
The component will emit two events, a custom event and a native event

Good catch @cuixiaorui , and thanks for the link to the emits rfc:

If, however, click is declared as a custom event by using the emits option, it will then only be triggered by custom events and will no longer fallthrough as a native listener.

So if a component has a native event defined in its emits we should stop propagation before it's collected by emitted. Weird that Vue itself doesn't take care of this for us if that's the in-browser behaviour. Perhaps it's because we're attaching listeners to the root DOM node inside the component.
Sorry, I've been on holiday but I'll see if I can whip up a PR for this in the next day or so.

Sorry that took me so long. I have a PR up that hopefully addresses this.
@cuixiaorui would you please review the new test here and check that it should test against the behaviour in this ticket? https://github.com/vuejs/vue-test-utils-next/pull/521/files#diff-bca53c828786d5bd8dbc5a6ef967a8a28d8601dc4fb603bf218baab718a59469

Thank you!

authors: aethr cuixiaorui lmiller1990

repo: vuejs/vue-test-utils-next