When did Quick drop `pluck()` and what can I repla...
# box-products
d
When did Quick drop
pluck()
and what can I replace it with?
s
Quick's very first releases defaulted to return
QuickCollection
which were basically
CFCollection
(from Forgebox) which support cool things like pluck(). There was a big performance hit in using QuickCollections so they're still there but disabled by default. https://quick.ortusbooks.com/guide/collections#usdrenderdata
The performance hit may be less now, I'm not sure
d
Ah, thanks. Yes, this app was an early Quick project for me which I'm now trying to update to the latest version. I'm trying to serialize my records to JSON to store elsewhere but I only want a few of the columns. The docs say
asMemento()
supports the same args as
getMemento()
but that doesn't seem to work for me. Could I be doing it wrong?
s
.asMemento()
is just a convenience for
.get().map( ( thing ) => { return thing.getMemento( args ); } )
and it does take the same arguments.
you might need
ignoreDefaults
if you defined a
this.memento
- Quick now does that by default so your
this.memento
stuff should only be overrides, and should go inside of
instanceReady()
d
I don't have a
this.memento
but adding
ignoreDefaults
sorted it. Thanks again!
e
Thanks for helping out, Sam