Drizzled Public API Documentation

drizzled::table::Singular Class Reference

Inheritance diagram for drizzled::table::Singular:
drizzled::Table

List of all members.

Public Member Functions

 Singular (Session *session, List< CreateField > &field_list)
TableSharegetMutableShare (void)
void setShare (TableShare *)
const TableSharegetShare (void) const
bool hasShare () const
void release ()
bool hasVariableWidth () const
bool create_myisam_tmp_table (KeyInfo *keyinfo, MI_COLUMNDEF *start_recinfo, MI_COLUMNDEF **recinfo, uint64_t options)
void setup_tmp_table_column_bitmaps ()
bool open_tmp_table ()
void setVariableWidth ()
Field ** getFields () const
FieldgetField (uint32_t arg) const
void setFields (Field **arg)
void setFieldAt (Field *arg, uint32_t arg_pos)
TablegetNext () const
Table ** getNextPtr ()
void setNext (Table *arg)
void unlink ()
TablegetPrev () const
Table ** getPrevPtr ()
void setPrev (Table *arg)
SessiongetSession ()
unsigned char * getInsertRecord () const
unsigned char * getUpdateRecord ()
const char * getAlias () const
void clearAlias ()
void setAlias (const char *arg)
memory::RootgetMemRoot ()
void * alloc_root (size_t arg)
char * strmake_root (const char *str_arg, size_t len_arg)
int report_error (int error)
int delete_table (bool free_share=false)
void resetTable (Session *session, TableShare *share, uint32_t db_stat_arg)
uint32_t sizeKeys ()
uint32_t sizeFields ()
uint32_t getRecordLength () const
uint32_t sizeBlobFields ()
uint32_t * getBlobField ()
Field_blobgetBlobFieldAt (uint32_t arg) const
uint8_t getBlobPtrSize () const
uint32_t getNullBytes () const
uint32_t getNullFields () const
unsigned char * getDefaultValues ()
const char * getSchemaName () const
const char * getTableName () const
bool isDatabaseLowByteFirst () const
bool isNameLock () const
uint32_t index_flags (uint32_t idx) const
plugin::StorageEnginegetEngine () const
CursorgetCursor () const
size_t max_row_length (const unsigned char *data)
uint32_t find_shortest_key (const key_map *usable_keys)
bool compare_record (Field **ptr)
bool records_are_comparable ()
bool compare_records ()
void storeRecord ()
void storeRecordAsInsert ()
void storeRecordAsDefault ()
void restoreRecord ()
void restoreRecordAsDefault ()
void emptyRecord ()
uint32_t getDBStat ()
uint32_t setDBStat ()
bool fill_item_list (List< Item > *item_list) const
void clear_column_bitmaps (void)
void prepare_for_position (void)
void mark_columns_used_by_index_no_reset (uint32_t index, boost::dynamic_bitset<> &bitmap)
void mark_columns_used_by_index_no_reset (uint32_t index)
void mark_columns_used_by_index (uint32_t index)
void restore_column_maps_after_mark_index ()
void mark_auto_increment_column (void)
void mark_columns_needed_for_update (void)
void mark_columns_needed_for_delete (void)
void mark_columns_needed_for_insert (void)
void column_bitmaps_set (boost::dynamic_bitset<> &read_set_arg, boost::dynamic_bitset<> &write_set_arg)
void restore_column_map (const boost::dynamic_bitset<> &old)
const boost::dynamic_bitset use_all_columns (boost::dynamic_bitset<> &map)
void use_all_columns ()
void default_column_bitmaps ()
bool isReadSet (uint32_t index) const
void setReadSet (uint32_t index)
void setReadSet ()
void clearReadSet (uint32_t index)
void clearReadSet ()
bool isWriteSet (uint32_t index)
void setWriteSet (uint32_t index)
void setWriteSet ()
void clearWriteSet (uint32_t index)
void clearWriteSet ()
bool is_name_opened ()
bool needs_reopen_or_name_lock () const
void setup_table_map (TableList *table_list, uint32_t tablenr)
void mark_as_null_row ()
void free_io_cache ()
void filesort_free_buffers (bool full=false)
void intern_close_table ()
void print_error (int error, myf errflag) const
uint32_t get_dup_key (int error) const
bool operator< (const Table &right) const
virtual bool isPlaceHolder (void) const

Static Public Member Functions

static bool compare (const Table *a, const Table *b)

Public Attributes

Cursorcursor
boost::dynamic_bitset * read_set
boost::dynamic_bitset * write_set
uint32_t tablenr
uint32_t db_stat
boost::dynamic_bitset def_read_set
boost::dynamic_bitset def_write_set
boost::dynamic_bitset tmp_set
Sessionin_use
unsigned char * record [2]
std::vector< unsigned char > insert_values
KeyInfokey_info
Fieldnext_number_field
Fieldfound_next_number_field
field::Epochtimestamp_field
TableListpos_in_table_list
Ordergroup
unsigned char * null_flags
uint32_t lock_position
uint32_t lock_data_start
uint32_t lock_count
uint32_t used_fields
uint32_t status
uint32_t derived_select_number
int current_lock
bool copy_blobs
bool maybe_null
bool null_row
bool force_index
bool distinct
bool const_table
bool no_rows
bool key_read
bool no_keyread
bool open_placeholder
bool locked_by_name
bool no_cache
bool auto_increment_field_not_null
bool alias_name_used
query_id_t query_id
ha_rows quick_condition_rows
timestamp_auto_set_type timestamp_field_type
table_map map
 ID bit of table (1,2,4,8,16...)
