JavaScript is required to use Bungie.net

Forums

originally posted in:BungieNetPlatform
Edited by Ingulit: 10/1/2015 12:14:33 AM
2

Solved: Is there a direct way to get an ID from a hash?

I'm trying to use a local manifest in my apps. Specifically, I want to be able to query my local manifest by hash like one does when using the manifest endpoints. The rows in the manifest have two columns: an ID number and a JSON string for that ID. In many cases, the ID is the same as that row's primary hash; in those cases, I can get the result I want by getting the JSON column from the row whose ID matches the hash I want. However, not ALL rows have ID numbers that match their primary hash (usually in these cases the ID is negative), meaning trying to find these rows using the hash fails. To fix this, I could add a "hash" column to every table, and then loop over every row and extract the primary hash from the JSON to put into that column. However, doing that is extremely computationally expensive, even if I only have to do it once each time a new manifest comes out. As such, is there any formula for converting any hash to its ID, even when the ID doesn't match the hash? If there is one, I could just calculate the ID on the fly without needing to modify the manifest at all.
English

Posting in language:

 

Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

View Entire Topic
  • Edited by Ingulit: 9/30/2015 10:14:23 PM
    Scratch that, I just tried adding the columns manually and adding all the hashes took over 6 minutes. Further, once the columns were added, querying the database took orders of magnitude more time than using ?definitions=true (certainly NOT the speedup that is often mentioned).

    Posting in language:

     

    Play nice. Take a minute to review our Code of Conduct before submitting your post. Cancel Edit Create Fireteam Post

    1 Reply
    You are not allowed to view this content.
    ;
    preload icon
    preload icon
    preload icon