~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/generator/schema.cc

  • Committer: Brian Aker
  • Date: 2010-12-25 00:28:49 UTC
  • mto: This revision was merged to the branch mainline in revision 2031.
  • Revision ID: brian@tangent.org-20101225002849-g73mg6ihulajis0o
First pass in refactoring of the name of my_decimal.

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
    schema_iterator= schema_names.begin();
40
40
  }
41
41
 
42
 
Schema::operator const drizzled::message::schema::shared_ptr()
43
 
{
44
 
  while (schema_iterator != schema_names.end())
45
 
  {
46
 
    identifier::Schema schema_identifier(*schema_iterator);
47
 
 
48
 
    if (not plugin::Authorization::isAuthorized(session.user(), schema_identifier, false))
49
 
    {
50
 
      schema_iterator++;
51
 
      continue;
52
 
    }
53
 
 
54
 
    bool is_schema_parsed= plugin::StorageEngine::getSchemaDefinition(schema_identifier, schema);
55
 
    schema_iterator++;
56
 
 
57
 
    if (is_schema_parsed)
58
 
      return schema;
59
 
  }
60
 
 
61
 
  return message::schema::shared_ptr();
62
 
}
63
 
 
64
 
Schema::operator const drizzled::identifier::Schema*()
65
 
{
66
 
  while (schema_iterator != schema_names.end())
67
 
  {
68
 
    const drizzled::identifier::Schema *_ptr= &(*schema_iterator);
69
 
    schema_iterator++;
70
 
 
71
 
    if (not plugin::Authorization::isAuthorized(session.user(), *_ptr, false))
72
 
      continue;
73
 
 
74
 
    return _ptr;
75
 
  }
76
 
 
77
 
  return NULL;
78
 
}
79
 
 
80
42
} /* namespace generator */
81
43
} /* namespace drizzled */