Ad
  • Custom User Avatar

    "Hundreds of rows" and "extra columns"? That's adorable.

    My friend, my current job right now is writing code to generate exports on top of a data warehouse. Tens of thousands of rows are not uncommon. One export has over 300 columns. We weren't satisfied with any of the available data structures (there's extensive post-processing of the data), so we wrote our own. What we did not say is, "Well, screw it, let's just use Records. It's dirt slow and frustrating to work with, but at least we don't have millions of rows. Until next year, anyway."

  • Custom User Avatar

    If I got that data structure out of a DB, I'd change how I was accessing the DB. If I got it out of a library, I'd switch libraries or write my own. If for some terrible reason I couldn't, I'd write a proxy transformer that would make this conversion for me on every access.

    There's really no good reason to have an array of objects that you will then access based on a unique property on those objects; that's data structures 101. I wouldn't trust anything that returned this kind of data structure; if they can't get that right, what else have they botched?

    http://www.jooq.org/doc/3.6/manual/sql-execution/fetching/arrays-maps-and-lists/