Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. COA hash (calculated on initialization) stored in database is what my "solution" would be doing (see 1. & 2.). But a hash alone does not guarantee uniqueness in any way. Example: when calling -hash on an NSArray you get its element count (due to performance issues otherwise, I suppose). If my tuples' elements now happened to be uniformly sized arrays, I'd get 100% false positives when only using hashes. Thus my snippet 2 (see 3.) was meant to be then run on the arrays of tuples with matching (pre-calculated and stored) hashes to find the actual matches.
      singulars
    2. CORegarding your update: That's what I was saying. If the elements in(!) my tuple happened to themselves(!) be arrays (and to make things worse: of uniform length), then I'd get the same hash for every tuple in my data set (despite varying content), when calling NSObject's hash method on my tuples' elements for hashing them. Also not sure how using sha1/md5 instead would play well with my requirement of conforming to "isEqual:". Further more concatenation would also require encoding the elements, right? Potentially expensive overhead depending on input, no?
      singulars
    3. COSay you have an array like: "string", 11, array("other string"), 22. The concatenation, using HMAC (a good algorithm) would produce: 5string31112otherstring322. Then calculate the SHA1/MD5 of the intermediate result and you're set for a recursive, unique hash.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload