~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field.h

Merge with trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
739
739
  bool isWriteSet();
740
740
  void setReadSet(bool arg= true);
741
741
  void setWriteSet(bool arg= true);
 
742
 
 
743
protected:
 
744
 
 
745
  void pack_num(uint64_t arg, unsigned char *destination= NULL)
 
746
  {
 
747
    if (not destination)
 
748
      destination= ptr;
 
749
 
 
750
#ifdef WORDS_BIGENDIAN
 
751
    if (getTable() && getTable()->getShare()->db_low_byte_first)
 
752
    {
 
753
      int8store(destination, arg);
 
754
    }
 
755
    else
 
756
#endif
 
757
      int64_tstore(destination, arg);
 
758
  }
 
759
 
 
760
  uint64_t unpack_num(uint64_t &destination, const unsigned char *arg= NULL) const
 
761
  {
 
762
    if (not arg)
 
763
      arg= ptr;
 
764
 
 
765
#ifdef WORDS_BIGENDIAN
 
766
    if (getTable() && getTable()->getShare()->db_low_byte_first)
 
767
      destination= uint8korr(arg);
 
768
    else
 
769
#endif
 
770
      int64_tget(destination, arg);
 
771
 
 
772
    return destination;
 
773
  }
742
774
};
743
775
 
744
776
std::ostream& operator<<(std::ostream& output, const Field &field);