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
First of all, I want to sincerely thank you for your amazing work on signalDB! 🙌 This library is incredibly useful, and I really appreciate the effort and dedication you put into maintaining it. Your contribution to the open-source community makes developers’ lives easier, and I truly value that. 🚀
Currently, the modify method in signalDB only accepts two parameters:
Since signalDB already uses mingo, extending the modify method to accept these extra parameters would enable more powerful updates, such as:
• Array filters (arrayFilters) – useful for targeted modifications within arrays
• Update conditions (condition) – allows conditional updates
• Additional options (options) – provides finer control over the update process
Proposed Solution
Modify the modify method in signalDB to support the same parameters as mingo. This would make it fully compatible with mingo’s update API while maintaining backward compatibility.
Benefits
• Provides more flexibility in document updates
• Aligns signalDB with mingo’s update API
• Reduces the need for workarounds when performing complex updates
According to the code comments in mingo, condition refers to validation conditions that must be met before performing the update, while options are update options that allow overriding defaults. These parameters are defined in src/updater.ts:98.
That being said, if the documentation is not clear enough to define their intended use cases, we can proceed without them for now. Let me know what you think!
First of all, I want to sincerely thank you for your amazing work on signalDB! 🙌 This library is incredibly useful, and I really appreciate the effort and dedication you put into maintaining it. Your contribution to the open-source community makes developers’ lives easier, and I truly value that. 🚀
Currently, the modify method in signalDB only accepts two parameters:
However, mingo’s update method supports additional parameters that provide more flexibility when updating documents in IndexedDB:
Since signalDB already uses mingo, extending the modify method to accept these extra parameters would enable more powerful updates, such as:
• Array filters (arrayFilters) – useful for targeted modifications within arrays
• Update conditions (condition) – allows conditional updates
• Additional options (options) – provides finer control over the update process
Proposed Solution
Modify the modify method in signalDB to support the same parameters as mingo. This would make it fully compatible with mingo’s update API while maintaining backward compatibility.
References
• signalDB modify method: modify.ts
• mingo update method: updater.ts
Benefits
• Provides more flexibility in document updates
• Aligns signalDB with mingo’s update API
• Reduces the need for workarounds when performing complex updates
Maybe solution:
Thanks!
The text was updated successfully, but these errors were encountered: