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
The idea is to make OwnedRecord register an enum that has a buffer to store all values. For example right now if you replace OwnedValue::Integer with OwnedValue::Float it will deallocate OwnedValue::Integer which is unnecessary.
This can help with stuff with affinity for example, let's say you update a OnwedValue::Text to a OwnedValue::intenger, then you would have to allocate a new OwnedValue and dispose of the buffer in Text.
So in pseudo code:
enumOwnedValueType{Integer,Float,Text,Blob,Null}structOwnedValue{buffer:Vec<u8>,type:OwnedValueType,}implOwnedValue{pubfnset_text(&[u8]){// 1. increase self.buffer if necessary// 2. clear buffer// 3. set buffer with data}}
The text was updated successfully, but these errors were encountered:
The idea is to make OwnedRecord register an enum that has a buffer to store all values. For example right now if you replace OwnedValue::Integer with OwnedValue::Float it will deallocate OwnedValue::Integer which is unnecessary.
This can help with stuff with affinity for example, let's say you update a
OnwedValue::Text
to aOwnedValue::intenger
, then you would have to allocate a newOwnedValue
and dispose of the buffer inText
.So in pseudo code:
The text was updated successfully, but these errors were encountered: