00001 /* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*- 00002 * vim:expandtab:shiftwidth=2:tabstop=2:smarttab: 00003 * 00004 * Copyright (C) 2008-2009 Sun Microsystems, Inc. 00005 * 00006 * Authors: 00007 * 00008 * Jay Pipes <joinfu@sun.com> 00009 * 00010 * This program is free software; you can redistribute it and/or modify 00011 * it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation; either version 2 of the License, or 00013 * (at your option) any later version. 00014 * 00015 * This program is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 * GNU General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU General Public License 00021 * along with this program; if not, write to the Free Software 00022 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00023 */ 00024 00038 #pragma once 00039 00040 #include <drizzled/item/func.h> 00041 #include <drizzled/function/str/strfunc.h> 00042 00043 class PrintTransactionMessageFunction : public drizzled::Item_str_func 00044 { 00045 public: 00046 PrintTransactionMessageFunction() : Item_str_func() {} 00047 drizzled::String *val_str(drizzled::String*); 00048 00049 void fix_length_and_dec(); 00050 00051 const char *func_name() const 00052 { 00053 return "print_transaction_message"; 00054 } 00055 00056 bool check_argument_count(int n) 00057 { 00058 return (n == 2); 00059 } 00060 }; 00061