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

sql_types.h

Go to the documentation of this file.
00001 
00002 
00003 
00004 /***********************************************************************
00005  Copyright (c) 2006 by Educational Technology Resources, Inc.  Others
00006  may also hold copyrights on code in this file.  See the CREDITS file in
00007  the top directory of the distribution for details.
00008 
00009  This file is part of MySQL++.
00010 
00011  MySQL++ is free software; you can redistribute it and/or modify it
00012  under the terms of the GNU Lesser General Public License as published
00013  by the Free Software Foundation; either version 2.1 of the License, or
00014  (at your option) any later version.
00015 
00016  MySQL++ is distributed in the hope that it will be useful, but WITHOUT
00017  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
00019  License for more details.
00020 
00021  You should have received a copy of the GNU Lesser General Public
00022  License along with MySQL++; if not, write to the Free Software
00023  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
00024  USA
00025 ***********************************************************************/
00026 
00027 #if !defined(MYSQLPP_SQL_TYPES_H)
00028 #define MYSQLPP_SQL_TYPES_H
00029 
00030 #include "common.h"
00031 #include "myset.h"
00032 
00033 #include <string>
00034 
00035 namespace mysqlpp {
00036 
00037 #if !defined(DOXYGEN_IGNORE)
00038 // Doxygen will not generate documentation for this section.
00039 
00040 // Nearest C++ equivalents of MySQL data types.  These are only the "NOT
00041 // NULL" variants.  Wrap these types in MySQL++'s Null<> template to get
00042 // NULL-able types.
00043 typedef signed char             sql_tinyint;
00044 typedef unsigned char   sql_tinyint_unsigned;
00045 typedef short                   sql_smallint;
00046 typedef unsigned short  sql_smallint_unsigned;
00047 typedef int                             sql_int;
00048 typedef unsigned int    sql_int_unsigned;
00049 typedef int                             sql_mediumint;
00050 typedef unsigned int    sql_mediumint_unsigned;
00051 typedef longlong                sql_bigint;
00052 typedef ulonglong               sql_bigint_unsigned;
00053 
00054 typedef float                   sql_float;
00055 typedef double                  sql_double;
00056 typedef double                  sql_decimal;
00057 
00058 typedef Date                    sql_date;
00059 typedef Time                    sql_time;
00060 typedef Time                    sql_timestamp;
00061 typedef DateTime                sql_datetime;
00062 
00063 typedef std::string             sql_enum;
00064 
00065 typedef Set<>                   sql_set;
00066 
00067 typedef std::string             sql_blob;
00068 typedef std::string             sql_tinyblob;
00069 typedef std::string             sql_mediumblob;
00070 typedef std::string             sql_longblob;
00071 
00072 typedef std::string             sql_char;
00073 typedef std::string             sql_varchar;
00074 
00075 #endif // !defined(DOXYGEN_IGNORE)
00076 
00077 } // end namespace mysqlpp
00078 
00079 #endif // !defined(MYSQLPP_SQL_TYPES_H)
00080 

Generated on Tue Apr 17 08:42:13 2007 for MySQL++ by doxygen 1.3.5