NullableArray overrides the Array methods allowing for null values in the array.
For an overview see page C++ Classes
NullableArray overrides all public methods of base class Array using the nullBitmap to determine which array elements have null values. The nullBitmap is an array of unsigned 64-bit integers whose set bits indicate elements having null values.
NullableArray(Array* payload, ScalarArray<uint64_t>* bitmap = NULL)Constructs an array with an array argumentpayloadand an optional null bitmap.McoSql::ValueRef getAt(size_t index)Returns the reference to the Value object at
indexreturned by Array methodgetAt(), orMcoSql::Nullif the corresponding bit in the nullBitmap is set.McoSql::Value *getCopyAt(size_t index)Gets a copy of the Value object at
indexreturned by Array methodgetCopyAt(), orMcoSql::Nullif the corresponding bit in the nullBitmap is set. Note that, when usinggetCopyAt(), the application is responsible for explicitly freeing (deallocating) the copy.void setAt(size_t index, McoSql::Value* value)Sets the array element at positionindextovalueand clears the corresponding bit in the nullBitmap or, ifvalueis null, sets the corresponding bit in the nullBitmap.Value *updateAt(int index)Throws an "Invalid Operation" exception; to change the value of an array element, use methodsetAt().size_t size()Returns the number of elements in the allocated array.void setSize(size_t newSize);Sets the number of elements in the array to operate on. Note that the specified size must not exceed the size of the allocated array (returned by methodsize()) and it is necessary to later restore it to the original value (by calling methodsetSize()again) after the desired operation is completed; otherwise deallocation will be performed incorrectly.void getBody(void * dst, size_t offs, size_t len)Returns the specified number of elementslenfrom the array body to the bufferdstreturned by Array methodgetBody().void setBody(void * src, size_t offs, size_t len)Sets the specified number of elementslenfrom the buffersrcto the array body and, for null elements, sets the corresponding bit in the nullBitmap.size_t getElemSize(void)Returns the size in bytes of an array element.McoSql::Type getElemType()Returns the type of the array elements.size_t toString(char * buf, size_t & size)Serializes the current Value to the specified buffer. Onlysizebytes are copied (note that if the terminating null does not fit insizebytes, the resulting buffer will NOT be null-terminated).Value *clone(McoSql::Allocator* allocator)Creates a copy of the array using the specified memoryallocator.Array * getNullBitmap()Returns the nullBitmap.