Example #1
0
 void set(Extent &e, uint8_t *row_pos, T val) {
     DEBUG_SINVARIANT(&e != NULL);
     uint8_t *byte_pos = row_pos + offset;
     DEBUG_SINVARIANT(e.insideExtentFixed(byte_pos));
     *reinterpret_cast<T *>(byte_pos) = val;
     setNull(e, row_pos, false);
 }
Example #2
0
 bool val(const Extent &e, uint8_t *row_pos) const {
     DEBUG_SINVARIANT(&e != NULL);
     uint8_t *byte_pos = row_pos + offset;
     DEBUG_SINVARIANT(e.insideExtentFixed(byte_pos));
     if (nullable && isNull(e, row_pos)) {
         return default_value;
     } else {
         return *byte_pos & bit_mask ? true : false; 
     }
 }
Example #3
0
 T val(const Extent &e, uint8_t *row_pos) const {
     DEBUG_SINVARIANT(&e != NULL);
     uint8_t *byte_pos = row_pos + offset;
     DEBUG_SINVARIANT(e.insideExtentFixed(byte_pos));
     if (nullable && isNull(e, row_pos)) {
         return default_value;
     } else {
         return *reinterpret_cast<T *>(byte_pos);
     }
 }
Example #4
0
 void set(const Extent &e, uint8_t *row_pos, bool val) {
     DEBUG_SINVARIANT(&e != NULL);
     uint8_t *byte_pos = row_pos + offset;
     DEBUG_SINVARIANT(e.insideExtentFixed(byte_pos));
     if (val) {
         *byte_pos = *byte_pos | bit_mask;
     } else {
         *byte_pos = *byte_pos & ~bit_mask;
     }
     setNull(e, row_pos, false);
 }
    void set(const Extent &e, uint8_t *row_pos, const void *val, uint32_t val_size) {
        DEBUG_SINVARIANT(&e != NULL);
        if (val == NULL) {
            setNull(e, row_pos, true);
            return;
        }
        DEBUG_SINVARIANT(val_size == static_cast<uint32_t>(field_size));
        (void)val_size;

        uint8_t *byte_pos = row_pos + offset;
        DEBUG_SINVARIANT(e.insideExtentFixed(byte_pos));
        
        memmove(byte_pos, val, field_size);
        setNull(e, row_pos, false);
    }