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