~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/schema_dictionary/columns.cc

  • Committer: Monty Taylor
  • Date: 2010-12-03 19:56:07 UTC
  • mto: (1975.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 1976.
  • Revision ID: mordred@inaugust.com-20101203195607-yw50aynlw04dt5k6
All protocol stuff except for the buffer_length. WTF?

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2010 Sun Microsystems, Inc.
 
4
 *  Copyright (C) 2010 Sun Microsystems
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
37
37
  add_field("COLUMN_DEFAULT", plugin::TableFunction::VARBINARY, 65535, true);
38
38
  add_field("COLUMN_DEFAULT_IS_NULL", plugin::TableFunction::BOOLEAN, 0, false);
39
39
  add_field("COLUMN_DEFAULT_UPDATE");
40
 
  add_field("IS_SIGNED", plugin::TableFunction::BOOLEAN, 0, true);
41
40
  add_field("IS_AUTO_INCREMENT", plugin::TableFunction::BOOLEAN, 0, false);
42
41
  add_field("IS_NULLABLE", plugin::TableFunction::BOOLEAN, 0, false);
43
42
  add_field("IS_INDEXED", plugin::TableFunction::BOOLEAN, 0, false);
47
46
  add_field("IS_FIRST_IN_MULTI", plugin::TableFunction::BOOLEAN, 0, false);
48
47
  add_field("INDEXES_FOUND_IN", plugin::TableFunction::NUMBER, 0, false);
49
48
  add_field("DATA_TYPE");
50
 
  add_field("DATA_ARCHETYPE");
 
49
 
51
50
  add_field("CHARACTER_MAXIMUM_LENGTH", plugin::TableFunction::NUMBER);
52
51
  add_field("CHARACTER_OCTET_LENGTH", plugin::TableFunction::NUMBER);
53
52
  add_field("NUMERIC_PRECISION", plugin::TableFunction::NUMBER);
116
115
    /* COLUMN_DEFAULT_UPDATE */
117
116
    push(column.options().update_expression());
118
117
 
119
 
    /* IS_SIGNED */
120
 
    if (drizzled::message::is_numeric(column))
121
 
    {
122
 
      push(true);
123
 
    }
124
 
    else 
125
 
    {
126
 
      push();
127
 
    }
128
 
 
129
118
    /* IS_AUTO_INCREMENT */
130
119
    push(column.numeric_options().is_autoincrement());
131
120
 
132
121
    /* IS_NULLABLE */
133
 
    push(not column.constraints().is_notnull());
 
122
    push(column.constraints().is_nullable());
134
123
 
135
124
    /* IS_INDEXED, IS_USED_IN_PRIMARY, IS_UNIQUE, IS_MULTI, IS_FIRST_IN_MULTI, INDEXES_FOUND_IN */
136
125
    bool is_indexed= false;
176
165
    push(is_multi_first);
177
166
    push(indexes_found_in);
178
167
 
179
 
    /* DATA_TYPE <-- display the type that the user is going to expect, which is not the same as the type we store internally */
180
 
    push(drizzled::message::type(column));
181
 
 
182
 
    /* DATA_ARCHETYPE */
 
168
    /* DATATYPE */
183
169
    push(drizzled::message::type(column.type()));
184
170
 
185
171
    /* "CHARACTER_MAXIMUM_LENGTH" */