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, 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) |
Field * | getTimestampField () const |
void | setTimestampField (Field *arg) |
KeyInfo & | getKeyInfo (uint32_t arg) const |
size_t | getNamedFieldSize () const |
Field ** | getNamedField (const std::string &arg) |
bool | doesKeyNameExist (const char *name_arg, uint32_t name_length, uint32_t &position) const |
bool | doesKeyNameExist (std::string arg, uint32_t &position) 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::Key & | getCacheKey () const |
size_t | getCacheKeySize () const |
const char * | getTableName () const |
uint32_t | getTableNameSize () const |
const std::string & | getTableName (std::string &name_arg) const |
const char * | getSchemaName () const |
const std::string & | getSchemaName (std::string &schema_name_arg) const |
uint64_t | getVersion () const |
void | refreshVersion () |
void | resetVersion () |
uint32_t | sizeStoredRecord () const |
uint32_t | getRecordLength () const |
void | setRecordLength (uint32_t arg) |
const Field_blob * | getBlobFieldAt (uint32_t arg) const |
message::Table::TableType | getTableType () const |
const std::string & | getTableTypeAsString () const |
message::Table * | getTableMessage () const |
void | setTableMessage (const message::Table &arg) |
const message::Table::Field & | field (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::StorageEngine * | db_type () const |
plugin::StorageEngine * | getEngine () 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::EventObserverList * | getTableObservers () |
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 *session, const identifier::Table &identifier, int &error) |
Public Attributes | |
Field ** | found_next_number_field |
std::vector< uint > | blob_field |
const charset_info_st * | table_charset |
boost::dynamic_bitset | all_set |
uint32_t | block_size |
plugin::StorageEngine * | storage_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) |
Field * | make_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) |
Field * | make_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::pair< std::string, Field ** > | FieldMapPair |
Private Member Functions | |
void * | alloc_root (size_t arg) |
char * | strmake_root (const char *str_arg, size_t len_arg) |
memory::Root * | getMemRoot () |
void | addKeyName (std::string arg) |
void | setPath (char *str_arg, uint32_t size_arg) |
void | setNormalizedPath (char *str_arg, uint32_t size_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 |
Field * | timestamp_field |
KeyInfo * | key_info |
FieldMap | name_hash |
memory::Root | mem_root |
std::vector< std::string > | _keynames |
std::vector< TYPELIB > | intervals |
std::vector< unsigned char > | default_values |
identifier::Table::Key | private_key_for_cache |
std::vector< char > | private_normalized_path |
LEX_STRING | db |
LEX_STRING | table_name |
LEX_STRING | path |
LEX_STRING | 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) |
bool drizzled::TableShare::fieldInPrimaryKey | ( | Field * | in_field | ) | const |
Returns true if the supplied Field object is part of the table's primary key.
Precache this stuff....
Definition at line 221 of file base.cc.
References dict_index_struct::indexes.
Referenced by drizzled::TransactionServices::deleteRecord(), drizzled::TransactionServices::setDeleteHeader(), drizzled::TransactionServices::setUpdateHeader(), and drizzled::TransactionServices::updateRecord().
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?