-
Notifications
You must be signed in to change notification settings - Fork 25
Conversation
|
Just realized we have the same problem with this approach as insertions: deleting an element requires a transaction. To support this behavior, we would need to pass along the transaction |
Then let's keep only |
Sounds good. Thanks for the heads up, I missed the default value. |
@davidbrochart Yrs doesn't expose the ability to return a value from
I'm partial to the first, but what do you all think? |
Yes, keeping only |
- YMap.delete -> YMap.pop: Reflects the dict api. Pop returns the removed value and throws a key error if it doesn't find a value. - Added YMap.get: gets value from array with optional default value. - YArray.delete -> YArray.delete_range - YArray.insert -> YArray.insert_range: Now takes any iterable - Added YArray.insert: Inserts a single element at index - Added YArray.append: adds value to the end of the list - Added YArray.delete: Deletes individual value
ccffc72
to
4a22f9b
Compare
@dmonad Rebased and made changes, ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
API Updates
Internel updates
py_into_any
refactored with more explicit error handling. Instead of returningNone
on error conditions, it now returns either aMultipleIntegrationError
when attempting to integrate a non preliminary value and aTypeError
when the supplied type cannot be integrated into YCRDT asAny
. This centralizes the definition of errors and resolves issues in Better Integration Error Messages #46