Author: wyoung
Date: Wed Nov 7 18:59:40 2007
New Revision: 1824
URL: http://svn.gna.org/viewcvs/mysqlpp?rev=1824&view=rev
Log:
Added null_str const global (std::string) for use anywhere we need the
string "NULL", such as when building queries. Compare global 'null'
variable in same module.
Added:
trunk/lib/null.cpp
Modified:
trunk/lib/null.h
trunk/mysql++.bkl
Added: trunk/lib/null.cpp
URL: http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/null.cpp?rev=1824&view=auto
==============================================================================
--- trunk/lib/null.cpp (added)
+++ trunk/lib/null.cpp Wed Nov 7 18:59:40 2007
@@ -1,0 +1,31 @@
+/***********************************************************************
+ null.cpp - Defines a few things declared in null.h
+
+ Copyright (c) 2007 by Educational Technology Resources, Inc.
+ Others may also hold copyrights on code in this file. See the
+ CREDITS file in the top directory of the distribution for details.
+
+ This file is part of MySQL++.
+
+ MySQL++ is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ MySQL++ is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with MySQL++; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
+ USA
+***********************************************************************/
+
+#include "null.h"
+
+namespace mysqlpp {
+ const std::string null_str("NULL");
+}
+
Modified: trunk/lib/null.h
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/null.h?rev=1824&r1=1823&r2=1824&view=diff
==============================================================================
--- trunk/lib/null.h (original)
+++ trunk/lib/null.h Wed Nov 7 18:59:40 2007
@@ -35,8 +35,11 @@
#include "exceptions.h"
#include <iostream>
+#include <string>
namespace mysqlpp {
+
+extern const std::string null_str;
/// \brief The type of the global mysqlpp::null object.
Modified: trunk/mysql++.bkl
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/mysql%2B%2B.bkl?rev=1824&r1=1823&r2=1824&view=diff
==============================================================================
--- trunk/mysql++.bkl (original)
+++ trunk/mysql++.bkl Wed Nov 7 18:59:40 2007
@@ -51,6 +51,7 @@
lib/manip.cpp
lib/myset.cpp
lib/mysql++.cpp
+ lib/null.cpp
lib/qparms.cpp
lib/query.cpp
lib/result.cpp
_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits