LargeList hasn't "exists" method


#1

Why largeList hasn’t “exists” method?


#2

EnverOsmanov,

Client and docs are little behind.

-- =======================================================================
-- exist() -- Check if the object(s) associated with searchKey exists. 0/1
-- =======================================================================
-- Parms:
-- (*) topRec: the user-level record holding the LDT Bin
-- (*) ldtBinName: The user's chosen name for the LDT bin
-- (*) searchKey: The key value for the objects to be found
-- =======================================================================
function exists(topRec, ldtBinName, searchKeyList)
  return llist.exists(topRec, ldtBinName, searchKeyList, nil);
end

There is exists functions. You can call it directly using UDF execute functionality

aql> execute llist.add('lbin', 1) on test where PK=1
+-----+
| add |
+-----+
| 0   |
+-----+
1 row in set (0.000 secs)

aql> execute llist.add('lbin', 2) on test where PK=1
+-----+
| add |  
+-----+
| 0   |
+-----+
1 row in set (0.001 secs)

aql> execute llist.exists('lbin', 2) on test where PK=1 
+--------+
| exists |
+--------+
| [1]    |
+--------+
1 row in set (0.000 secs)

aql> execute llist.exists('lbin', 'JSON[2,3]') on test where PK=1
+--------+
| exists |
+--------+
| [1, 0] | 
+--------+
1 row in set (0.001 secs)

HTH

– R


#3

We will add large list exists() in the next java client release.