~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table_proto_write.cc

  • Committer: Monty Taylor
  • Date: 2010-02-04 08:14:46 UTC
  • mfrom: (1277.2.1 build) (1280.2.1 build)
  • mto: This revision was merged to the branch mainline in revision 1283.
  • Revision ID: mordred@inaugust.com-20100204081446-ldh9m486va30uap6
Put everything in drizzled into drizzled namespace.
Put internal stuff into drizzled::internal namespace.
Removed some cruft.
Now every symbol that is shipped in a header is in the drizzled namespace
and everything in the server that's not shipped is labeled internal. woot. 
Removed a lot of the extra extern "C" stuff that was in there. Less ugliness for
internal callbacks now for Sun Studio.

Show diffs side-by-side

added added

removed removed

Lines of Context:
100
100
      break;
101
101
    case DRIZZLE_TYPE_DOUBLE:
102
102
      {
103
 
        attribute->set_type(drizzled::message::Table::Field::DOUBLE);
 
103
        attribute->set_type(message::Table::Field::DOUBLE);
104
104
 
105
105
        /* 
106
106
         * For DOUBLE, we only add a specific scale and precision iff
108
108
         */
109
109
        if (field_arg->decimals != NOT_FIXED_DEC)
110
110
        {
111
 
          drizzled::message::Table::Field::NumericFieldOptions *numeric_field_options;
 
111
          message::Table::Field::NumericFieldOptions *numeric_field_options;
112
112
 
113
113
          numeric_field_options= attribute->mutable_numeric_options();
114
114
 
490
490
  from_path.append(file_ext);
491
491
  to_path.append(file_ext);
492
492
 
493
 
  return my_rename(from_path.c_str(),to_path.c_str(),MYF(MY_WME));
 
493
  return internal::my_rename(from_path.c_str(),to_path.c_str(),MYF(MY_WME));
494
494
}
495
495
 
496
496
int delete_table_proto_file(const char *file_name)
499
499
  string file_ext = ".dfe";
500
500
 
501
501
  new_path.append(file_ext);
502
 
  return my_delete(new_path.c_str(), MYF(0));
 
502
  return internal::my_delete(new_path.c_str(), MYF(0));
503
503
}
504
504
 
505
505
int drizzle_write_proto_file(const std::string file_name,
506
506
                             message::Table *table_proto)
507
507
{
508
 
  int fd= open(file_name.c_str(), O_RDWR|O_CREAT|O_TRUNC, my_umask);
 
508
  int fd= open(file_name.c_str(), O_RDWR|O_CREAT|O_TRUNC, internal::my_umask);
509
509
 
510
510
  if (fd == -1)
511
511
    return errno;