estately / rets

A pure-ruby library for fetching data from RETS servers
https://github.com/estately/rets
127 stars 94 forks source link

return non-looked-up-values in resolve #151

Closed hfaulds closed 8 years ago

hfaulds commented 9 years ago

We've had some problem mlses where we had to use the COMPACT-DECODED format (which is significantly slower to fetch) because when using COMPACT and 'resolving' the values using the metadata we had fields with missing values.

I've tried multiple times to see if I could get thngs working using COMPACT.

This fix appears to work though.

For a single property I fetched 3 times, once with compact_decoded, once with compact and once with this new change:

DEVELOPMENT [90] pry(main)> compact_decoded_data.select { |k,v| v != compact_data[k] }
{
  "County" => "S",
  "Lsc" => "EXT",
  "Ste" => "NY",
  "Temp_off_mkt" => "N"
}
DEVELOPMENT [91] pry(main)> compact_decoded_data.select { |k,v| v != new_compact_data[k] }
{
  "County" => "S"
}
DEVELOPMENT [92] pry(main)> new_compact_data["County"]
"Suffolk"
DEVELOPMENT [93] pry(main)> compact_decoded_data["County"]
"S"
dougcole commented 9 years ago

Unless I'm missing something this just gives up on resolving the value and returns the encoded value instead, right? That might be better than nothing in some cases, but I wouldn't imagine this fixes all cases where we use compact-decoded.

dougcole commented 8 years ago

This seems abandoned and I think was at least partially fixed by https://github.com/estately/rets/pull/163, so I'm closing for now. Let me know if you disagree.