Drizzled Public API Documentation

bin_string.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/charset_info.h>
00023 #include <drizzled/item/hex_string.h>
00024 
00025 #include <drizzled/visibility.h>
00026 
00027 namespace drizzled
00028 {
00029 
00030 class Item_bin_string: public Item_hex_string
00031 {
00032 public:
00033   Item_bin_string(const char *str,uint32_t str_length);
00034 };
00035 
00036 class DRIZZLED_API Item_result_field :
00037   public Item    /* Item with result field */
00038 {
00039 public:
00040   Field *result_field;                          /* Save result here */
00041   Item_result_field() :result_field(0) {}
00042   // Constructor used for Item_sum/Item_cond_and/or (see Item comment)
00043   Item_result_field(Session *session, Item_result_field *item):
00044     Item(session, item), result_field(item->result_field)
00045   {}
00046   ~Item_result_field() {}                       /* Required with gcc 2.95 */
00047   Field *get_tmp_table_field() { return result_field; }
00048   Field *tmp_table_field(Table *)
00049   { return result_field; }
00050   table_map used_tables() const { return 1; }
00051   virtual void fix_length_and_dec()=0;
00052   void set_result_field(Field *field) { result_field= field; }
00053   bool is_result_field() { return 1; }
00054   void save_in_result_field(bool no_conversions)
00055   {
00056     save_in_field(result_field, no_conversions);
00057   }
00058   void cleanup();
00059 };
00060 
00061 } /* namespace drizzled */
00062