MySQL++ Reference Manual

Main Page Namespace List Class Hierarchy Compound List File List Namespace Members Compound Members File Members

# sql_string.h

Go to the documentation of this file.

    00001
    00002
    00003
    00004
    00005
    00006
    00007
    00008
    00009
    00010 /***********************************************************************
    00011  Copyright (c) 1998 by Kevin Atkinson, (c) 1999, 2000 and 2001 by
    00012  MySQL AB, and (c) 2004, 2005 by Educational Technology Resources, Inc.
    00013  Others may also hold copyrights on code in this file.  See the CREDITS
    00014  file in the top directory of the distribution for details.
    00015
    00016  This file is part of MySQL++.
    00017
    00018  MySQL++ is free software; you can redistribute it and/or modify it
    00019  under the terms of the GNU Lesser General Public License as published
    00020  by the Free Software Foundation; either version 2.1 of the License, or
    00021  (at your option) any later version.
    00022
    00023  MySQL++ is distributed in the hope that it will be useful, but WITHOUT
    00024  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    00025  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
    00026  License for more details.
    00027
    00028  You should have received a copy of the GNU Lesser General Public
    00029  License along with MySQL++; if not, write to the Free Software
    00030  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
    00031  USA
    00032 ***********************************************************************/
    00033
    00034 #ifndef MYSQLPP_SQL_STRING_H
    00035 #define MYSQLPP_SQL_STRING_H
    00036
    00037 #include "defs.h"
    00038
    00039 #include <stdio.h>
    00040 #include <string>
    00041
    00042 namespace mysqlpp {
    00043
    00046
    00047 class SQLString : public std::string {
    00048 public:
    00051         bool is_string;
    00052
    00055         bool dont_escape;
    00056
    00067         bool processed;
    00068
    00070         MYSQLPP_EXPORT SQLString();
    00071
    00073         MYSQLPP_EXPORT SQLString(const std::string& str);
    00074
    00076         MYSQLPP_EXPORT SQLString(const char* str);
    00077
    00079         MYSQLPP_EXPORT SQLString(char i);
    00080
    00083         MYSQLPP_EXPORT SQLString(unsigned char i);
    00084
    00087         MYSQLPP_EXPORT SQLString(short int i);
    00088
    00091         MYSQLPP_EXPORT SQLString(unsigned short int i);
    00092
    00094         MYSQLPP_EXPORT SQLString(int i);
    00095
    00098         MYSQLPP_EXPORT SQLString(unsigned int i);
    00099
    00102         MYSQLPP_EXPORT SQLString(longlong i);
    00103
    00106         MYSQLPP_EXPORT SQLString(ulonglong i);
    00107
    00110         MYSQLPP_EXPORT SQLString(float i);
    00111
    00114         MYSQLPP_EXPORT SQLString(double i);
    00115
    00117         SQLString& operator =(const char* str)
    00118         {
    00119                 std::string::operator =(str);
    00120                 processed = false;
    00121                 return *this;
    00122         }
    00123
    00125         SQLString& operator =(const std::string& str)
    00126         {
    00127                 std::string::operator =(str);
    00128                 processed = false;
    00129                 return *this;
    00130         }
    00131 };
    00132
    00133 } // end namespace mysqlpp
    00134
    00135 #endif