RegInfo reginfo
key_map covering_keys
key_map quick_keys
key_map merge_keys
key_map keys_in_use_for_query
key_map keys_in_use_for_group_by
key_map keys_in_use_for_order_by
ha_rows quick_rows [MAX_KEY]
key_part_map const_key_parts [MAX_KEY]
uint32_t quick_key_parts [MAX_KEY]
uint32_t quick_n_ranges [MAX_KEY]
filesort_info sort

Private Attributes

TableShare _share
bool _has_variable_width

Friends

std::ostream & operator<< (std::ostream &output, const Table &table)

Detailed Description

Definition at line 31 of file singular.h.


Member Function Documentation

bool drizzled::Table::compare_records ( ) [inherited]

Compares the input and outbut record buffers of the table to see if a row has changed. The algorithm iterates over updated columns and if they are nullable compares NULL bits in the buffer before comparing actual data. Special care must be taken to compare only the relevant NULL bits and mask out all others as they may be undefined. The storage engine will not and should not touch them.

Parameters:
tableThe table to evaluate.
Returns:
true if row has changed.
false otherwise.

Definition at line 1476 of file table.cc.

References drizzled::Field::null_bit, and drizzled::Field::null_ptr.

Referenced by drizzled::update_query().

int drizzled::Table::delete_table ( bool  free_share = false) [inherited]

Free information allocated by openfrm

Parameters:
Iftrue if we also want to free table_share
Note:
this should all be the destructor

Definition at line 78 of file table.cc.

Referenced by drizzled::plugin::StorageEngine::createTable().

bool drizzled::Table::fill_item_list ( List< Item > *  item_list) const [inherited]

Create Item_field for each column in the table.

Parameters:
[out]apointer to an empty list used to store items

Create Item_field object for each column in the table and initialize it with the corresponding Field. New items are created in the current Session memory root.

Return values:
falseon success
truewhen out of memory

Definition at line 1686 of file table.cc.

uint32_t drizzled::Table::get_dup_key ( int  error) const [inline, inherited]
Returns:
key if error because of duplicated keys

Definition at line 587 of file table.h.

Referenced by drizzled::end_unique_update(), drizzled::prepare_record_for_error_message(), and drizzled::plugin::StorageEngine::print_error().

bool drizzled::Table::records_are_comparable ( ) [inherited]

True if the table's input and output record buffers are comparable using compare_records(TABLE*).

Definition at line 1457 of file table.cc.

Referenced by drizzled::update_query().

int drizzled::Table::report_error ( int  error) [inherited]

Help function when we get some an error from the table Cursor.

Definition at line 1645 of file table.cc.

Referenced by drizzled::join_read_const(), and drizzled::join_read_last_key().

void drizzled::Table::setup_table_map ( TableList table_list,
uint32_t  tablenr 
) [inherited]

clean/setup table fields and map.

Parameters:
tableTable structure pointer (which should be setup)
table_listTableList structure pointer (owner of Table)
tablenrtable number

Definition at line 1665 of file table.cc.

References drizzled::TableList::force_index, drizzled::Table::map, and drizzled::TableList::outer_join.


Member Data Documentation

bool drizzled::Table::copy_blobs [inherited]

Should blobs by copied when storing?

Definition at line 198 of file table.h.

Referenced by drizzled::field_conv().

Type of lock on table

Definition at line 197 of file table.h.

uint32_t drizzled::Table::db_stat [inherited]

information about the cursor as in Cursor.h

Definition at line 137 of file table.h.

Referenced by drizzled::Session::close_old_data_files(), drizzled::Session::free_cached_table(), drizzled::Session::get_lock_data(), and drizzled::Cursor::ha_open().

boost::dynamic_bitset drizzled::Table::def_read_set [inherited]

Default read set of columns

Definition at line 139 of file table.h.

boost::dynamic_bitset drizzled::Table::def_write_set [inherited]

Default write set of columns

Definition at line 140 of file table.h.

uint32_t drizzled::Table::lock_data_start [inherited]

Start pos. in DRIZZLE_LOCK.locks

Definition at line 191 of file table.h.

Referenced by drizzled::Session::get_lock_data(), and drizzled::Session::unlockReadTables().

uint32_t drizzled::Table::lock_position [inherited]

Position in DRIZZLE_LOCK.table

Definition at line 190 of file table.h.

Referenced by drizzled::Session::get_lock_data(), and drizzled::Session::unlockReadTables().

Set if next_number is activated. What the heck is the difference between this and the next member?

Definition at line 162 of file table.h.

Referenced by ha_innobase::doInsertRecord(), ha_innobase::doUpdateRecord(), drizzled::insert_query(), and drizzled::set_field_to_null_with_conversions().

Estimate of number of records that satisfy SARGable part of the table condition, or table->cursor->records if no SARGable condition could be constructed. This value is used by join optimizer as an estimate of number of records that will pass the table condition (condition that depends on fields of this table and constants)

Definition at line 275 of file table.h.

Referenced by drizzled::best_access_path(), drizzled::make_join_statistics(), and drizzled::test_if_skip_sort_order().

Points to the auto-setting timestamp field, if any

Definition at line 164 of file table.h.

Referenced by drizzled::CreateField::CreateField(), and drizzled::update_query().


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