~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/message/statement_transform.cc

  • Committer: Brian Aker
  • Date: 2010-02-09 21:18:30 UTC
  • mfrom: (1273.2.42)
  • Revision ID: brian@gaz-20100209211830-7vf91n0yasi0r28y
Merge Stewart.

Show diffs side-by-side

added added

removed removed

Lines of Context:
707
707
  } 
708
708
}
709
709
 
 
710
drizzled::message::Table::Field::FieldType message::internalFieldTypeToFieldProtoType(enum enum_field_types type)
 
711
{
 
712
  switch (type) {
 
713
  case DRIZZLE_TYPE_LONG:
 
714
    return message::Table::Field::INTEGER;
 
715
  case DRIZZLE_TYPE_DOUBLE:
 
716
    return message::Table::Field::DOUBLE;
 
717
  case DRIZZLE_TYPE_NULL:
 
718
    assert(false); /* Not a user definable type */
 
719
    return message::Table::Field::INTEGER; /* unreachable */
 
720
  case DRIZZLE_TYPE_TIMESTAMP:
 
721
    return message::Table::Field::TIMESTAMP;
 
722
  case DRIZZLE_TYPE_LONGLONG:
 
723
    return message::Table::Field::BIGINT;
 
724
  case DRIZZLE_TYPE_DATETIME:
 
725
    return message::Table::Field::DATETIME;
 
726
  case DRIZZLE_TYPE_DATE:
 
727
    return message::Table::Field::DATE;
 
728
  case DRIZZLE_TYPE_VARCHAR:
 
729
    return message::Table::Field::VARCHAR;
 
730
  case DRIZZLE_TYPE_DECIMAL:
 
731
    return message::Table::Field::DECIMAL;
 
732
  case DRIZZLE_TYPE_ENUM:
 
733
    return message::Table::Field::ENUM;
 
734
  case DRIZZLE_TYPE_BLOB:
 
735
    return message::Table::Field::BLOB;
 
736
  }
 
737
 
 
738
  assert(false);
 
739
  return message::Table::Field::INTEGER; /* unreachable */
 
740
}
 
741
 
710
742
} /* namespace drizzled */