You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to add some extra configuration to my columns so that i can use that in my middleware to know this is the column that it needs to process like
else if (request.name === 'select') {
request.onResult((results: any[]): Promise<any> => {
return new Promise((resolve) => {
if (!results || !Array.isArray(results)) {
resolve(results);
return;
}
results.forEach(result => {
Object.keys(result).forEach(key => {
if (compressionColumns.includes(key)) // some condition to identify this is the column i need to work on
result[key] = decode(result[key]);
}
});
});
resolve(results);
});
});
}
or is there a way to provide extra configuration to middleware it self like providing its own metadata
what i am doing above is adding compression and decompression to the jsstore so that we can save some space since we need to cache api calls directly for whatever reason
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I wanted to add some extra configuration to my columns so that i can use that in my middleware to know this is the column that it needs to process like
then on the middleware
or is there a way to provide extra configuration to middleware it self like providing its own metadata
what i am doing above is adding compression and decompression to the jsstore so that we can save some space since we need to cache api calls directly for whatever reason
Beta Was this translation helpful? Give feedback.
All reactions