Drizzled Public API Documentation

cache_row.h
00001 /* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
00002  *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
00003  *
00004  *  Copyright (C) 2008 Sun Microsystems, Inc.
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; version 2 of the License.
00009  *
00010  *  This program is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *  GNU General Public License for more details.
00014  *
00015  *  You should have received a copy of the GNU General Public License
00016  *  along with this program; if not, write to the Free Software
00017  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00018  */
00019 
00020 #pragma once
00021 
00022 #include <drizzled/item/cache.h>
00023 
00024 namespace drizzled {
00025 
00026 class Item_cache_row : public Item_cache
00027 {
00028   Item_cache  **values;
00029   uint32_t item_count;
00030   bool save_array;
00031 public:
00032 
00033   Item_cache_row()
00034   :Item_cache(), values(0), item_count(2), save_array(0) {}
00035 
00036   /*
00037     'allocate' used only in row transformer, to preallocate space for row
00038     cache.
00039   */
00040   void allocate(uint32_t num);
00041   /*
00042     'setup' is needed only by row => it not called by simple row subselect
00043     (only by IN subselect (in subselect optimizer))
00044   */
00045   bool setup(Item*);
00046   void store(Item*);
00047   void illegal_method_call(const char * method_name);
00048   void make_field(SendField *field);
00049   double val_real();
00050   int64_t val_int();
00051   String *val_str(String *val);
00052   type::Decimal *val_decimal(type::Decimal *val);
00053 
00054   enum Item_result result_type() const;
00055 
00056   uint32_t cols();
00057   Item *element_index(uint32_t i);
00058   Item **addr(uint32_t i);
00059   bool check_cols(uint32_t c);
00060   bool null_inside();
00061   void bring_value();
00062   void keep_array();
00063   void cleanup();
00064 
00065 };
00066 
00067 } /* namespace drizzled */
00068