Drizzled Public API Documentation

drizzled::TableShare Class Reference
Inheritance diagram for drizzled::TableShare:
drizzled::table::instance::Shared drizzled::table::instance::Singular

List of all members.

Public Types

typedef boost::shared_ptr
< TableShare
shared_ptr
typedef std::vector< shared_ptr > vector
typedef std::vector< Field * > Fields

Public Member Functions

 TableShare (const identifier::Table::Type type_arg)
 TableShare (const identifier::Table &identifier, const identifier::Table::Key &key)
 TableShare (const identifier::Table &identifier)
 TableShare (const identifier::Table::Type type_arg, const identifier::Table &identifier, const char *path_arg=NULL, uint32_t path_length_arg=0)
bool isTemporaryCategory () const
void setTableCategory (enum_table_category arg)
const Fields getFields () const
Fields getFields ()
Field ** getFields (bool)
void setFields (uint32_t arg)
uint32_t positionFields (Field **arg) const
void pushField (Field *arg)
FieldgetTimestampField () const
void setTimestampField (Field *arg)
KeyInfogetKeyInfo (uint32_t arg) const
size_t getNamedFieldSize () const
Field ** getNamedField (const std::string &arg)
uint32_t doesKeyNameExist (const std::string &arg) const
virtual void lock ()
virtual void unlock ()
unsigned char * getDefaultValues ()
void resizeDefaultValues (size_t arg)
const char * getNormalizedPath () const
const char * getPath () const
const identifier::Table::KeygetCacheKey () const
size_t getCacheKeySize () const
str_ref getTableNameRef () const
const char * getTableName () const
str_ref getSchemaNameRef () const
const char * getSchemaName () const
uint64_t getVersion () const
void refreshVersion ()
void resetVersion ()
uint32_t sizeStoredRecord () const
uint32_t getRecordLength () const
void setRecordLength (uint32_t arg)
const Field_blobgetBlobFieldAt (uint32_t arg) const
message::Table::TableType getTableType () const
const std::string & getTableTypeAsString () const
message::TablegetTableMessage () const
void setTableMessage (const message::Table &arg)
const message::Table::Fieldfield (int32_t field_position) const
bool hasComment () const
const char * getComment ()
uint32_t getCommentLength () const
uint64_t getMaxRows () const
void setMaxRows (uint64_t arg)
bool fieldInPrimaryKey (Field *field) const
plugin::StorageEnginedb_type () const
plugin::StorageEnginegetEngine () const
identifier::Table::Type getType () const
uint32_t getTableCount () const
void incrementTableCount ()
uint32_t decrementTableCount ()
void setFieldSize (uint32_t arg)
uint32_t sizeFields () const
uint32_t sizeKeys () const
bool hasVariableWidth () const
void setVariableWidth ()
uint32_t getPrimaryKey () const
bool hasPrimaryKey () const
uint8_t sizeBlobPtr () const
virtual plugin::EventObserverListgetTableObservers ()
virtual void setTableObservers (plugin::EventObserverList *)
void setIdentifier (const identifier::Table &identifier_arg)
int open_table_def (Session &session, const identifier::Table &identifier)
int open_table_from_share (Session *session, const identifier::Table &identifier, const char *alias, uint32_t db_stat, uint32_t ha_open_flags, Table &outparam)
bool parse_table_proto (Session &session, const message::Table &table)
virtual bool is_replicated () const

Static Public Member Functions

static TableShare::shared_ptr getShareCreate (Session *, const identifier::Table &, int &error)

Public Attributes

