~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table/instance/base.h

  • Committer: Olaf van der Spek
  • Date: 2011-04-05 12:26:58 UTC
  • mto: (2278.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 2272.
  • Revision ID: olafvdspek@gmail.com-20110405122658-xxrvmobwwwwf3oct
Refactor Open_tables_state

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
  instance of table share per one table in the database.
24
24
*/
25
25
 
26
 
#ifndef DRIZZLED_TABLE_INSTANCE_BASE_H
27
 
#define DRIZZLED_TABLE_INSTANCE_BASE_H
 
26
#pragma once
28
27
 
29
28
#include <string>
30
29
 
37
36
#include <drizzled/memory/root.h>
38
37
#include <drizzled/message.h>
39
38
#include <drizzled/util/string.h>
40
 
 
41
39
#include <drizzled/lex_string.h>
42
40
#include <drizzled/key_map.h>
43
 
 
44
41
#include <drizzled/table/cache.h>
45
 
 
46
42
#include <drizzled/field.h>
47
43
 
48
 
 
49
 
namespace drizzled
50
 
{
 
44
namespace drizzled {
51
45
 
52
46
const static std::string NO_PROTOBUFFER_AVAILABLE("NO PROTOBUFFER AVAILABLE");
53
47
 
54
 
namespace plugin
55
 
{
56
 
class EventObserverList;
57
 
class StorageEngine;
58
 
}
59
 
 
60
 
namespace table {
61
 
class Singular;
62
 
}
63
 
 
64
 
class Field_blob;
65
 
 
66
48
class TableShare
67
49
{
68
50
  typedef std::vector<std::string> StringVector;
183
165
    if (iter == name_hash.end())
184
166
        return 0;
185
167
 
186
 
    return (*iter).second;
 
168
    return iter->second;
187
169
  }
188
170
 
189
171
private:
433
415
  void setTableMessage(const message::Table &arg)
434
416
  {
435
417
    assert(not getTableMessage());
436
 
    _table_message.reset(new(std::nothrow) message::Table(arg));
 
418
    _table_message.reset(new message::Table(arg));
437
419
  }
438
420
 
439
421
  const message::Table::Field &field(int32_t field_position) const
444
426
 
445
427
  inline bool hasComment() const
446
428
  {
447
 
    return (getTableMessage()) ?  getTableMessage()->options().has_comment() : false; 
 
429
    return getTableMessage() ?  getTableMessage()->options().has_comment() : false; 
448
430
  }
449
431
 
450
432
  inline const char *getComment()
719
701
                              Table &outparam,
720
702
                              bool &error_reported);
721
703
public:
722
 
  bool parse_table_proto(Session& session, message::Table &table);
 
704
  bool parse_table_proto(Session& session, const message::Table &table);
723
705
 
724
 
  virtual bool replicate() const
 
706
  virtual bool is_replicated() const
725
707
  {
726
708
    return false;
727
709
  }
729
711
 
730
712
} /* namespace drizzled */
731
713
 
732
 
#endif /* DRIZZLED_TABLE_INSTANCE_BASE_H */