开发者

does oracle.sql.ARRAY save sequence of passed elements?

开发者 https://www.devze.com 2023-02-20 07:28 出处:网络
I can\'t find a proof link for a question: if oracle.sql.ARRAY saves sequence of elements passed in constructor

I can't find a proof link for a question: if oracle.sql.ARRAY saves sequence of elements passed in constructor

public ARRAY(oracle.sql.ArrayDescriptor arrayDescriptor, java.sql.Connection connection, java.lang.Object o) throws java.sql.SQLException
开发者_Python百科

Where Object o is actually an array of elements. Can you help me, please?!


Going off the example in your comment:

SELECT column_value AS id FROM TABLE (CAST (? AS ids_tab))

In SQL, one should never assume that a row source will be returned in any particular order, except as specific by an ORDER BY clause. Even if the ARRAY object stores items in the sequence they were originally given (which I would expect to be the case), there is no rule that the SQL engine has to retrieve them in that order.

Unfortunately, since the array has no key value, there is no ORDER BY that you can use to enforce that its elements will be returned in their original order.

0

精彩评论

暂无评论...
验证码 换一张
取 消