Field ** found_next_number_field
std::vector< uint > blob_field
const charset_info_sttable_charset
boost::dynamic_bitset all_set
uint32_t block_size
plugin::StorageEnginestorage_engine
uint32_t null_bytes
uint32_t last_null_bit_pos
uint32_t rec_buff_length
uint32_t keys
uint32_t key_parts
uint32_t max_key_length
uint32_t max_unique_length
uint32_t total_key_length
uint32_t uniques
uint32_t null_fields
uint32_t blob_fields
uint32_t db_create_options
uint32_t db_options_in_use
uint32_t db_record_offset
uint32_t rowid_field_offset
uint32_t next_number_index
uint32_t next_number_key_offset
uint32_t next_number_keypart
uint32_t error
uint32_t open_errno
uint32_t errarg
bool db_low_byte_first
key_map keys_in_use
key_map keys_for_keyread

Protected Member Functions

void open_table_error (int pass_error, int db_errno, int pass_errarg)
Fieldmake_field (const message::Table::Field &pfield, unsigned char *ptr, uint32_t field_length, bool is_nullable, unsigned char *null_pos, unsigned char null_bit, uint8_t decimals, enum_field_types field_type, const charset_info_st *field_charset, Field::utype unireg_check, TYPELIB *interval, const char *field_name)
Fieldmake_field (const message::Table::Field &pfield, unsigned char *ptr, uint32_t field_length, bool is_nullable, unsigned char *null_pos, unsigned char null_bit, uint8_t decimals, enum_field_types field_type, const charset_info_st *field_charset, Field::utype unireg_check, TYPELIB *interval, const char *field_name, bool is_unsigned)

Private Types

typedef std::vector< std::string > StringVector
typedef boost::unordered_map
< std::string, Field
**, util::insensitive_hash,
util::insensitive_equal_to
FieldMap
typedef std::vector< std::string > keynames_t

Private Member Functions

unsigned char * alloc (size_t arg)
memory::Rootmem ()
void addKeyName (const std::string &arg)
void init (const char *new_table_name, const char *new_path)
int open_table_from_share_inner (Session *session, const char *alias, uint32_t db_stat, Table &outparam)
int open_table_cursor_inner (const identifier::Table &identifier, uint32_t db_stat, uint32_t ha_open_flags, Table &outparam, bool &error_reported)

Private Attributes

enum_table_category table_category
Fields _fields
Fieldtimestamp_field
KeyInfokey_info
FieldMap name_hash
memory::Root mem_root
keynames_t _keynames
std::vector< TYPELIBintervals
std::vector< unsigned char > default_values
identifier::Table::Key private_key_for_cache
std::vector< char > private_normalized_path
str_ref db
str_ref table_name
str_ref path
str_ref normalized_path
uint64_t version
uint32_t timestamp_offset
uint32_t reclength
uint32_t stored_rec_length
uint64_t max_rows
boost::scoped_ptr< message::Table_table_message
identifier::Table::Type tmp_table
uint32_t _ref_count
uint32_t _field_size
bool has_variable_width
uint32_t primary_key
uint8_t blob_ptr_size

Friends

class drizzled::table::Singular
std::ostream & operator<< (std::ostream &output, const TableShare &share)

Detailed Description

Definition at line 47 of file base.h.


Member Function Documentation

bool drizzled::TableShare::fieldInPrimaryKey ( Field in_field) const

Returns true if the supplied Field object is part of the table's primary key.

Todo:

Precache this stuff....

Definition at line 204 of file base.cc.

References dict_index_struct::indexes.

Referenced by drizzled::TransactionServices::deleteRecord(), drizzled::TransactionServices::setDeleteHeader(), drizzled::TransactionServices::setUpdateHeader(), and drizzled::TransactionServices::updateRecord().


Member Data Documentation

uint32_t drizzled::TableShare::primary_key
private

Currently the replication services component uses the primary_key member to determine which field is the table's primary key. However, as it exists, because this member is scalar, it only supports a single-column primary key. Is there a better way to ask for the fields which are in a primary key?

Definition at line 497 of file base.h.

enum_table_category drizzled::TableShare::table_category
private

Category of this table.

Definition at line 69 of file base.h.


The documentation for this class was generated from the following files: