Index: Bakefiles.bkgen ================================================================== --- Bakefiles.bkgen +++ Bakefiles.bkgen @@ -1,24 +1,92 @@ - - - - ./mysql++.bkl - - - - - autoconf,mingw,msvs2003prj,msvs2005prj,msvs2008prj,xcode2 - - - - -o$(INPUT_FILE_DIR)/Makefile.mingw - - - -ovc2003/mysql++.sln - - - -ovc2005/mysql++.sln - - - -ovc2008/mysql++.sln -DMSVS_PLATFORMS=win64 - - +/*********************************************************************** + sql_buffer.cpp - Implements the SQLBuffer class. + + Copyright (c) 2007-2008 by Educational Technology Resources, Inc. + Others may also hold copyrights on code in this file. See the + CREDITS.txt 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 "sql_buffer.h" + +#include "datetime.h" +#include "sql_types.h" + +#include + +namespace mysqlpp { + + +SQLBuffer& +SQLBuffer::assign(const char* data, size_type length, mysql_type_info type, + bool is_null) +{ + replace_buffer(data, length); + type_ = type; + is_null_ = is_null; + return *this; +} + +SQLBuffer& +SQLBuffer::assign(const std::string& s, mysql_type_info type, bool is_null) +{ + replace_buffer(s.data(), s.length()); + type_ = type; + is_null_ = is_null; + return *this; +} + +bool +SQLBuffer::quote_q() const +{ + if ((type_.base_type().c_type() == typeid(mysqlpp::sql_datetime)) && + data_ && (length_ >= 5) && (memcmp(data_, "NOW()", 5) == 0)) { + // The default DATETIME value is special-cased as a call to the + // SQL NOW() function, which must not be quoted. + return false; + } + else { + // Normal case: we can infer the need to quote from the type. + return type_.quote_q(); + } +} + +void +SQLBuffer::replace_buffer(const char* pd, size_type length) +{ + delete[] data_; + data_ = 0; + length_ = 0; + + if (pd) { + // The casts for the data member are because the C type system + // can't distinguish initialization from modification when it + // happens in 2 steps like this. + // + // We cast away const for pd in case we're on a system that uses + // the old definition of memcpy() with non-const 2nd parameter. + data_ = new char[length + 1]; + length_ = length; + memcpy(const_cast(data_), const_cast(pd), length_); + const_cast(data_)[length_] = '\0'; + } +} + +} // end namespace mysqlpp + Index: COPYING.txt ================================================================== --- COPYING.txt +++ COPYING.txt @@ -1,10 +1,154 @@ -The MySQL++ library proper and the reference manual derived from -comments in the library source code are licensed under the GNU Lesser -General Public License. A copy is provided in this directory, in the -file LICENSE.txt. - -The MySQL++ User Manual is licensed under a unique license derived from -the Linux Documentation Project License. (The only changes are due to -the fact that the User Manual isn't actually part of the LDP, so a lot -of the language in the LDPL doesn't make sense when applied to the user -manual.) This license is provided in the file doc/userman/LICENSE.txt. +/*********************************************************************** + test/uds.cpp - Tests the Unix domain socket verifier in + UnixDomainSocketConnection. This test always succeeds on Windows! + + Copyright (c) 2007-2008 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 +#include + +#include +#include +#include + +#if !defined(MYSQLPP_PLATFORM_WINDOWS) +#include +#include +#include +#include +#include + +#include + +static const char* success_path = "test_uds_success.sock"; +static const char* failure_path = "test_uds_failure.sock"; + +static int +make_socket(const char* path, mode_t mode) +{ + // Just in case a socket with this name exists already, try to + // remove it. Only a failure if it exists and we can't remove it. + if ((unlink(path) < 0) && (errno != ENOENT)) { + return -1; + } + + // Create the domain socket + int fd = socket(AF_LOCAL, SOCK_STREAM, 0); + if (fd < 0) { + return -1; + } + + // Bind the socket to the named file + struct sockaddr_un sun; + memset(&sun, sizeof(sun), 0); + sun.sun_family = AF_LOCAL; + strncpy(sun.sun_path, path, sizeof(sun.sun_path)); + sun.sun_path[sizeof(sun.sun_path) - 1] = '\0'; + if (bind(fd, reinterpret_cast(&sun), sizeof(sun)) < 0) { + return -1; + } + + // Change the socket's mode as requested + if (chmod(path, mode) < 0) { + return -1; + } + + return fd; +} + + +static void +test_success() +{ + std::string error; + int fd = make_socket(success_path, S_IREAD | S_IWRITE); + if (fd >= 0) { + bool fail = !mysqlpp::UnixDomainSocketConnection::is_socket( + success_path, &error); + if (fail) { + throw mysqlpp::SelfTestFailed(error); + } + } + else { + std::ostringstream outs; + outs << "Failed to create test domain socket: " << strerror(errno); + throw mysqlpp::SelfTestFailed(outs.str()); + } +} + + +static void +test_failure() +{ + int fd = make_socket(failure_path, S_IREAD); + if (fd < 0) { + std::ostringstream outs; + outs << "Failed to create test domain socket: " << strerror(errno); + throw mysqlpp::SelfTestFailed(outs.str()); + } + + if (mysqlpp::UnixDomainSocketConnection::is_socket(failure_path)) { + throw mysqlpp::SelfTestFailed("Failed to fail on read-only socket"); + } + else if (mysqlpp::UnixDomainSocketConnection::is_socket( + "BogusBogus.sock")) { + throw mysqlpp::SelfTestFailed("Failed to fail on bad file name"); + } + else { + close(fd); + unlink(failure_path); + fd = creat(failure_path, S_IREAD | S_IWRITE); + bool success = mysqlpp::UnixDomainSocketConnection::is_socket( + failure_path); + if (success) { + throw mysqlpp::SelfTestFailed("Failed to fail on non-socket"); + } + } +} +#endif + + +int +main() +{ +#if defined(MYSQLPP_PLATFORM_WINDOWS) + // Test not appropriate to this platform. Always succeed. + return 0; +#else + try { + test_success(); + unlink(success_path); + test_failure(); + unlink(failure_path); + return 0; + } + catch (mysqlpp::SelfTestFailed& e) { + std::cerr << "TCP address parse error: " << e.what() << std::endl; + return 1; + } + catch (std::exception& e) { + std::cerr << "Unexpected test failure: " << e.what() << std::endl; + return 2; + } +#endif +} Index: HACKERS.md ================================================================== --- HACKERS.md +++ HACKERS.md @@ -164,17 +164,38 @@ Turns on all of GCC's warnings and portability checks. Good for checking changes before making a public release. * `bat` - Asks `cmd.exe` to run `bootstrap.bat` for you. This is useful when - using Cygwin just as a command shell in preference to `cmd.exe`, as - opposed to using Cygwin to build MySQL++ using its native tools. - Passing 'bat' stops all command line processing in the bootstrap - script, so if you also pass some of the other options, make "`bat`" - last. The only options that affect the built project files and - `Makefiles` work are the no* ones. + Runs `bootstrap.bat` via `cmd.exe` for you, passing along equivalent + options to any of the "*no*" options you give before it. + + None of the other options above have any effect on the generated + build system files when you give "`bat`". If you need those + features, leave this option off. + + Passing `bat` stops all command line processing in the `bootstrap` + script, so if you also pass some of the other options, "`bat`" must + be last. + + The `bootstrap.bat` script is useful only when you intend to build + MySQL++ with MinGW or Visual C++, and you are using Cygwin only as a + command line environment. If you intend to build MySQL++ with + Cygwin's GCC toolchain, you must not give this option, else you will + not end up with the necessary build system files. + + One advantage of this feature is that the commands necessary to + achieve a given effect with `bootstrap.bat` when run via `bootstrap` + are shorter than when you run the batch file directly. + + Another advantage is that this low-strength version of the bootstrap + script runs faster than the full-strength form, because it produces + fewer files. + + Finally, running `bootstrap.bat` indirectly like this lets you avoid + using `cmd.exe`, a command shell greatly inferior to any of those + available for Cygwin. * `configure` script options As soon as the bootstrap script sees an option that it doesn't understand, it stops processing the command line. Any subsequent Index: INSTALL.txt ================================================================== --- INSTALL.txt +++ INSTALL.txt @@ -1,16 +1,55 @@ -The installation procedure depends on the compiler you use to build -MySQL++ and the OS you build it on. There are platform-specific -instructions for all popular platforms: - - README-Cygwin.txt - for Cygwin - README-Linux.txt - for Linux - README-Mac-OS-X.txt - for Mac OS X - README-MinGW.txt - for MinGW - README-Solaris.txt - for Solaris - README-Visual-C++.txt - for Visual C++ - -If you're on some Unix variant (Linux, OS X, *BSD, Solaris, Cygwin...) -there are additional general instructions in README-Unix.txt. - -See the main README.txt file for high-level instructions that apply -to all platforms MySQL++ works on. +/*********************************************************************** + test/wnp.cpp - Tests WindowsNamedPipeConnection::is_wnp(). This test + can only fail on Windows! It succeeds when built for anything else. + + 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 + +#include +#include + + +int +main() +{ +#if defined(MYSQLPP_PLATFORM_WINDOWS) + if (!mysqlpp::WindowsNamedPipeConnection::is_wnp(".")) { + std::cerr << "Failed to identify Windows named pipe" << std::endl; + + } + else if (mysqlpp::WindowsNamedPipeConnection::is_wnp("bogus")) { + std::cerr << "Failed to fail for bogus named pipe" << std::endl; + } + else if (mysqlpp::WindowsNamedPipeConnection::is_wnp(0)) { + std::cerr << "Failed to fail for null named pipe" << std::endl; + } + else { + return 0; + } + + return 1; +#else + return 0; +#endif +} Index: LICENSE.txt ================================================================== --- LICENSE.txt +++ LICENSE.txt @@ -1,504 +1,77 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library 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. - - This library 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 this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - +#ifndef __compare1_hh__ +#define __compare1_hh__ + +#include +#include "row1.hh" + +template +class MysqlCmp : public unary_function +{ +protected: + unsigned int index; + BinaryPred func; + CmpType cmp2; +public: + MysqlCmp(uint i, const BinaryPred &f, const CmpType &c) : index(i),func(f),cmp2(c) {} + bool operator () (const MysqlRow& cmp1) const {return func(cmp2,cmp1[index]);} +}; + +template +class MysqlCmpCStr : public MysqlCmp +{ +public: + MysqlCmpCStr(uint i, const BinaryPred &f, const char* c) : MysqlCmp(i,f,c) {} + bool operator () (const MysqlRow& cmp1) const + {return func(cmp2,cmp1[index]);} +}; + +//: A special function for using in find_if function where i is the field index number. +// This is a more generic form of mysql_cmp_cstr will work with any +// CmpType that MysqlString can convert to. However, this is not +// neary as effecent. Only use when obsoletely nessary. +template +MysqlCmp +mysql_cmp(uint i, const BinaryPred &func, const CmpType &cmp2) +{ + return MysqlCmp(i, func, cmp2); +} + +typedef binary_function bin_char_pred; + +struct cstr_equal_to : bin_char_pred { + bool operator () (const char *x, const char *y) const + {return !strcmp(x,y);} +}; +struct cstr_not_equal_to : bin_char_pred { + bool operator () (const char *x, const char *y) const + {return strcmp(x,y);} +}; +struct cstr_less : bin_char_pred { + bool operator () (const char *x, const char *y) const + {return strcmp(x,y) > 0; } +}; +struct cstr_less_equal : bin_char_pred { + bool operator () (const char *x, const char *y) const + {return strcmp(x,y) >= 0; } +}; +struct cstr_greater : bin_char_pred { + bool operator () (const char *x, const char *y) const + {return strcmp(x,y) < 0; } +}; +struct cstr_greater_equal : bin_char_pred { + bool operator () (const char *x, const char *y) const + {return strcmp(x,y) <= 0; } +}; + +//:A special function for using in find_if fucntion where i is the field index +//:number. +// +// func should be one of cstr_equal_to(), cstr_not_equal_to(), +// cstr_less(), cstr_less_equal(), cstr_less_equal(), cstr_less_equal(). +template +MysqlCmpCStr +mysql_cmp_cstr (uint i, const BinaryPred &func, const char *cmp2) { + return MysqlCmpCStr(i, func, cmp2); +} + +#endif Index: README-Linux.txt ================================================================== --- README-Linux.txt +++ README-Linux.txt @@ -1,84 +1,55 @@ -Linux is basically Unix, so README-Unix.txt covers the generic bits. -I'll just cover a few of the issues specific to Linux here. - - -Prerequisite: Install the MySQL Development Files -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - MySQL++ is built on top of the MySQL C API library, so it needs the - C API development files to build against. Most distributions of - the MySQL server for Linux don't come with these development files; - they're packaged separately. This is because you don't actually - need the server on your development machine, though it's often more - convenient to use a local server than a remote one, for testing. - - There are about as many different ways to get the C API development - files on your system as there are major Linux distributions. - More actually, because you also have the option of the official - MySQL binaries from mysql.com: - - http://dev.mysql.com/downloads/mysql/5.0.html#linux - - For RPM-based distributions, MySQL comes in several different - packages. You need at least the -devel and the -shared packages - to build MySQL++. - - The other binary distributions seem to come in just a single file, - presumably with everything included. - - You can also build from source, in which case you will also get - the entire kit and kaboodle. - - MySQL frequently comes with Linux distributions as well. If your - distribution doesn't come with at least MySQL v4.1, I recommend - using the official MySQL.com packages instead. MySQL++ can be - made to run with 4.0 and older, but it takes some work. - - On Red Hat type systems with yum, say: - - # yum install mysql-devel - - If you want to use rpm directly, you need that package and probably - the base mysql package as well. - - On Debian/Ubuntu type systems, say: - - $ sudo apt-get install libmysqlclient15-dev - - The version number is the ABI version of the MySQL C API library. - ABI version 15 corresponds to MySQL version 5.0, the recommended - stable version as of this writing. - - -Dealing with the Dynamic Linker, ld.so -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - ld.so is a system-level program on Linux which is used to run any - program that uses shared libraries (lib*.so). Its job is to find - the libraries and link them to the base executable so it will run. - - Because ld.so only looks in a few places for libraries on most - systems, a common problem is a program that builds without error - but won't run, complaining about libmysqlpp.SOMETHING. - - There are a number of ways to deal with this. - - First, you could just configure MySQL++ to install under /usr - instead of /usr/local, like system-provided packages: - - $ ./configure --prefix=/usr - - This isn't recommended practice when building packages from source, - but it does work. - - Second, you can add the MySQL++ library directory to the - LD_LIBRARY_PATH environment variable. This works like the shell's - PATH variable: a colon-separated list of directories to search. - This is best when the installation directory is something totally - uncommon, or you don't have root permissions on the box so you - can't do the next option. - - Finally, the most robust way to tell ld.so about a nonstandard - library directory is to put it in /etc/ld.so.conf or in one of - the files included from there. Then, run ldconfig as root to - rebuild the cache file ld.so uses to find libraries in these - nonstandard directories. Running ldconfig isn't necessary for - the previous two methods. + + +%xinclude; +]> +
+ + MySQL++ v3.0.8 User Manual + + + + Kevin + Atkinson + + + + Sinisa + Milivojevic + + + + Monty + Widenius + + + + Warren + Young + + + + + 1998-2001, 2005-2008 + Kevin Atkinson (original author) + MySQL AB + Educational Technology Resources + + + + + + + + + + + + + + + + + +
Index: README-Mac-OS-X.txt ================================================================== --- README-Mac-OS-X.txt +++ README-Mac-OS-X.txt @@ -1,134 +1,67 @@ -Building MySQL++ -~~~~~~~~~~~~~~~~ - There are two major ways to build MySQL++: from the command line, or - from within the Xcode IDE. - - MySQL++ has its roots in Unix and Linux, like MySQL itself. As a - result, the most well-supported way to build MySQL++ is from the - command line, or Terminal as Apple likes to call it. See - README-Unix.txt for the generic instructions. Further Mac-specific - details are given elsewhere in this file. - - The option to build MySQL++ from within Xcode is new. We added - experimental support for it in 3.0.0, but it didn't actually get - tested and debugged until 3.1.0. It may still be buggy, and over - time it's more likely to break again than the command line method, - simply because it receives less testing during development. Even - fully functional, it is less flexible than building from the command - line; Xcode's project system cannot match the power available within - the autotools build system. - - If you try the Xcode method and find that it doesn't work, the - easiest way around that roadblock is to build from the command line - instead. If you're the adventurous sort and want to contribute to - the development of MySQL++, see the file HACKERS.txt for more info - on fixing the source file used as input in the project file - generation process. We don't want fixed project files, we want a - process that lets us consistently generate correct project files. - - -Prerequisite: Install the MySQL Development Files -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - MySQL++ is built on top of the MySQL C API library, so for MySQL++ - to build, it needs at least that library and its header files - installed. You don't need the server itself installed on your - development machine, though it's often helpful anyway, for testing. - There are many suitable sources: - - - The simplest option is to download the MySQL server DMG from - mysql.com. In addition to the C API files you absolultely must - have, this gives you a nice Mac-like installation procedure and a - preference pane for bringing the server up and down and setting it - to start on system boot. - - - If you really only want the C API development files, MySQL offers - them separately as Connector/C. As of this writing, you get the - files as a tarball, and you have to copy its contents to some - suitable location on your hard drive. If you're using Xcode to - build MySQL++, you'll want to put them under /usr/local/mysql. - MySQL++'s command line build system is far more tolerant, looking - there and in many other typical locations. - - - If you use Fink, you can install the C API files with: - - $ fink install mysql15-dev - - If you also want a local MySQL server, say this instead: - - $ fink install mysql mysql15-dev - - - From MacPorts, http://macports.org. I have zero information on - this other than that it's theoretically possible for it to work. - If you figure out how to make it work, please post the method - to the mailing list so I can update this document. - - -Dealing with the 64-Bit Transition in Snow Leopard -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Xcode for Snow Leopard installs two independent versions of the GNU - Compiler Collection. The default is GCC 4.2, and it is set up to - build 64-bit executables by default, even if your system is booted - into 32-bit mode. You also get GCC 4.0, which builds 32-bit - executables by default. On top of that, you have the confusion - added by Apple's decision to make all 64-bit capable machines boot - into 32-bit mode by default, except for the Xserves. - - The first symptom most people run into as a result of this mess is - that the "configure" script fails, yelling something about being - unable to link to libmysqlclient, the MySQL C API client library. - It's because the library was probably built as a 32-bit executable - and you're using the default compiler which tries to build a 64-bit - test executable against this library and fails. - - There are many ways out of this tarpit. Here are the ones I prefer: - - First, you can force GCC 4.2 to build 32-bit binaries: - - ./configure CFLAGS=-m32 CXXFLAGS=-m32 LDFLAGS=-m32 --other-flags-here - - Second, you can make the MySQL++ build system use GCC 4.0 instead: - - ./configure CC=gcc-4.0 CXX=g++-4.0 --other-flags-here - - Last, you could just take Apple's implied advice and start booting - your Mac into 64-bit mode, if it will support it. Here's an article - that goes into all the details: - - http://macperformanceguide.com/SnowLeopard-64bit.html - - I'm aware of other solutions to the problem, but I expect one among - these will work for you. - - -Making Universal Binaries -~~~~~~~~~~~~~~~~~~~~~~~~~ - By default, the command line build system will generate libraries - that only work with the platform you build MySQL++ on. It can be - convinced to build "universal" binaries instead by configuring - the library like so: - - $ ./configure --disable-dependency-tracking \ - CXXFLAGS='-arch ppc -arch i386' - - This builds the library for the two 32-bit OS X architectures, and - is what most people have traditionally thought of as "universal". - However, you may also want a 64-bit build, meaning there are four - different architectures, and thus four -arch flags needed: - - $ ./configure --disable-dependency-tracking \ - CXXFLAGS='-arch ppc -arch ppc64 -arch i386 -arch x86_64' - - These are single commands, with the line broken to keep the line - lengths in this document reasonable. - - The first command doubles build time relative to the default - configuration, and the second quadruples it. It also makes the - resulting binaries larger, which increases the amount of time - it takes to start a program. Build MySQL++ like this only if - you must. - - The --disable-dependency-tracking flag is necessary because, - when building universal binaries, it has to rebuild each source - module multiple times, which confuses the logic that tries to tell - when a given module needs rebuiding based on its dependencies on - other files. +/*********************************************************************** + field_names.cpp - Implements the FieldNames class. + + Copyright (c) 1998 by Kevin Atkinson, (c) 1999-2001 by MySQL AB, and + (c) 2004-2010 by Educational Technology Resources, Inc. Others may + also hold copyrights on code in this file. See the CREDITS.txt 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 +***********************************************************************/ + +#define MYSQLPP_NOT_HEADER +#include "common.h" + +#include "field_names.h" +#include "result.h" + +#include + +namespace mysqlpp { + +namespace internal { extern void str_to_lwr(std::string& s); } + +void +FieldNames::init(const ResultBase* res) +{ + size_t num = res->num_fields(); + reserve(num); + + for (size_t i = 0; i < num; i++) { + push_back(res->fields().at(i).name()); + } +} + + +unsigned int +FieldNames::operator [](const std::string& s) const +{ + std::string temp1(s); + internal::str_to_lwr(temp1); + for (const_iterator it = begin(); it != end(); ++it) { + std::string temp2(*it); + internal::str_to_lwr(temp2); + if (temp2.compare(temp1) == 0) { + return it - begin(); + } + } + + return end() - begin(); +} + +} // end namespace mysqlpp Index: README-MinGW.txt ================================================================== --- README-MinGW.txt +++ README-MinGW.txt @@ -1,165 +1,122 @@ -Prerequisite: GCC Version -~~~~~~~~~~~~~~~~~~~~~~~~~ - If your MinGW version isn't using at least GCC 3.4.5, it needs - to be updated. Older versions are known to not work with MySQL++. - - As of MySQL++ 3.1.1, the required version might need to be even - newer, as we are now depending on improvements to the MinGW linker - which probably don't go back that far. - - -Prerequisite: MySQL C Development Files -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - MySQL++ is built atop MySQL's C API library. The easiest way to - get that is to install Connector/C on your development system, - which you can download from mysql.com. The distribution assumes - these files are in: - - C:\Program Files\MySQL\MySQL Connector C 6.1\ - - There are a number of reasons why that path may not work for you: - - - You have a newer version of Connector/C installed - - - You're on a 64-bit system, but have the 32-bit versions of - Connector/C and MinGW installed and wish to build a 32-bit - binary. In that case, the path will look like this instead: - - C:\Program Files (x86)\MySQL\MySQL Connector C 6.1\ - - - You may have the MySQL Server on your system and installed the - development files along with it, and therefore don't want to - install Connector/C separately. In that case, the path will - look like this instead: - - C:\Program Files\MySQL\MySQL Server 5.6\ - - Regardless of the reason you have for changing this path, there are - two ways that work: - - - The easy way is to do a global search and replace on the path - in Makefile.mingw. This is a generated file, but if that's the - only change to MySQL++ you need, it works fine. - - - If you're doing deeper work on MySQL++, you should change the - MYSQL_WIN_DIR variable at the top of mysql++.bkl instead. - - Having done that, you can generate Makefile.mingw from that - file using the Windows port of Bakefile (http://bakefile.org/): - - bakefile_gen -f mingw - - -Building the Library and Example Programs -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - With the prerequisites above taken care of, you can build MySQL++ - with this command: - - mingw32-make -f Makefile.mingw - - Notice that we're using the MinGW-specific version of GNU make, not - the Cygwin or MSYS versions. Many things will break otherwise: path - separator handling, shell commands used by the Makefile, etc. - - Speaking of Cygwin and MSYS, if you have either these or any other - Unix emulation environment installed, be sure their executables - aren't in the PATH when building MySQL++. MinGW's version of GNU - make does some funny things if it thinks it's running in the - presence of Unixy tools, which will break the MySQL++ build. - - Once the library is built, you should run the examples. At minimum, - run resetdb and simple1. - - Once you're satisfied that the library is working correctly, you can - run install.hta to automatically install the library files and - headers in subdirectories under c:\mysql++. - - -Cygwin and MinGW Coexistence -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - It's possible to have both Cygwin and MinGW installed and build - with the MinGW tools without interference from the Cygwin bits. - The main thing you have to take care of is that MinGW's bin - directory must precede the Cygwin bin directory in the PATH, - so that its tools are found first. If you use Cygwin's bash - as a command shell in preference to the DOS-like cmd.exe, you - can use this shell script to temporarily set the environment to - "MinGW mode" and make it easy to get back to "Cygwin mode": - - #!/bin/sh - PATH=/c/mingw/bin:/c/windows:/c/windows/system32:/c/cygwin/bin - echo "Say 'exit' to leave MinGW shell and restore Cygwin environment." - /usr/bin/bash --rcfile ~/.mingwrc - - I recommend having at least this in the ~/.mingwrc file: - - alias make=mingw32-make - PS1='MinGW: \W \$ ' - - The prompt change reminds you that you are in a sub-shell set up for - MinGW. The alias for 'make' ensures you don't accidentally run - Cygwin's make, which won't work with Makefile.mingw. We could just - leave /c/cygwin/bin out of the environment, but there are Cygwin - tools we want access to, like vim. As long as all the MinGW ones - override those Cygwin also provides, we don't need to worry about - having both in the PATH. Besides, having the alias is nice for - those who have 'make' committed to muscle memory. - - -Building on Linux -~~~~~~~~~~~~~~~~~ - You might wish to build MySQL++ with MinGW because you're - not actually running Windows, but need Windows executables. - The thought being that this lets you use GCC, the same compiler - you're probably using to make native executables. There are - indeed ways to make this work. - - The most "native" way to do this is to run MinGW under Wine. - Leonti Bielski provided these instructions: - - 1. Install MinGW through Wine: - - $ wine MinGW-5.1.6.exe - - 2. Add the MinGW directory to Wine's PATH with Wine regedit: - - http://winehq.org/site/docs/wineusr-guide/environment-variables - - 3. Install MySQL under Wine, or at least unpack the Windows - ZIP file version of MySQL in a place where Wine can find it. - You don't need to run a Windows MySQL server under Wine. - We're only doing this to get the MySQL C API library and - its headers, which MySQL++ builds against. The resulting - MinGW build of MySQL++ can talk to a native MySQL server - out in Wine's host environment or on some other machine. - - 4. Modify Makefile.mingw to match the install location for - the MySQL C API files. - - 5. Build MySQL++ with: - - $ wine mingw32-make -f Makefile.mingw - - Another way is to build a Windows virtual machine, such as with - VMware or VirtualBox. In that case, you'd use the regular build - instructions at the top of this document. - - You might think to avoid the need for Wine or Windows by use of a - MinGW cross-compiler: - - $ ./configure --target=mingw32 - $ make - - Unfortunately, that currently doesn't work. - - The reason is that our autoconf build system assumes a - typical POSIX type target, which MinGW is not. We made this - assumption because we have a perfectly good MinGW build option, - Makefile.mingw. But, that also won't work on a POSIX system - because that Makefile assumes external commands run under cmd.exe, - not some Unixy shell. Thus the advice to build with Makefile.mingw - under Windows or something sufficiently close to it. - - If you really wanted to, you could extend the autoconf build system - to make it realize when it's being used to cross-compile for MinGW. - Patches thoughtfully considered; see HACKERS.txt. +#!/bin/sh + +# This script is part of Bakefile (http://www.bakefile.org) autoconf +# script. It is used to track C/C++ files dependencies in portable way. +# +# Permission is given to use this file in any way. + +DEPSMODE=gcc +DEPSFLAG="-MMD" +DEPSDIRBASE=.deps + +if test $DEPSMODE = gcc ; then + $* ${DEPSFLAG} + status=$? + + # determine location of created files: + while test $# -gt 0; do + case "$1" in + -o ) + shift + objfile=$1 + ;; + -* ) + ;; + * ) + srcfile=$1 + ;; + esac + shift + done + objfilebase=`basename $objfile` + builddir=`dirname $objfile` + depfile=`basename $srcfile | sed -e 's/\..*$/.d/g'` + depobjname=`echo $depfile |sed -e 's/\.d/.o/g'` + depsdir=$builddir/$DEPSDIRBASE + mkdir -p $depsdir + + # if the compiler failed, we're done: + if test ${status} != 0 ; then + rm -f $depfile + exit ${status} + fi + + # move created file to the location we want it in: + if test -f $depfile ; then + sed -e "s,$depobjname:,$objfile:,g" $depfile >${depsdir}/${objfilebase}.d + rm -f $depfile + else + # "g++ -MMD -o fooobj.o foosrc.cpp" produces fooobj.d + depfile=`echo "$objfile" | sed -e 's/\..*$/.d/g'` + if test ! -f $depfile ; then + # "cxx -MD -o fooobj.o foosrc.cpp" creates fooobj.o.d (Compaq C++) + depfile="$objfile.d" + fi + if test -f $depfile ; then + sed -e "\,^$objfile,!s,$depobjname:,$objfile:,g" $depfile >${depsdir}/${objfilebase}.d + rm -f $depfile + fi + fi + exit 0 + +elif test $DEPSMODE = mwcc ; then + $* || exit $? + # Run mwcc again with -MM and redirect into the dep file we want + # NOTE: We can't use shift here because we need $* to be valid + prevarg= + for arg in $* ; do + if test "$prevarg" = "-o"; then + objfile=$arg + else + case "$arg" in + -* ) + ;; + * ) + srcfile=$arg + ;; + esac + fi + prevarg="$arg" + done + + objfilebase=`basename $objfile` + builddir=`dirname $objfile` + depsdir=$builddir/$DEPSDIRBASE + mkdir -p $depsdir + + $* $DEPSFLAG >${depsdir}/${objfilebase}.d + exit 0 + +elif test $DEPSMODE = unixcc; then + $* || exit $? + # Run compiler again with deps flag and redirect into the dep file. + # It doesn't work if the '-o FILE' option is used, but without it the + # dependency file will contain the wrong name for the object. So it is + # removed from the command line, and the dep file is fixed with sed. + cmd="" + while test $# -gt 0; do + case "$1" in + -o ) + shift + objfile=$1 + ;; + * ) + eval arg$#=\$1 + cmd="$cmd \$arg$#" + ;; + esac + shift + done + + objfilebase=`basename $objfile` + builddir=`dirname $objfile` + depsdir=$builddir/$DEPSDIRBASE + mkdir -p $depsdir + + eval "$cmd $DEPSFLAG" | sed "s|.*:|$objfile:|" >${depsdir}/${objfilebase}.d + exit 0 + +else + $* + exit $? +fi Index: README-Solaris.txt ================================================================== --- README-Solaris.txt +++ README-Solaris.txt @@ -1,37 +1,57 @@ -For the most part, Solaris is just another Unix variant as far as -MySQL++ is concerned. See README-Unix.txt for most of what you need -to know to build and use MySQL++. - - -Prerequisite: Install the MySQL Development Files -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - MySQL++ is built on top of the MySQL C API library, so it needs the - C API development files to build against. - - With the current version of Solaris, at least, a MySQL package - is included on the operating system disk, but not installed - by default. To install it, oull down the GNOME System menu, - go to Administration, and then to Package Manager. Search for - "mysql5" and install those packages. While there, you may also - need to install the gcc packages, if you haven't done that already. - I'm not sure, but you may need to install Perl as well. - - Don't search for just "mysql" in Package Manager, as that will also - bring up legacy MySQL 4.0 packages. MySQL++ may build against 4.0 - still; it's been a while since we've tested it. What is certain - is that the examples won't run against 4.0 without modification, - as they assume the availability of UTF-8 character set support, - which was added in 4.1. - - It's no doubt possible to use the official binaries from mysql.com - instead, or to build from source. We don't do that ourselves, - though, and don't have reports from those who have, so we can't - advise on how to do it. - - -C API Development File Directories -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Sun's MySQL package installs the development files in relatively - uncommon locations. The libraries are in /usr/mysql/lib/mysql, - and the headers are in /usr/mysql/include/mysql. Way to be - redundant, guys. :) +/// \file autoflag.h +/// \brief Defines a template for setting a flag within a given variable +/// scope, and resetting it when exiting that scope. + +/*********************************************************************** + Copyright (c) 2007 by Educational Technology Resources, Inc. + Others may also hold copyrights on code in this file. See the + CREDITS.txt 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 +***********************************************************************/ + +#if !defined(MYSQLPP_AUTOFLAG_H) +#define MYSQLPP_AUTOFLAG_H + +/// \brief A template for setting a flag on a variable as long as the +/// object that set it is in scope. Flag resets when object goes +/// out of scope. Works on anything that looks like bool. + +template +class AutoFlag +{ +public: + /// \brief Constructor: sets ref to true. + AutoFlag(T& ref) : + referent_(ref) + { + referent_ = true; + } + + /// \brief Destructor: sets referent passed to ctor to false. + ~AutoFlag() + { + referent_ = false; + } + +private: + T& referent_; +}; + +#endif // !defined(MYSQLPP_AUTOFLAG_H) + Index: README-Unix.txt ================================================================== --- README-Unix.txt +++ README-Unix.txt @@ -1,111 +1,101 @@ -Platform Variations -~~~~~~~~~~~~~~~~~~~ - This file only covers details common to all Unix variants - supported by MySQL++. For platform-specific details, see the - file appropriate to your OS: - - README-Cygwin.txt - README-Linux.txt - README-Mac-OS-X.txt - README-Solaris.txt - - There are no special instructions for any other Unix flavors. - - -Building the Library and Example Programs -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - MySQL++ uses GNU autoconf, so you can build it with the standard - commands: - - $ ./configure - $ make - $ su - # make install - - -Configure Options -~~~~~~~~~~~~~~~~~ - The configure script takes several interesting options. Say: - - $ ./configure --help - - to get a list. Some of the more interesting flags are: - - --prefix: - - If you wish to install mysql++ in a root directory other than - /usr/local, run configure with --prefix=/some/dir/name - - --with-mysql*: - - If you installed MySQL in an atypical location, the configure - script will not be able to find the library and header - files without help. The simplest way to clue configure into - where MySQL is installed is with the --with-mysql option. - Try something like "--with-mysql=/usr/local/mysql", for - instance. The configure script will then try to guess which - subdirectories under the given directory contain the library - and include files. - - If that doesn't work, it's because the library and header - files aren't in typical locations under the directory you gave - for configure to find them. So, you need to specify them - separately with --with-mysql-include and --with-mysql-lib - instead. As with --with-mysql, configure can often guess - which subdirectory under the given directory contains the - needed files, so you don't necessarily have to give the full - path to these files. - - --with-field-limit: - - This lets you increase the maximum field limit for template - queries and SSQLSes. By default, both are limited to 25 - fields. See chapter 8.2 in the user manual for details: - - http://tangentsoft.net/mysql++/doc/html/userman/configuration.html - - --enable-thread-check: - - Builds MySQL++ with threading support, if possible. - - This option simply turns on two tests: first, that your - system uses a compatible threading library; and second, - that the thread-safe version of the MySQL C API library - (libmysqlclient_r) is installed and working. If both of - these are true, you get a thread-aware version of MySQL++. - "Thread-aware" means that the library does make an effort to - prevent problems, but we don't guarantee that all possible - uses of MySQL++ are thread-safe. - - Note that this is a suggestion, not a command. If we can't - figure out the system's threading model or can't find the - thread-aware build of the C API library, configure won't fail. - It just reverts to the standard single-thread build. - - See the chapter on threading in the user manual for more - details and advice on creating thread-safe programs with - MySQL++. - - -Building a Static Library -~~~~~~~~~~~~~~~~~~~~~~~~~ - As shipped, MySQL++ only builds a shared library. It's possible to - change things so you get a static library instead. - - Before we get to "how," beware that liking statically to MySQL++ has - legal consequences that may matter to you, due to the library's - license, the GNU LGPL. Familiarize yourself with the license, and - consider getting legal counsel before proceeding. Also, see the - MySQL++ FAQ: http://tangentsoft.net/mysql++/#faq There is more on - this topic there. - - The necessary changes are all in mysql++.bkl: - - - Change the tag to . (Remember the closing tag!) - - - Remove the tag - - - Remove the tag - - Then, re-bootstrap the library. See HACKERS.txt if you need further - instruction on doing that. +MySQL++ was created by Kevin Atkinson during 1998. From version +1.0 (released in June 1999) through 1.7.9 (May 2001), the primary +maintainer was Sinisa Milivojevic . Neither Kevin +nor Sinisa are currently involved in MySQL++ development. The current +maintainer is Warren Young , starting with +version 1.7.10 in August of 2004. + +For a fuller account of the library's history, see the first chapter +of the user manual. For the nitty-gritty details, see the ChangeLog +in the root package directory. ChangeLog items since 1.7.9 that +aren't attributed to anyone else were done by Warren Young. + + +Other contributors of note since 1.7.10: + + Chris Frey : Lots of GCC warning fixes + for the bleeding-edge compiler versions, Gentoo ebuild support, + and misc other fixes. + + Mark Meredino : Several fixes and + additions, including a lot of work on Microsoft Visual C++ + compatibility, and discoveries made while spelunking in the + library. + + Evan Wies : Contributed several C++ code + style cleanups. + + Arnon Jalon : Added the multi-query + result set handling features, and examples/multiquery.cpp to + demonstrate it. + + Korolyov Ilya has submitted several patches in many different + areas of the library. + + Remi Collet is maintaining offical RPMs + for Fedora, with other systems on the way. His work has improved + the RPM spec file we distribute greatly. + + Joel Fielder of Switchplane, + Ltd. created the ScopedConnection class, came up with the original + idea for Query's for_each() and store_in() methods, provided the + basis for examples/for_each.cpp, and provided a fix for exception + flag propagation in Query. + + Jim Wallace demonstrated the need + for BadQuery::errnum(), and contributed the patches and also + examples/deadlock.cpp to test that this feature does what it is + supposed to. + + Jonathan Wakely rebuilt my original versions + of ConnectionPool, RefCountedPointer, and RefCountedBuffer. + They're now simpler and safer. He also created the numeric + conversion logic in lib/mystring.h introduced in v3.0. + + Adrian Cornish Several fixes and + additions. + + Rick Gutleber contributed the + Query::insertfrom() method and associated InsertPolicy object, + as well as the SQLStream class. + +Here are the personal credits from the old 1.7.9 documentation, +apparently written by Kevin Atkinson: + + Chris Halverson - For helping me get it to compile under Solaris. + + Fredric Fredricson - For a long talk about automatic conversions. + + Michael Widenius - MySQL developer who has been very supportive of + my efforts. + + Paul J. Lucas - For the original idea of treating the query object + like a stream. + + Scott Barron - For helping me with the shared libraries. + + Jools Enticknap - For giving me the Template Queries idea. + + M. S. Sriram - For a detailed dission of how the Template Queries + should be implemented, the suggestion to throw exceptions on bad + queries, and the idea of having a back-end independent query + object (ie SQLQuery). + + Sinisa Milivojevic - For becoming the new offical maintainer. + + D. Hawkins and E. Loic for their autoconf + automake contribution. + + +See the ChangeLog for further credits, and details about the differences +between the many versions of this library. + + +Please do not email any of these people with general questions about +MySQL++. All of us who are still active in MySQL++ development read the +mailing list, so questions sent there do get to us: + + http://lists.mysql.com/plusplus + +The mailing list is superior to private email because the answers are +archived for future questioners to find, and because you are likely to +get answers from more people. Index: README-Visual-C++.txt ================================================================== --- README-Visual-C++.txt +++ README-Visual-C++.txt @@ -1,170 +1,101 @@ -Prerequisites -~~~~~~~~~~~~~ - You need to have the MySQL C API development files on your system, - since MySQL++ is built on top of it. - - The easiest way to get it is to download Connector/C from - mysql.com. - - If you need the MySQL server on your development system anyway, - you you can choose to install the development files along with - the server. Some versions of the MySQL Server installer for - Windows have installed the development files by default, while - others have made it an optional install. - - -Project Files -~~~~~~~~~~~~~ - The distribution comes with three sets of .sln and .vcproj files - in the vc2003, vc2005 and vc2008 subdirectories. - - We do this for several reasons: - - 1. It lets you build MySQL++ with multiple versions of Visual - C++ without the build products conflicting. - - 2. For Visual C++ 2003, we had to disable the SSQLS feature - because changes made in MySQL++ 3.0 now cause the compiler - to crash while building. See the Breakages chapter in the - user manual for workarounds if you must still use VC++ 2003. - - 3. The VC++ 2008 project files get built for 64-bit output, while - the other two build 32-bit executables. - - With VC++ 2003, we have no choice about this, since it only - supports 32-bit targets. - - VC++ 2005 did have experimental 64-bit compilers available, - but their beta nature was only one reason we chose not to - use them. The real reason is that the current MySQL++ build - system isn't currently set up to make it easy to build both - 32- and 64-bit libraries and executables at the same time - within the same solution. Bakefile allows it, but it would - require forking many of the build rules in mysql++.bkl so - we can do things like have separate MYSQL_WIN_DIR values - for each bitness. (See below for more on this variable.) - - For that same reason, the VC++ 2008 project files are set - up to build 64-bit libraries and executables *only*. - - It is possible to upgrade these project files to work with newer - versions of Visual C++, but beware that the upgrade feature tends - to be problematic. - - If you want to do a 32-bit build on VC++ 2008 or newer, it is - easiest to open the vc2005\* project files and let Visual Studio - upgrade them for you. The alternative, starting with the vc2008 - files, requires that you add a 32-bit build option to all of the - many targets in MySQL++, then optionally delete the 64-bit targets. - This is a lot more work. Plus, it only works if you have the - 64-bit compilers installed, since Visual Studio will refuse to - open project files where all targets must be built with compilers - that aren't installed, even if your goal is to immediately adjust - them to use compilers that *are* installed. - - When converting the VC++ 2008 project files to VC++ 2012, Visual - Studio will change the output directories from Debug to Debug\x64 - (and similar for Release), but it won't also change the link paths - from Debug to Debug\x64, so that the library and examples will - compile but not link. The migration tool detects that there is - a problem, but it can't fix its own mess. You have to manually - fix it. - - There were also problems in VC++ 2010 when you had converted 32-bit - VC++ 2008 projects and then were trying to switch them to 64-bit. - It ended up being simpler in this case to just start over from - scratch and build your own project files. - - -Using Nonstandard MySQL Installations -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - The Visual Studio project files that come with MySQL++ have - everything set up correctly for the common case. The biggest - assumption in the settings is that you're building against the - current stable version of Connector/C, which gets installed here - at the time of this writing: - - C:\Program Files\MySQL\MySQL Connector C 6.1\ - - If you installed a different version, or it's in a different - directory, or you've installed the development files as part of - MySQL Server on the same machine, you need to change the project - files to reference the C API development files in that other - location. There are two ways to do this. - - The hard way is to make 16 different changes each to 44 separate - project files. If you're a talented Visual Studio driver, - you can do this in as little as about 5 or 6 steps. You might - even get it right the first time. If you are not so talented, - you have to make all ~700 changes one at a time, and you almost - certainly will *not* get it right the first time. - - The somewhat easier way is to open all these files in a text - editor that lets you make a global search and replace on all - open files. - - The easy way is to install Bakefile (http://bakefile.org/), - change the value of the MYSQL_WIN_DIR variable near the top of - mysql++.bkl in the top level of the MySQL++ source tree, and run - rebake.bat. This will rebuild all of the project files for you, - using the new MySQL path in all the many places it's needed. - - -Building the Library and Example Programs -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - You must build both the Debug and Release versions of the library, - because a release build of your program won't work with a Debug - version of the MySQL++ DLL. These DLLs get different names, so - you can install them in the same directory if needed: mysqlpp_d.dll - for the Debug version, and mysqlpp.dll for the Release version. - - With the library built, run at least the resetdb and simple1 - examples to ensure that the library is working correctly. - In addition to the other generic examples, there are a few - Visual C++ specific examples that you might want to look at in - examples\vstudio. See README-examples.txt for further details. - - Once you're sure the library is working correctly, you can run - the install.hta file at the project root to install the library - files and headers in a directory of your choosing. - - (Aside: You may not have come across the .hta extension before. - It's for a rarely-used feature of Microsoft's Internet Explorer, - called HTML Applications. Know what Adobe AIR is? Kinda like - that, only without the compilation into a single binary blob which - you must install before you can run it. Just open install.hta - in a text editor to see how it works.) - - -Using MySQL++ in Your Own Projects -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - This is covered in the user manual, chapter 9. - - -Working With Bakefile -~~~~~~~~~~~~~~~~~~~~~ - MySQL++'s top-level Visual Studio project files aren't - maintained directly. Instead, we use a tool called Bakefile - (http://bakefile.org/) to generate them from mysql++.bkl. Since - there are so many project files in MySQL++, it's often simpler to - edit this source file and "re-bake" the project files from it than - to make your changes in Visual Studio. - - To do this, download the native Windows version of Bakefile from the - web site given above. Install it, and then put the installation - directory in your Windows PATH. Then, open up a command window, cd - into the MySQL++ directory, and type "rebake". This will run - rebake.bat, which rebuilds the Visual Studio project files from - mysql++.bkl. - - There's more information about using Bakefile in HACKERS.txt. - - -If You Run Into Problems... -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Especially if you have linking problems, make sure your project - settings match the above. Visual C++ is very picky about things - like run time library settings. When in doubt, try running one - of the example programs. If it works, the problem is likely in - your project settings, not in MySQL++. - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + http://dev.mysql.com/doc/mysql/en/ + + .html + + + () + + + + + + + + + + ../refman/classmysqlpp_1_1 + + .html + + + + + + + + + + + + + + + + + + + ../refman/structmysqlpp_1_1 + + .html + + + + + + + + + + + + + + + + + + + Index: README-examples.txt ================================================================== --- README-examples.txt +++ README-examples.txt @@ -1,186 +1,2719 @@ -Building the Examples -~~~~~~~~~~~~~~~~~~~~~ - If you're installing MySQL++ from the source tarball, the example - programs get built when you build the library. If you change - any example code, just say 'make' to rebuild the examples. - The examples are built against the headers and library in the - lib subdirectory, not against the ones you may have installed - elsewhere on the system. - - If these example files were installed on your system as part of - the -devel RPM, copy all the files to a directory you can write - to, then say 'make' in that directory. This uses a simplified - Makefile, which builds the examples against the headers and - libraries installed in the system directories. - - -Getting Started with the Examples -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - MySQL++ is built as a shared library on most systems, and a DLL - on Windows. Since it isn't built in the same directory as the - examples, this means that your system won't be able to find the - library without help until you install it. Since you generally - want to run the examples _before_ installing the library, to test - that the library actually works, we need a workaround. - - That workaround is the exrun script. There are two versions, - a Bourne shell script called just exrun for POSIX systems, and - exrun.bat for Windows. - - Before running the other examples, you must first create the - sample database. On POSIX systems, you do that like so: - - $ ./exrun resetdb [-s server_addr] [-u user] [-p password] - - On Windows, that would instead be: - - C:\mysql++\> exrun.bat resetdb [-s server] [-u user] [-p pass] - - You don't have to give any of these options. If you don't pass -s, - it assumes the database server is running on the same machine, - and so tries to contact the server over some form of local IPC. - If you don't pass -u, it uses your own user name when logging - into to the database server. If you don't pass -p, it assumes the - database user has an empty password, which hopefully is not true. - - The -s option accepts many different forms of address. The main - one is some sort of TCP/IP address, with an optional port number - or service name. On Unixy systems, you can give a Unix domain - socket name. On Windows, you can give just a period to use named - pipes, if the server supports it. All of these are legal: - - . - localhost - 172.20.0.252:12345 - /var/run/mysqld.sock - my.server.name.com:mysql - - If you give -s but don't give a port number or service name with - it, it assumes the default, port 3306. - - -Running the Other Command Line Examples -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - The following examples use the database set up by resetdb, and - have the same command line format as resetdb: - - simple1: Shows the item names for all records in the sample - stock table. Try this one if you do nothing else. - - simple2: Similar to simple1, but it displays all columns - from the sample stock table, not just the item name. - - simple3: Same as simple2, except that it retrieves the data - with a "use" query instead of a "store" query. See the - user manual for the difference between these methods. - - ssqls1-5: These demonstrate the SSQLS features. Read the - SSQLS sections in the user manual for details about - these examples. - - multiquery: MySQL++ allows you to issue multiple queries at - once, and get the results as separate sets. This shows - that, and also how to use stored procedures, which return - their results in the same way as a multiquery. - - tquery1-3: Shows how to use the template query facility. - - transaction: Shows how to use the Transaction class to create - transaction sets which automatically roll back if not - explicitly committed. - - deadlock: Shows how to handle errors that happen when the - database server detects a deadlock in a transaction set. - Also demonstrates the need for BadQuery::errnum() - - store_if: Demonstrates the Query::store_if() method, which - allows you to store the results of a query in an STL - container conditionally. Think of it as a way to express - rules for selecting records in C++, to be used when SQL's - WHERE clause isn't powerful enough. - - for_each: Demonstrates the Query::for_each() method, which - allows you to execute a query and call a functor on each - returned row. This example uses this to gather statistics - on the sample table's contents. - - cpoolp, cpoolw: Respectively, the POSIX and Windows threads - variants of the ConnectionPool class demonstration. - - load_jpeg: Inserts a JPEG file into the sample database, - for use by the cgi_jpeg example. (See below.) Unlike the - other examples, this one takes anything given on the - command line that isn't a switch to be a JPEG file name. - We've included examples/logo.jpg as a sample, if you want - to use that. - - fieldinf: Shows how to get information about the fields in - a result set. (Types, etc.) - - dbinfo: Dumps a bunch of information about the database - server and some of the data it's managing. - - If you run the load_jpeg example, you should consider also - playing with the other half of the demonstration, cgi_jpeg. - To run it, you'll need to install MySQL++ on a machine with - a web server, then copy the cgi_jpeg program to the server's - CGI directory. For example, on a stock Red Hat type box, - that would be /var/www/cgi-bin. At that point, a request like - http://my.server.com/cgi-bin/cgi_jpeg?id=1 should show the JPEG you - loaded. The ID value to use will be that reported by load_jpeg. - - -Dedicated Windows Examples -~~~~~~~~~~~~~~~~~~~~~~~~~~ - If you're a Visual C++ user, there are two GUI examples, too: - - examples\vstudio\mfc.vcproj: MFC-based replacement for - the simple2 example. - - examples\vstudio\wforms.vcproj: The same thing, only written in - C++/CLI and using Windows Forms. Please follow the - instructions in README-Visual-C++.txt before trying to - build and run this example. The MySQL++ library build - settings must be modified and the library rebuilt first. - - Although these examples show use of MySQL++ in a GUI rather than - command line program, that's not the main point of these examples. - What we're really showing here is how to deal with Unicode. - The MySQL server prefers the UTF-8 encoding for Unicode, which - works naturally with most non-Windows systems. Windows, on the - other hand, uses a different Unicode character encoding, UCS-2. - These examples show how to do the necessary conversions. (See the - Unicode chapter in the user manual for more on this topic.) - - We need two different examples because Unicode conversions and - string handling are so wildly different under .NET than with the - native Win32 API. .NET makes these tasks much easier. - - These examples build and run as-is under Visual C++ 2005. To make - them work with VC++ 2008, you will have to change several paths - in both project's settings to reference the "vc2008" subdirectory - instead of "vc2005": - - o Configuration Properties > Debugging > Working Directory - - o Configuration Properties > Linker > General > - Additional Library Directories - - If you want to backport these examples to VC++ 2003, it's probably - not hard. The main difficulty is that VS 2003 supports Managed - C++, which isn't the same thing as C++/CLI. - - -Special exrun Capabilities -~~~~~~~~~~~~~~~~~~~~~~~~~~ - The Bourne shell version of the exrun script has a few features - not avaiable in the Windows batch file version. These features - let you run the examples under various debugging tools. - - You can get simple gdb debugging if you run an example like this: - - $ ./exrun gdb simple1 foo bar qux - - The script also supports valgrind, in memory leak testing mode: - - $ ./exrun valgrind simple1 foo bar qux +3.0.6, 2008.08.16 (r2350) + + o Several fixes to allow thread-aware build on Solaris + + o More improvements to search for Fink version of C API library. + + o Various improvements to Windows installer (install.hta) + + +3.0.5, 2008.08.06 (r2332) + + o Replaced install.bat with new install.hta, which has a GUI and a + lot of embeded logic for doing The Right Thing, which we couldn't + do in a dumb batch file. + + o Several fixes to allow it to build on Solaris 10. + + o Fixed a bug in comparison of Null to T: wouldn't always give + the right result for one particular combination of argument + values and order of parameters to operator <(). It wouldn't + fail all the time, either; it depended on the way the system's + memory allocator dealt with newly allocated RAM. The bug was + discovered during the Solaris 10 porting effort, but it is not + a Solaris-specific bug. + + o Split Linux-specific material out of README-Unix.txt into + README-Linux.txt, and created README-Solaris.txt. + + o Shipping a vc2008 directory. Populated by bootstrap script with + copies of vc2005 files when those are newer, with the idea being + to update them by hand by running them through VC++2008 before + release. + + o Several fixes to VS-only examples. They hadn't been updated to + track several of the changes in MySQL++ v3, so they wouldn't + build OOTB at all, crashed when you did get them building, and + emitted a lot of warnings during the build. Cleaned it all up. + + o Autoconf now explicitly checks whether we need to link to zlib + to link to MySQL C API library. It used to be required, but + lately, MySQL has been shipping the library with zlib stuff + embedded, causing multiply defined symbol errors on some systems. + + o configure script now looks in more locations for the MySQL C API + library, adding default locations for Fink and Solaris. + + +3.0.4, 2008.07.02 (r2303) + + o Fixed a few bugs in SslOption that prevented it from actually + working. If you've been having SSL problems since upgrading + to MySQL++ v3, this is why! Thanks for these patches go to + Petteri Kiiskinen. + + o Changed type of String's internal "size" typedefs so it'll + build without errors on 64-bit systems where these ints are + different sizes. + + o Many user manual improvements. + + +3.0.3, 2008.05.11 (r2284) + + o Fixed query well-formedness handling in Query::store() and use(). + It was quietly eating these errors, confusing them with the + no-results case. + + o Fixed examples/cpool.cpp to build without thread support. + + o No longer hiding all stdint.h typedefs inside namespace mysqlpp. + + o Fixed mysqlpp::String comparisons of empty strings against + nonempty strings; if the empty string was on the left hand side, + it would succeed because it was only comparing against characters + in the empty side, which matches everything. (Fixes bug 11588.) + + +3.0.2, 2008.04.13 (r2275) + + o Increased float to string conversion precision from 7 to 9 and + double from 16 to 17 digits. Previous values weren't enough + near the maximum values that each can hold. + + o Replaced Query's safe bool mechanism with an override of + basic_ios::operator void*() to avoid a conflict between the + two mechanisms. As the base class version isn't virtual, + this is arguably evil, but it should be harmless in typical use. + Besides, testing Query in bool context usually isn't the right + thing anyway: test the result set instead. + + o Made ConnectionPool::grab() virtual. + + o Overriding ConnectionPool::grab() and release() in + examples/cpool.cpp to show how to do connection-in-use count + limiting. Also, added a few more output indicator states to + allow one to better understand program flow. + + +3.0.1, 2008.03.23 (r2263) + + o String objects can now be compared to mysqlpp::null directly. + + o Added a template operator== and operator!= to String, syntactic + sugar for the existing String::compare() methods. + + o String::compare() now returns 0 ("equal") when one of the + strings is an uninitialized String() (no refcounted buffer) + and the other is empty. It used to consider any initialized + string greater than an uninitted one. An uninitialized String + appears empty, though, so this was incorrect. + + o Made Connection::thread_aware(), thread_start() and thread_end() + static methods, so they can be called before you create your + first connection. Ditto for DBDriver versions of these methods. + + o Calling Connection::thread_start() and thread_end() in + examples/cpool.cpp, as appropriate. Above changes were necessary + to make this work sensibly. + + o Made ConnectionPool::release() virtual, so your pool subclass can + override it. + + o Added ConnectionPool::size(), so a subclass can know the current + number of extant connections. + + o No longer single-quoting NOW() call generated for default + init of DateTime type when building queries from SSQLS objects + in Query::insert(), replace() and update(). The template query + and stream interfaces of Query treated NOW() correctly already. + + o Fixed a bug that left SSQLS::table_override_ uninitted if + you used certain of the generated ctors or set() member + functions instead of others used by the examples. This could + cause a crash any time you caused SSQLS.table() to be called, + such as when passing the SSQLS to Query::insert(). + + o Minor memset bug fixed in test/uds.cpp. Patch by Dave Jones. + + +3.0.0, 2008.02.29 (r2236) The "Giant Leap Forward" release + + THIS IS NOT A DROP-IN REPLACEMENT FOR MySQL++ v2.x! + + You will have to recompile your program against this version + of the library, and you will almost certainly have to make code + changes as well. Please see these sections in the user manual + for information on migrating your code to this new version: + + http://tangentsoft.net/mysql++/doc/html/userman/breakages.html#api-3.0.0 + http://tangentsoft.net/mysql++/doc/html/userman/breakages.html#abi-3.0.0 + + o Added ConnectionPool class, primarily to let multithreaded + programs share a set of Connection objects safely in situations + where it isn't acceptable to have a Connection per thread. + + o Created examples/cpool.cpp to demonstrate this new class. + + o Added RefCountedPointer template, which provides automatic + memory management and data sharing. It's not intended + for use outside of MySQL++ itself, but it's the mechanism + behind everything below where reference counting is mentioned. + I created the initial version of it, but Jonathan Wakely almost + completely rebuilt it, and Joseph Artsimovich provided helpful + commentary and advice as well. + + o Many improvements to Specialized SQL Structures (SSQLS): + + - Renamed custom* to ssqls*. There's still a custom.h which + #includes ssqls.h for you, but it's only intended to ease + the transition to the new name. It will go away in a future + release, probably as soon as v3.1. + + - SSQLSes are finally compatible with Null<>-wrapped types. This + feature is based loosely on the "Waba" patch posted to the + mailing list back in the v2.0 days, but extended to allow + Null types for key fields. (The Waba patch only allowed + these types in non-key fields.) + + - It's no longer necessary to define a different SSQLS for each + different field set you use in queries. That is to say, + you can define an SSQLS for an entire table and store just a + subset of the table in it now, with the other fields keeping + default values. Removed examples/custom6.cpp, as custom1.cpp + can now demonstrate the same thing, implicitly. + + - An SSQLS's field order no longer has to match the order of + fields in the result set it is populated from. + + - As a result of previous, removed sql_create_c_order_* macros; + they have no purpose now. + + - Removed order parameters from sql_create_complete_*, which now + gives it the same functionality as sql_create_c_names_* so + removed the latter, too. + + - Removed "basic" variants of SSQLS creation macros. They've + been unofficially deprecated by dint of being all but + undocumented and unexemplified for a very long time now. + + - It's now possible to use mysqlpp::String, Date, DateTime, and + Time types in the key field positions in an SSQLS as they + now support the necessary comparison interfaces. + + - If you use a floating-point data type in one of the key field + positions, it no longer uses exact comparison logic. Instead, + it now does [in]equality comparisons by testing whether the + difference between two floating-point values is less than a + configurable threshold defaulting to 0.00001. + + - You can now use 'bool' type in an SSQLS. + + - Renamed _table static member variable in each SSQLS to table_ + and made it private. There are now public setter and getter + methods, table(). + + - Added per-instance table name overriding via instance_table() + setter. table() getter returns static version if this is not + set, so it's still a global setting by default. + + o You can now use mysqlpp::null as a template query parameter to + get a SQL null. + + o Replaced template ColData_Tmpl: + + - Used to have typedef ColData_Tmpl MutableColData. + It was used only once within MySQL++ itself, and was never + documented as a class for end users. This one use within + the library was a crock, so we just replaced this use with + std::string and removed the typedef. + + - This left just one use of ColData_Tmpl, instantiating it + with the MySQL++ utility class const_string, basically a + clone of std::string with all the mutating features removed. + Folded the functionality of const_string into the template, + renamed the result to String, and deleted the const_string + class. It'd be a complete std::string replacement -- with + SQL-related enhancements -- if it were modifiable, but MySQL++ + doesn't need it to be modifiable. Yet, it's still the closest + thing MySQL++ has to its own string type; thus the name. + + - Replaced its internal buffer management with a much more + clever reference counted scheme. This shows its greatest + advantage in the return from Row::operator[](), which for + technical reasons must return by value, not by reference + as is more common. This lets you pass around Strings by + value while having the efficiency of reference semantics. + This can be important with large return values, like BLOBs. + + - Converting String to numeric types (ints, floats...) uses a + new, cleaner system by Jonathan Wakely. Unless you were + abusing weaknesses in the old system, you won't see a + difference. It's just more robust and flexible. + + o Redesigned SQLString: + + - It used to derive from std::string, and while MySQL++'s + internals did use it in place of std::string, these places + didn't take advantage of the additional features offered + by SQLString. So, replaced all those uses with std::string. + + - All the remaining uses are MySQL++ public interfaces that + need to be able to accept any of many different data types, + and we want that data to be automatically converted to a + SQL-compatible string form. Because it no longer has the + parentage to be a general-purpose string type and MySQL++ has + a new contender for that role (String), renamed SQLString to + SQLTypeAdapter to reflect its new, limited purpose. ("STA" + for short.) + + - Since we don't have the std::string base class to manage the + string buffer any more, using the same reference counted + buffer mechanism as String. In addition to saving code by + not creating yet another buffer management mechanism, it means + objects of the two classes can share a buffer when you assign + one to the other or pass one to the other's copy ctor. + + - Added many more conversion ctors. + + - STA interfaces using the 'char' data type now treat them as + single-character strings instead of one-byte integers, as + does the Standard C++ Library. + + - Added mysqlpp::tiny_int interfaces to STA to replace the + former char interfaces for those needing one-byte integers. + + o As a result of the ColData -> String redesign, removed + Row::raw_*(). Before String copies were efficient, this + was helpful in accessing BLOB data efficiently. It was also + required back when ColData didn't deal correctly with embedded + null characters, but that reason is gone now, too. + + o Row::operator[](const char*) no longer unconditionally throws the + BadFieldName exception when you ask for a field that doesn't + exist. It will still throw it if exceptions are enabled, but if + not, it'll just return an empty String. This was necessary to + make the SSQLS subset and field order independence features work. + + o Similarly, Result::field_num() returns -1 when exceptions are + disabled and you ask for a field that doesn't exist. + + o You can now use the OptionalExceptions mechanism to disable + exceptions on const MySQL++ objects. + + o Redesigned query result classes: + + - Instead of Result deriving from ResUse, the two derive from + a common base class -- ResultBase -- containing the bits that + are truly the same between them. Before, Result inherited + several methods that didn't really make sense for "store" + query result sets. + + - Renamed Result to StoreQueryResult and ResUse to UseQueryResult + so it's clearer what each is for. + + - Renamed ResNSel to SimpleResult. + + - Made all SimpleResult data members private and hid them behind + const accessor functions of the same name. + + - The result set classes all used to be friends of Connection + for various lame reasons. Since they are created by Query, + and Query has a good reason for a strong relationship with + Connection, moved Connection access out of each result set + class into the code in Query that creates that type of result + set object. + + - StoreQueryResult now derives from vector in addition to + ResultBase; it used to merely emulate a vector of Rows, poorly. + It can now dispose of the MYSQL_RESULT at the end of object + construction, because it creates all the Row objects up front + instead of on the fly. And as a result of *that*, operator[] + returns by reference instead of by value, operator -> works + correctly on iterators, all STL algorithms work, etc., etc. + + - IMPORTANT COMPATIBILITY BREAK: because we used fetch_row() + stuff in Result previously, it was okay to index past the + end of the result set: you'd just get a falsy Row when you + did this, just as happens when doing the same thing in a + "use" query. The simple1 and simple2 examples did this, + so it's likely that code exists that takes advantage of this + misfeature. New versions of these examples show how to index + through a StoreQueryResult without running past its end. + + - ResUse used to delay creation of its FieldNames and FieldTypes + objects until the point of need. This had several implications + for thread and exception safety that we fix by just creating + them in the ctor. If your code is multi-threaded and was + avoiding certain usage patterns due to crashes, it's worth + trying your preferred way again. + + - Result sets create a few data structures to hold information + common to all rows in that set. The row objects need access + to these shared data structures, so on creation each gets + a pointer back to the result set object that creates it. + This was efficient, but required that a result set object + outlive any row objects it creates. Now these shared data + structures are reference-counted, decoupling the lifetime of + the child row objects from their result set parent. + + - Copy operations for result sets used to actually be "moves" + before, for efficiency. (MySQL++ itelf only copied result + sets in returning them by value from the query execution + methods of Query, so this was acceptable if you didn't do + anything uncommon with these objects.) Reference counted + data structures allow us to have copy semantics now without + sacrificing efficiency. + + - You can now use Query::storein() with an STL container of Row + objects now, instead of having to use SSQLSes. The lifetime + issue guaranteed a crash if you tried this before. + + - Removed a bunch of unnecessary alias methods: + + - columns() -> num_fields() + - names() -> field_names() + - rows() -> num_rows() + - types() -> field_types() + + - Renamed several methods for grammar reasons: + + - fields(unsigned int) -> field(unsigned int) + - names(const std::string&) -> field_num(const std::string&) + - names(int) -> field_name(int) + - types(int) -> field_type(int) + + - Removed several "smelly" methods: + + - purge() + - raw_result() + - reset_names() + - reset_field_names() + - reset_types() + - reset_field_types() + + o Field class used to just be a typedef for the corresponding C + API class. Now it's a real C++ class providing a more MySQL++ + sort of interface, plus good OO things like information hiding + and implementation detail abstraction. This changes several + things about the interface. + + o Fields class was basically a specialized std::vector work-alike + for dealing with the C API to get access to MYSQL_FIELD objects + and present them as contained Field objects. New Field type + let us replace it with "typedef std::vector Fields" + + o Major improvements to the quoting and escaping mechanisms: + + - Replaced almost all of the type-specific interfaces in manip.h + with a single version taking STA. The compiler can convert + almost anything to STA without losing any information we need + for correct quoting and escaping. This has the side benefit + that we can now do correct quoting and escaping for more data + types now, including plain C and C++ string types. + + - Fixed a bug in quote_double_only manipulator for String: was + using single quotes by mistake. + + - Escaping and quoting only works in instances where MySQL++ + can tell you're building a SQL query and are using a data type + that requires it. This affects many things, but the one most + likely to cause trouble is that inserting MySQL++'s quoting + and escaping manipulators in non-Query ostreams is now a no-op. + + - Added escape_string() member functions to Query and + SQLQueryParms::escape_string(), and removed the global function + of the same name. Because these are tied indirectly to a + Connection object, this also has the effect that escaping is + now aware of the current default character set used by the + database server. There's only one case where this isn't done + now, and that's when we're disconnected from the server. + + - Previous two items form a trade-off: if your code was depending + on MySQL++ to get SQL escaping and it no longer happens for + what we consider a good reason, you can build a replacement + mechanism using these new functions. Quoting needs no special + support in MySQL++. + + - Removed 'r' and 'R' template query parameter modifiers, + which meant "always quote" and "always quote and escape" + regardless of the data type of the parameter. There are no + corresponding manipulators (for good reason), so the removal + restores symmetry. + + o Created DBDriver class from code previously in Connection and + Query to almost completely wrap the low-level MySQL C API: + + - Connection creates a DBDriver object upon connection and + passes a pointer to it down to Query objects it creates. + In turn, they pass the pointer on to any of their children + that need access to the C API. + + - Nothing outside DBDriver calls the C API directly now, though + DBDriver leaks C API data structures quite a lot, so this + feature doesn't constitute "database independence." See the + Wishlist for what must be done to get to that point. + + o Completely redesigned the connection option setting mechanism: + + - There's now just a single Connection::set_option() method that + takes a pointer to the abstract Option base class, and there is + an Option subclass for every connection option we understand. + Thus, type errors are now caught at compile time instead of + at run time. + + - Replaced Connection::enable_ssl() with SslOption class. + + - Enabling data compression and setting the connection timeout + are no longer set via parameters to Connection interfaces. + These are now set with CompressOption and ConnectTimeoutOption. + + - Similarly, removed client_flag parameters from Connection's + ctor and connect() method and added corresponding Option + subclasses. There's about a dozen, so rather than list them + here, look for similarly-named classes in lib/options.h. + + o Added Connection::count_rows() to execute "SELECT COUNT(*) FROM + tablename" queries for you. + + o Moved Connection::affected_rows(), info() and insert_id() methods + to class Query, as they relate to the most recently-executed + query, not to the connection. + + o Several method name changes in Connection: + + - client_info() -> client_version() + - host_info() -> ipc_info() + - proto_info() -> protocol_version() + - server_info() -> server_version() + - stat() -> status() + + o Removed Connection::api_version(). It does the same thing as + client_version(). + + o Lots of changes to Date, DateTime, and Time classes: + + - If you use the default constructor for DateTime and don't + subsequently set its year, month, day, hour, minute or second + data members to nonzero values, it becomes the SQL function + "NOW()" in a query string. You can also use DateTime::now() + as syntactic sugar for this. + + - As a result of above, had to hide all of DateTime's data + members behind accessor functions, to keep the state of the + object consistent. (If it's initialized as "now" and you + give it an explicit year value, say, it is no longer "now", + so the setter has to clear the now-flag.) There are getters + and setters for year, month, day, hour, minute and second, + all named after the member. + + - Did the same for Date and Time for consistency, even though it + isn't technically required. + + - The sql_timestamp typedef now aliases DateTime instead of Time. + + - Renamed template class DTbase to Comparable. The fact + that it's the common base class of all date and time classes + is irrelevant; making subclasses comparable is what it does, + so that's what it should be named after. + + - Added a DateTime ctor taking discrete year, month, day, hour, + minute, and second values. + + - Implicit conversion from stringish types to the date and time + types is no longer allowed. This is part of the "Waba" + Null patch mentioned above; allowing implicit conversions + would break this new feature. + + - Added operator std::string and str() methods to all of these + classes. Adding this to the existing operator << support, you + now have several ways to convert these objects to string form. + + - Added time_t conversion to Date and Time classes. DateTime + already had it, since it's more legitimate to convert time_t + to DateTime, but you could already "slice" it with something + like Time(DateTime(time(0))) so there's no point pretending + you can't get from time_t to Date or Time. Might as well + legitimize it. + + o Improved tiny_int class: + + - Turned it into a template parameterized on the value type so + you can get both signed and unsigned TINYINTs + + - Changed the sql_tinyint and sql_tinyint_unsigned typedefs to + use mysqlpp::tiny_int instead of raw chars + + - Added a bool conversion ctor and operator, and typedef'd it + to sql_bool and sql_boolean to match MySQL server behavior + + o Added many more sql_* typedefs. We now have a typedef for every + type the MySQL server knows about, including those it supports + just for compatibility with other database servers. + + o Changed the sql_*int* typedefs to use integer types of the same + size as the MySQL server. (Run test/inttypes.cpp to test it.) + + o Added copy ctor and assignment operator to Row. + + o Row::operator[]() takes int now instead of unsigned int. + This finally (!) makes it possible to say row[0] without the + compiler giving an ambiguous overload error. + + o Changed all uses of row.at(0) in the examples to row[0] + + o Added operator[] to all classes that only had at(). + + o Query now automatically resets itself unless the query fails + or you're using template queries. In either case, the contents + of the query's internal buffers are considered precious, + either for debugging, or future queries. Except when using + template queries, this means you may be able to avoid calling + Query::reset() entirely. It's still safe to call reset() + as before, just unnecessary most of the time. + + o Removed reset_query parameter from all Query methods. It was + almost completely broken before, and above change does what + was really wanted to begin with. + + o Query::store_next() and Result::fetch_row() no longer throw + the EndOfResults and EndOfResultSets exceptions; these are not + exceptional conditions! These methods simply return false now. + + o Removed examples/usequery.cpp: there's no essential difference + between what it did and what examples/simple3.cpp does now as + a result of the previous change. + + o Added Query::exec(void), paralleling Query::execute(void). + + o Removed Query::preview(). The most direct replacement is str(), + which has always done the same thing. + + o You can now insert a Query object into an ostream to get a copy + of the built query. This means Query::str() is only necessary + when using template queries. + + o Removed overloads of Query::execute(), store(), and use() + that take const char*. It was redundant because const char* + converts implicitly to STA, for which overloads already exist. + + o Renamed Query::def to Query::template_defaults to make its + purpose clearer. + + o Query::error() now returns const char*, not a std::string by + value. There's no point in making a copy of the error string. + The method is now const as well, as it doesn't change the + Query object. + + o Added Query::errnum(), which just wraps Connection::errnum(). + + o Added error number parameters and accessor functions to BadQuery, + ConnectionFailed and DBSelectionFailed exceptions, to preserve + the state of Connection::errnum() at the point of the exception, + so you don't have to rely on this value remaining unchanged + during the exception throw process. All places that use these + exceptions now include this value where possible. Thanks for the + initial patch go to Jim Wallace. + + o Removed Lockable mechanism from Connection and Query; it was + conceptually flawed. See the new user manual chapter on + threading for advice on using MySQL++ safely without locking. + There is mutex locking now in ConnectionPool, but that's it. + + o Connection::query() now takes an optional query string, allowing + the returned Query object to start off with a value. Especially + useful when the query string is static, either because it's + a simple query or because it's a template. You can now build + chains like "if (conn.query("CREATE INDEX ...").exec()) { ..." + + o Added Connection::thread_aware(), thread_end(), thread_id() + and thread_safe(). See user manual's threading chapter for + explanations. + + o Renamed "success" data members in Connection, Query and + SimpleResult (neé ResNSel) to "copacetic_", making them private + if they weren't before. This better reflects their actual + use, which isn't to say that there has necessarily been actual + success, but rather that everything's okay with the object. + + o Removed success() member functions from above classes. All can + be tested in bool context to get the same information. + + o Replaced all operator bool()s in MySQL++ classes with safer + alternatives. See http://www.artima.com/cppsource/safebool.html + Thanks to Jonathan Wakely for much helpful commentary, advice, + and code used in these mechanisms. + + o Decoupled Connection::copacetic_ from Connection::is_connected_. + It is now possible for the object to be copacetic without being + connected. However, if it tries to connect and fails, then + it is not copacetic. If it is copacetic and not connected, it + means we haven't even tried to connect yet, a useful distinction. + + o Collapsed Connection's host, port, and socket_name down into + a new combined 'server' parameter which is parsed to determine + what kind of connection you mean. These interfaces are still + compatible with v2.3 and earlier up through the port parameter. + There are differences beyond this. + + o Added TCPConnection, UnixDomainSocketConnection and + WindowsNamedPipeConnection subclasses for Connection giving + simpler construction and connect() method interfaces for + instances where you know what kind of connection you want at + compile time. + + o Changed Connection::ping() return value from int to bool. + + o Renamed NullisNull to NullIsNull -- capital I -- and similar for + NullisZero and NullisBlank. + + o It's now a compile-time error to try to convert a MySQL++ + representation of a SQL null to any other data type, rather + than a run-time error as in previous versions. Removed + BadNullConversion exception as a result. + + o Way back in v1.7.x we used the BadQuery exception for all kinds + of exceptional conditions, not just bad queries. Replaced + most of these in v2.0.0 with new dedicated exceptions, but a + few remained: + + - Errors that occur during the processing of a "use" query after + the query itself executes correctly now throw UseQueryError. + It's not a "bad query", because the query executed + successfully. It just choked during subsequent processing, + so it's a different exception. Thanks for this patch go to + Jim Wallace. + + - Replaced BadQuery exceptions thrown in Row constructor due + to bad ctor parameters with new ObjectNotInitialized exception + This is also Jim Wallace's work. + + o The examples now all use getopt() type command line options + instead of positional options. This makes it possible to + pass options in any order, leave at their default options that + used to be in the middle of the sequence, and offer different + subsets of options for different programs. Also allows for + special internal-use options, like -D passed by dtest to let + examples change their behavior when run under dtest to produce + only predictable output. + + o Split old libutil functionality into two modules, one holding + all the "print data" functions, and another holding all the + command line parsing stuff. This makes it easier for newbies + to ignore the command line stuff, treating it like a black box. + The wish to understand the "print data" routines is much more + common, so the two needed to be disentangled. + + o Renamed examples' libutil to libexcommon. + + o Removed connect_to_db() libutil function. It combined command + line parsing, which users don't care about, with database + connection establishment, which they do care about. Now the + examples just call out to libexcommon to parse the command + line, and use the values they get back to explicitly make the + connection, so it isn't hidden. + + o Removed cchar and uint typedefs. + + o Redesigned dbinfo example's output to be easier to read. + + o Fixed an output formatting bug created in 2.3.0 that caused the + tabular output from examples to not line up. + + o Renamed examples/tquery.cpp to tquery1.cpp. Created tquery2.cpp + to demonstrate passing parameters via a SQLQueryParametrs object + instead of discretely. Created tquery3.cpp for testing unquoted + template parameters, such as integers. + + o Renamed fieldinf1.cpp example to fieldinf.cpp, and simplified + its output so it can be part of the dtest sequence. + + o Renamed examples/xaction.cpp to transaction.cpp. It created too + much cognotive dissonance whenever thinking about both it and + lib/transaction.cpp. + + o Added examples/deadlock.cpp, to test handling of exceptions due + to server-side transaction deadlock detection. Also added + code to resetdb to create a table needed to test this. + Initial version created by Jim Wallace to test the value of + all his BadQuery exception work, with reworking by me. + + o Greatly expanded dtest suite. Primary change is that we now + have a handful of unit tests, where in v2.3.2 we only tested + a subset of the examples. Still very low coverage ratio, + but it's a big improvement. + + o Optimized #includes, especially in lib/*.h to reduce + dependencies and thus compile time when one of these changes. + + o Fixed a typo in RPM filename generation that prevented -devel + RPM from recognizing that the corresponding MySQL++ library + RPM was installed. + + o RPM spec file improvements by Remi Collet. + + o Renamed NO_LONG_LONGS to MYSQLPP_NO_LONG_LONGS to avoid a risk + of collision in the global macro namespace. + + o First cut at Xcode2 project support. Testing needed! + + o Debug build of library on VC++ and Xcode have a _d suffix now + so you can have both versions of the library installed without + conflict. + + o Moved the VC++ 2003 project files into a new vs2003 subdirectory + because there are so many of them. Also created vs2005 + subdirectory for VC++ 2005 and 2008 compatible project files. + 2005 makes an even bigger mess of the directory containing + the .sln file, so the incentive is bigger. Plus, we have to + disable several things to get VC++ 2003 to build MySQL++ now, + so we need a special 2005+ version of the project files for a + complete build, if the user has one of the newer compilers. + + o ...plus dozens of small bug fixes and internal enhancements, + many documentation improvements, and expansion of support for + newer operating systems and compilers. + + +2.3.2, 2007.07.11 (r1669) + + o Previous release's const_string change caused more problems + than it fixed. This release contains the real fix. :) + + o New Connection::set_option() handling deals with the multi + statements option correctly again. examples/multiquery now + runs again as a result. + + o Added new unit testing script, called dtest. See the + HACKERS file for details. (This tool caught the previous + two problems!) + + o Squished a GCC pedantic warning. Thanks for the patch go to + Andrew Sayers. + + +2.3.1, 2007.07.10 (r1659) The "After the Fireworks" release + + o const_string objects now keep a copy of their data, not + just a pointer to it. This is less efficient, but necessary + to allow SSQLS to work with BLOBs. Without this, we were + seeing segfaults due to accessing freed memory pointed to + by the const_string, because the underlying object went + out of scope. + + o Fixed many more potential embedded null handling problems + in manip.h. + + o MySQL++ can now optionally reference MySQL C API headers as + being in a mysql subdirectory, a common thing on *ix systems, + by defining MYSQLPP_MYSQL_HEADERS_BURIED before #including + mysql++.h. + + o Restored ColData_Tmpl::get_string(), removed in v2.3.0, + along with warnings in the docs saying why you don't want + to use it, and what your alternatives are. + + o VC++ and MinGW builds now define the HAVE_MYSQL_SSL_SET + macro, which lets you use the C API's SSL features. + This assumes your C API library does actually have these + features enabled, which is the case with the official binary + releases on Windows. (Builds on *ix systems continue to + test for these features at configure time.) + + o Fixed simple examples-only Makefile generation, for RPMs. + + +2.3.0, 2007.07.02 (r1645) + + o Added Query::for_each() and Query::store_if() methods + proposed by Joel Fielder, and added examples for each. + + o It's now possible to store BLOB data in an SSQLS. It's not + foolproof, so added a section to the user manual (5.9) to + document the method. Also, changed examples/cgi_jpeg to use + this new mechanism, instead of the ugly "raw row data" method + it used to use. + + o Revamped Connection::set_option() handling. These options + used to be queued up, and applied only just before actually + establishing the connection. This made error reporting less + helpful because the diagnostic was separated from the cause. + Plus, the error messages were misleading to begin with. Now, + set_option() takes effect immediately if the connection is not + yet up (excepting one special option that can actually be set + after the connection is up) and issues better diagnostics when + it detects errors. + + o Connection::connect() used to set a few options in such a + way that the user couldn't override them. Now it's smart enough + to set them with the desired default values only when we see + that the user hasn't given them other values. + + o SQLString can now be initialized from a mysqlpp::null, + giving a "NULL" string. This is useful for template queries. + Patch by Michael Hanselmann. + + o resetdb error message about mixing library and header version + numbers is now more explicit. + + o Changed BadConversion exception's "what" message text to be + more like the other exceptions. The inconsistency lead one + to incorrectly copy-paste code from another exception handler, + expecting it to behave the same way. Now it does. + + o Added Row::raw_size(), as a shortcut for Row::at().size(). + + o ssqls-pretty now detects when it's being run from within + the MySQL++ distribution tree and gives a different -I flag + to the compiler, so that it picks up the distribution headers + instead of those that may be on the system already. + + o The quote manipulator now works for char[] correctly. + Thanks for this patch go to Andrew Sayers. (It's always + worked for char*, but C++ doesn't consider that to be the + same type, so it used the generic quote handling path, + which doesn't do anything for char[].) + + o Fixed a build bug on older Solaris versions where the + test for the C API library was erroneously failing, stopping + the configuration process. + + o Simplified mysql_shutdown() level argument detection. + Already had to do a version number ifdef check for the + Windows case, so there's really no point to doing it with + autoconf on Unixy platforms. Moved version number check + into lib/connection.cpp, and nuked the separate autoconf and + Windows tests. + + o Removed dependency of sql_types.h on myset.h and (indirectly) + datetime.h. Now we only define sql_* typedef aliases for those + MySQL++ types if the headers are included before sql_types.h. + + o Fixed a typo in one of the storein_sequence() template + overloads, which is apparently rarely (or never?) used, because + no one reported the compiler error you'd get if you tried. + + o Fixed a few more embedded null handling problems. + + o ColData used to keep two copies of all data it held. + Now it keeps just one. + + o Fixed install.bat script to track the unified Bakefile change + and the lack of separate debug and release builds under MinGW. + + o Yet another STLport + Query memory leak fix. + + o Squished a warning in newer GCCs having to do with identifier + shadowing. Patch by Jonathan Wakely. + + o Fixed a null-termination bug in Query::parse(). If you + somehow constructed a query string without a terminating null + character, then tried to parse it as a template query, it could + walk off the end of the string. Patch by Worster Chen. + + o Removed MYSQLPP_EXPORT tag from FieldNames and FieldTypes + class declarations, as this can cause problems in programs + that use vector in VC++. It has to do with multiply + defined templates, since these classes derive from that + template, and VC++ can't resolve the conflict without help. + Since these classes aren't actually used outside the library, + this shouldn't cause a problem. Patch by Nils Woetzel. + + o Partial fix to Doxygen PDF build on RHEL4 and 5. Needs + hand-coaxing to complete successfully on RHEL4, and doesn't + yet work at all on RHEL5. + + o Shortened the "no*" options to the bootstrap script, so that + the usage message fits on a single line. + + o Added "nodoc" bootstrap script option, for disabling the + documentation build during the dist target build. Allows for + building binary RPMs on CentOS 5.0, where doc building is + currently broken. + + o Removed the updel example program. It was kind of silly, + and if you were to rewrite it today, you'd use for_each() anyway. + + o Lots of documentation improvements. + + +2.2.3, 2007.04.17 (r1538) The "Tax Day" release + + o Previous version left examples/vstudio/* out of the tarball + by accident. + + o Improved generation of RPM temporary build directory path + name generation. Was using a hacked variant of the Fedora + Packaging Guidelines' second best choice. Now we're using + the choice they recommend most highly, without changes. + + o Removed unnecessary resources from vstudio/wforms example. + + o Minor URL fix in refman + + +2.2.2, 2007.04.13 (r1526) The "Nervousmaking Friday the 13th" release + + o More small fixes to embedded null handling in Query. + + o Fixed a bug in single-parameter template query handling. + + o Added tquery example, to demonstrate proper use of template + queries. Previously, resetdb was the only exemplar, and + it wasn't really suited for that. This example also tests + the previous item. + + o Added examples/vstudio/mfc, allowing us to improve the way + we demonstrate Unicode handling. Old way wasn't realistic. + On *ix, people will depend on the terminal code to handle + UTF-8. On Windows, users are almost certain to be writing + a GUI program, which requires different Unicode handling + than the old examples showed. + + o Removed explicit Unicode conversion stuff from command line + examples, and reworked the Unicode chapter in the user + manual. + + o Added examples/vstudio/wforms to show integration with + C++/CLI and Windows Forms. Documented this in README.vc. + + o Rewrote load_file and cgi_image examples to be more + useful, renaming them to load_jpeg and cgi_jpeg along + the way. Also, resetdb now creates a second table in the + sample database for these two examples' use. Also, added + examples/logo.jpg to the distribution as sample data for + these examples. + + o Limited the ostream base class casting stuff in Query to + VC++ 2003, which is the only platform that really needed it. + VC++ 2005 emits a warning with that hack in place, and on + other platforms it's just replicating work that the compiler + does already. + + o Added library version information to main library target + so that systems that version shared libraries work as + expected. Thanks for this patch go to Jack Eidsness. + + o Merged much of the diffs between Remi Collet's RPM spec file + into the official one. + + o Reorganized the doc subdir a bit. Generated HTML is now all + under doc/html instead of scattered under other subdirs, + and renamed doc/README.mysql++ to doc/README.manuals. + + o Improvements to top-level manual building make targets: + manuals now only rebuild at need, it's easier to request + a rebuild of all manuals, and we force a rebuild attempt + before building the distribution tarball so we don't ship + outdated manuals. + + o Added ability to run examples under gdb using exrun, + using same mechanism as we currently have for valgrind. + Thanks for this patch go to Michael Hanselmann. + + o Added "Important Underlying C API Limitations" chapter to the + user manual, to cover problems we keep seeing on the + mailing list that are the result of ignorance of the way + libmysqlclient behaves, not bugs MySQL++ is really in a + position to fix. + + +2.2.1, 2007.02.28 (r1433) + + o Fixed the new localtime() alternative selection code + for VS2003 and various uses of STLport. + + o No longer inserting a null character into the query stream + on calling one of the preview() functions. This was harmless + in v2.1, which used C strings more extensively, but began + causing problems in v2.2 due to its wider use of C++ strings. + + o Fixed a bug in the Connection copy ctor where it didn't + completely initialize the object. + + o Optimized Query::preview_char() a bit. Patch by Jonathan + Wakely. + + o Reordered directory list used by autconf when locating the + MySQL C API library. The list is now ordered with the + most likely locations for the library first, so we're less + distracted by incorrect libraries. This fixes a specific + build error under RHEL4 with recent versions of MySQL 5.0. + + +2.2.0, 2007.01.23 (r1417) + + o ColData, const_string, and SQLString can now be constructed + with an explicit length parameter. Furthermore, Query + class's execute(), store() and use() call chains terminate + in a version taking an explicit length parameter, instead + of one taking a simple C string. Together, this means + that it's now easier to handle data from the SQL server + containing nulls. The library is almost certainly not yet + capable of handling embedded nulls in all cases, but this + is a big first step towards that. + + o Can now construct a DateTime object from a time_t, and + convert a DateTime back to a time_t. Patch by Korolyov Ilya. + + o Changed the way we're handling exported functions in the + Windows DLL case so that it works more reliably under MinGW. + + o Added proper copy semantics to Connection, so that you get a + new connection with the same parameters, not just a bitwise + copy of the object. + + o Using an explicitly thread-safe variant of localtime() for + time conversions where one is available. + + o Removed ListInsert template from myset.h. This wasn't used + within the library, and was never documented, so I'm betting + that no one actually uses it. + + o Result::copy() was not copying the exception flag in + all cases. Fix by Steven Van Ingelgem. + + o Added exrun shell script and exrun.bat files to distribution, + to avoid linkage errors when running the examples while + you still have an older version of MySQL++ installed. + + o Renamed MYSQLPP_LIB_VERSION to MYSQLPP_HEADER_VERSION, as + what it really encodes is the version number in the mysql++.h + file you're using, not the actual library version number. + + o Added mysqlpp::get_library_version(), which returns the + library version number at build time. Between this and + the header version constant, you can check that you're not + mixing MySQL++ header and library versions. + + o resetdb example uses these new version number affordances to + double-check that you're not mixing libraries and headers + from different versions. This happens easily unless you + take care of it (such as by using exrun) when you have one + version of MySQL++ installed and you're trying to build and + test a new version without blowing away the old one first + or overwriting it. + + o No longer using recursive Makefiles on Unixy platforms + or split lib + examples project files on VC++. Everything is + handled by a single top-level Makefile or project file, which + is simpler for the end user, and makes better dependency + management possible. + + o When looking for the MySQL C library on systems using + autoconf, looking in .../lib64 wherever we are also looking + in .../lib. + + o RPM build process no longer depends on Bakefile. It means + you have to build the examples when building an RPM even + though they're never used within the RPM, but it's a better + tradeoff in my opinion. + + o Updated include and library paths on Windows to reflect + changes in the most recent MySQL installers. + + o Merged lib/defs.h and lib/platform.h into new file, + lib/common.h. Just cleans up the library internals. + + o Fixed build errors on Windows due to recent changes in MySQL. + + o Fixed a few memory leaks and double-deletes in Query class. + + o Fixed compatibility with STLPort's string implementation. + Patch by dengxy at cse.buaa.edu.cn. + + o Fixed a compatibility problem between Set<> template and + SSQLS. Patch by Korolyov Ilya. + + o Fixed build bug in SQLQueryParms due to a character + signedness issue on PowerPC with GCC. Patch by Michael + Hanselmann. + + o ~Transaction() can no longer throw exceptions. It'll just + quietly eat them, to avoid program termination. Fix + suggested by Alex Burton. + + o Fixed thread safety testing in autoconf case, accidentally + broken during v2.1.0 development cycle. + + o Using Doxygen 1.5.1 to generate documentation. + + +2.1.1, 2006.04.04 (r1289) + + o MinGW and Cygwin will now build and link to mysqlpp DLLs. + + o Fixed bug in Query, causing it to initialize the "throw + exceptions" flag incorrectly. Thanks for this patch go to + Joel Fielder. + + o Added -v flag for custom.pl script, which turns off the + multiply-defined static variable fix. Needed for VS 2003, + which doesn't support variadic macros. Also, added + a diagnostic to detect the need for the -v flag, and + suppressed the test for this feature in examples/util.cpp. + + +2.1.0, 2006.03.24 (r1269) + + o Converted automake and makemake files to their equivalents in + Bakefile format. + + o Added the Transaction class, which makes it easy to use + transaction sets in MySQL++. + + o Added xaction example to test new Transaction class. + + o Resetdb example now creates its example table using the + InnoDB storage engine, in order to test the new transaction + support. Resetdb also declares the table as using UTF-8 + text; this doesn't change anything, but it does correctly + document what we're doing. + + o Added sql_types.h header, containing C++ typedefs + corresponding to each MySQL column type. Using those new + types in the type_info module, and in the SSQLS examples. + + o Replaced the way we were handling the template query + version of Query member functions, to allow an arbitrary + number of template query parameters. By default, we + now support 25 parameters, up from the old limit of 12. + It's now possible to change just one number, run a script, + and have a new limit. + + o Connection class does a better job of returning error + messages if you call certain member functions that depend + on a connection to the server before the connection is + established. + + o Updated libmysqlclient.def for newer versions of MySQL. (Fixes + build errors having to do with mysql_more_results() and + mysql_next_result(). + + o Replaced final use of strcpy() with strncpy(). + + o custom.pl now runs without complaint in strict mode, with + warnings turned on. Thanks for this patch go to "Waba". + + o Fixed a bug in custom.pl where incorrect code would be + generated for some SSQLS set() methods. Thanks for this + patch go to "Waba". + + o SSQLS structures now support long and unsigned long fields. + Thanks for this patch go to "Waba". + + o It's now possible to put SSQLS definitions in a header + file used by multiple modules in a program without + getting multiple static member definition errors. See the + documentation for details. Thanks for this patch go to + Viktor Stark. + + o Moved the definition of the 'stock' SSQLS out of the + custom*.cpp example files and into a new stock.h file. + Also, #including that file in the util module to test out + the new SSQLS multiple static definition fix. + + o Using all of the digits of precision guaranteed by the + IEEE 754 spec when stringizing floating point numbers + to build queries. Previously, we would use the platform + default, which can be as few as 6 digits. + + o Removed lib/compare.h. Not used within the library, never + documented, and nobody seems to want to defend it. + + +2.0.7, 2005.11.23 (r1147) + + o Added explicit mysqlpp namespace qualifiers to generated code in + custom*.h so you can use SSQLS in places where it doesn't make + sense to say "using namespace mysqlpp" before the declaration. + Also updated some of the examples to not have this "using" + declaration to make it clear to users that it isn't needed, if you + want to use explicit namespace qualifiers as well. Thanks for + this patch to Chris Frey. + + o Removed an apparently useless unlock() call from ResUse; there is + no nearby lock() call, so if this unlock() is in fact necessary, + it shouldn't be here anyway, because the two calls should be + nearby each other. Thanks for this patch to Chris Frey. + + o Fixed Query ostream initialization bug affecting SunPro CC (at + least). While this bug violates the Standard, it doesn't affect + many real compilers because they don't enforce this rule. Fixed + by Chris Frey. + + o Previously, we only used the C99 style "long long" support when + building under GNU CC. This is now the default. This should + allow the code to work under SunPro CC. + + o Added another dynamic cast needed for proper Query ostream + subclass overloading under VC++. (7.1 at least...) + + o Detecting whether MySQL is built with SSL support on platforms + using autotools. Needed on some old Sun systems, for instance. + Thanks for this patch to Ovidiu Bivolaru. + + o Fixed a potential memory bug in ColData's conversion to SQL null. + + o Many minor packaging tweaks. (README clarifications, file + permission fixes, better adherence to GNU packaging standards, + etc.) + + +2.0.6, 2005.09.28 (r1123) + + o Fixed makemake.bat so it works on cmd.exe, not just 4NT. + + o Documentation fixes. + + +2.0.5, 2005.09.13 (r1114) + + o Visual C++ build now requires GNU make. It is tested to work + with either the Cygwin or the MinGW versions. The previous + version of MySQL++ used nmake. This change enabled the + following features: + + o Debug and Release versions are both built into + separate subdirectories. + + o Dependency tracking for release version works + correctly now. (Previously dependencies worked + only for debug version.) + + o 'make clean' removes release version binaries + in addition to debug versions. + + o MinGW makemake support updated to support new release/debug + subdirectory system. This is probationary support, since + this code currently can't be built as a DLL. As a result, + it is no more useful than the Cygwin version, for licensing + reasons. + + o Several fixes to allow building on Solaris 8. These fixes may + also help on other SVR4-derived systems. + + o Removed Borland C++ makemake support, because this version + of the library does not work completely, and there seems + to be almost no user interest in fixing it. + + o Clarified "Handling SQL Nulls" section of user manual's + Tutorial chapter. + + +2.0.4, 2005.08.29 (r1076) + + o Made mysql_shutdown() second parameter autoconf check less + sensitive to compiler pedantry. + + o VC++ library Makefile is now smart enough to re-create the + import library, if it is deleted while leaving the DLL alone. + + o Added libmysqlclient.def to tarball. + + o Reworked most of the top-level README* files. + + o Renamed LGPL file to LICENSE. + + +2.0.3, 2005.08.25 (r1060) + + o Visual C++ makemake system updated to build both debug and + release versions of library DLL. + + o Fixed bug in simple1 example that caused crashes on Windows. + + o Doing UTF-8 to ANSI text translation in simple examples now. + + o Previous two releases built libmysqlpp with wrong soname on + autotools-based systems. Fixed. + + +2.0.2, 2005.08.18 (r1050) + + o Fixes to makemake system for cmd.exe. + + o Fixed the case where the system's C++ library includes an slist + implementation in namespace std. + + +2.0.1, 2005.08.17 (r1046) + + o Added new simple1 example, showing how to retrieve just one + column from a table. Old simple1 is now called simple2, and + simple2 is likewise shifted to simple3. + + o Added custom6 example, showing how to do the same thing with + SSQLS. + + o Updated user manual to cover new examples. + + o Was accidentally shipping Subversion crap with tarball. Fixed. + + +2.0.0, 2005.08.16 (r1031) The "Excess Hair Removal" release + + THIS IS NOT A DROP-IN REPLACEMENT FOR MySQL++ v1.7! + + At minimum, you will have to recompile your program against + this library. You may also have to make code changes. + Please see the "Incompatible Library Changes" chapter of + the user manual for a guide to migrating your code to this + new version: + + http://tangentsoft.net/mysql++/doc/html/userman/breakages.html + + o The library's shared object file name (soname) scheme has + changed. (This mainly affects POSIX systems.) + + The soname for the last 1.7.x releases of MySQL++ was + libmysqlpp.so.4, meaning the fourth version of the library's + application binary interface (ABI). (The first ABI version + in this scheme was that provided by 1.7.9.) MySQL++ + 2.0.0's soname is libmysqlpp.so.2.0.0. Since the dynamic + linker setup on some systems will create a symlink to + that file called libmysqlpp.so.2, it's possible that this + library could be confused with that for MySQL++ 1.7.19 + through .21, which also used this number. Do not install + this library on a system which still has binaries linked + against that version of the library! + + The new scheme is {ABI}.{feature}.{bug fix}. That is, + the first number changes whenever we break the library's + binary interface; the second changes when adding features + that do not break the ABI; and the last changes when the + release contains only internal bug fixes. This means + that we will probably end up with MySQL++ 3.0 and 4.0 at + some point, so there will be further soname conflicts. + Hopefully we can put these ABI changes off long enough + to avoid any real problems. + + o autoconf now installs headers into $prefix/include/mysql++, + instead of $prefix/include. If you were using the + --includedir configure script option to get this behavior + before, you no longer need it. + + o Linux binary RPMs will henceforth include only the + libmysqlpp.so.X.Y.Z file, and create any short names + required, to allow multiple versions to be installed at + once. Currently, you cannot install two MySQL++ library + RPMs at once, because they both have /usr/lib/libmysqlpp.so.X, + for instance. + + o Replaced the Visual C++ and Borland C++ project files with + a new "makemake" system, which creates Makefiles specific + to a particular toolchain. This new mechanism also supports + MinGW and generic GCC-on-*ix. This was done partly to reduce + the number of places we have to change when changing the + file names in MySQL++ or adding new ones, and partly so we're + not tied to one particular version of each of these tools. + + o VC++ Makefiles create a DLL version of the library only + now, so there's no excuse for LGPL violations now. + This same mechanism should make DLL builds under other + Windows compilers easy. + + o Added Connection::enable_ssl(), which enables encrypted + connections to the database server using SSL. + + o Connection::create_db() and drop_db() now return true on + success, not false. + + o Connection::create_db() and drop_db() use Query::exec() + now, for efficiency, rather than Query::execute(). + + o Removed Connection::infoo(). Apparently just there to + save you from a typo when calling the info() method, since + it was a mere alias. + + o Renamed Connection::real_connect() to connect(), gave + several more of its parameters defaults, and removed old + connect() function. Then changed user manual and examples + to use new APIs. + + o Replaced Connection::read_option() with new set_option() + mechanism. The name change matches the method's purpose + better. Functional changes are that it returns true on + success instead of 0, it supports a broader set of options + than read_option() did, and it enforces the correct option + argument type. + + o You can now call Connection::set_option() before the + connection is established, which will simply queue the option + request up until the connection comes up. If you use this + feature, you should use exceptions, because that's the only + way an option setting failure can be signalled in this case. + + o Removed query-building functions (exec*(), store*(), + use()) from class Connection, and moved all the implementation + code to class Query. Query no longer delegates the final + step of sending the query to the database server to + Connection(). + + o Added Connection::enable_ssl(), for turning on SSL support on + a connection. + + o Extracted exception disabling mechanism out of the many + classes that had the feature into a new OptionalExceptions + base class, which all classes having this feature now + derive from. Also, removed all per-method exception + handling flags. Finally, added NoExceptions class. With + all of these changes, there is now a common way to disable + exceptions with fine granularity on all objects that + support the feature. + + o All custom MySQL++ exceptions now derive from the new + Exceptions class. This regularizes the exception interface + and allows you to use a single catch() block if you want. + + o The "throw exceptions" flag is passed from parent to child + in all situations now. (Or if not, please report it as + a bug.) This fulfills a promise made in the v1.7.9 user + manual, with the cost being that some programs will see + new exceptions thrown that they're not expecting. + + o Added a bunch of new exception types: BadOption, + ConnectionFailed, DBSelectionFailed, EndOfResults, + EndOfResultSets, LockFailed, and ObjectNotInitialized. + Some of these replace the use of BadQuery, which in v1.7.x + was a kind of generic exception, thrown when something more + specific wasn't available. Beware, this means that programs + may start crashing after recompiling them under v2.0 due to + uncaught exceptions, if they were only trying to catch BadQuery. + + There are additional instances where the library will + throw new exceptions. One is when calling a method that + forces the internals to use an out-of-bounds index on a + vector; previously, this would just make the program + likely to crash. Another is that the library uses the + BadFieldName exception -- created in v1.7.30 -- in more + apropos situations. + + o Renamed SQLQueryNEParms to BadParamCount, to match naming + style of other concrete exception types. + + o Extracted lock()/unlock() functions from Connection and + Query classes into a new Lockable interface class. Locking + is implemented in terms of a different class hierarchy, Lock, + which allows multiple locking strategies with a single ABI. + + o Removed ResUse::eof(). It's based on a deprecated MySQL + C API feature, and it isn't needed anyway. + + o Removed arrow operator (->) for iterator returned by Fields, + Result and Row containers. It was inherently buggy, because + a correct arrow operator must return the address of an + object, but the underlying element access functions in these + classes (e.g. at()) return objects by value, of necessity. + Therefore, this operator could only return the address of + a temporary, which cannot be safely dereferenced. + + o Returned Row subscripting to something more like the + v1.7.9 scheme: there are two operator[] overloads, one for an + integer (field by index) and another for const char* (field + by name). lookup_by_name() has been removed. Because row[0] + is ambiguous again, added Row::at() (by analogy with STL + sequence containers), which always works. + + o Collapsed two of the Row::value_list*() overloads into + two other similar functions using default parameters. + This changes the API, but the removed functions aren't + used within the library, and I doubt they are used outside, + either. + + o Merged RowTemplate into Row. + + o Merged SQLQuery class into Query class. + + o Query is now derived from std::ostream instead of + std::stringstream, and we manage our own internal string + buffer. + + o Moved SQLParseElement and SQLQueryParms into their own + module, qparms. + + o Added multiple result set handling to Query. MySQL 4.1 + and higher allow you to give multiple SQL statements in a + single "store" call, which requires extensions to MySQL++ + so you can iterate through the multiple result sets. Also, + stored procedures in MySQL 5.0 reportedly return multiple + result sets. Thanks for the initial patch go to Arnon Jalon; + I reworked it quite a bit. + + o Query::storein*() now supports more varieties of the + nonstandard slist comtainer. (Singly-linked version of + STL std::list.) + + o Template query mechanism and user manual had several + mismatches. Made manual match actual behavior, or + made library match documented behavior, as apropriate. + Initial patch by Jürgen MF Gleiss, with corrections and + enhancements by Warren Young. + + o Collapsed mysql_* date and time base classes' methods and + data into the subclasses. Also, DateTime no longer derives + from Date and Time; you could get away with that in the + old hierarchy, but now it creates an inheritance diamond, + and allows unsupported concepts like comparing a Time to + a DateTime. + + o Removed "field name" form of Row::field_list(). It was + pretty much redundant -- if you have the field names, why + do you need a list of field names? + + o ColData can convert itself to bool now. Thanks for this + patch go to Byrial Jensen. + + o Removed simp_list_b type; wasn't being used, and doesn't + look to be useful for end-user code. + + o Several methods that used to take objects by value now + do so by const reference, for efficiency. + + o Several variable and function renamings so that MySQL++ + isn't needlessly tied to MySQL. Even if we never make + the library work with other database servers, there's + little point in tying this library to MySQL blindly. + + o Renamed all private data members of MySQL++ classes to + have trailing underscores. + + o 'private' section follows 'public' section in all classes + now. + + o Removed mysql++.hh and sqlplus.hh backwards-compatibility + headers. + + o Added copy ctors to Date/Time classes so that they will + work in SSQLS under GCC 4.0.0. Without these, the compiler + couldn't make the conversion from raw MySQL row data. + + o Fixed a bunch of GCC 4.0 pedantic warnings: added virtual + dtors to all base classes, calling base class ctors from leaf + classes, etc. + + o All warnings fixed under VC++ at warning level 3. (Mostly + harmless signedness and integer conversion stuff.) + + o Updated LGPL license/copyright comments at the top of + several files to use FSF's new physical address. + + o Relicensed user manual under a close variant of the Linux + Documentation Project License, as it's designed for + documentation, which the LGPL is not. Permission for this + received from Kevin Atkinson and MySQL AB. + + o Added ABI and API breakages chapter to user manual. It + is basically a subset of this ChangeLog, with only the + information an end-user must know when migrating between + versions. + + o Reworked user manual's DocBook code quite a bit after + reading Bob Stayton's book "DocBook XSL" 3/e. Better handling + of stylesheets, taking advantage of some superior DocBook + features, prettier output (especially the HTML version), etc. + + o Rewrote doc/userman/README to make it clearer how to get + started contributing to the user manual. It's essentially a + "getting started with DocBook" guide now! + + o Lots of small text improvements to user and reference + manuals. Aside from the obvious tracking of library changes, + made a bunch of minor style and clarity improvements. + + o Added CSS stylesheets for userman and refman to + make the HTML versions of each a) not ugly; and b) match + tangentsoft.net. (Yes, some may say that these are incompatible + goals....) + + o Standardized exception handling code in the examples that + use it. + + o Fixed a potential memory leak due to exceptions thrown from + ResUse. Thanks for this patch go to Chris Frey. + + o Using new "no exceptions" feature of library in simple1 + example, so it is now truly simple. + + o simple1 example no longer depends as much on util module, so + that all of the important code is in one place. Makes + learning MySQL++ a little less intimidating. + + o Added new simple2 and usequery examples, to demonstrate + the proper way to handle a "use" query, with exceptions + disabled, and not, respectively. Added them to the user + manual, in the appropriate place. + + o Refactored the "print stock table" example functions + again, to make code using them clearer. + + o UTF-8 to UCS-2 handling in examples is now automatic on + Windows. + + o Removed debug code from Windows Unicode output examples + that slipped into previous release. + + o resetdb example is now clearer, and more robust in the + face of database errors. + + o Simplified connect_to_db() in examples' util module. + + o Added sample autoconf macro for finding MySQL++ libraries, for + people to use in their own autotools-based projects. + + o Lots and lots of minor cleanups not worth mentioning + individually... + + +1.7.40, 2005.05.26 (r719) + + o Multiple item form of insert() now works if you're using the + SQLQuery class, or its derivative, Query. Thanks to Mark + Meredino for this patch. + + o Fixed a bug in const_string::compare(), in which MySQL++ + would walk off the end of the shorter of the two strings. + All was well if the two were the same length. + + o ResUse::operator=() now fully updates the object, so it's more + like the behavior of the full ctor. + + o All source files now contain a license and copyright statement + somewhere within them. + + o Optimized mysql++.h a bit: it now #includes only the minimum set + of files required, and there is now an idempotency guard. + This improves compile times a smidge, but mainly it was + done to clean up the generated #include file graph in the + reference manual. Before, it was a frightful tangle because + we #included everything except custom*.h. + + o Constness fix in MySQL++ date/time classes to avoid compiler + warnings with SSQLS. Thanks to Wolfram Arnold for this patch. + + o Fixed some compiler warnings in custom*.h. Thanks to Chris Frey + for this patch. + + o Added "Submitting Patches" and "Maintaining a Private CVS + Repository" sections to the HACKERS file. Thanks to Chris + Frey for the source material for these sections. The HACKERS + file was improved in several other ways at the same time. + + o PDF version of user manual no longer has links to the reference + manual. They were ugly, and they were broken anyway due to the + way we move the PDFs after generating them. If you want + interlinked manuals, use the HTML version. + + o PDF version of user manual now has hard page breaks between + chapters. + + o Removed complic1 example. Wasn't pulling its own weight. + Everything it is supposed to demonstrate is shown in other + examples already. + + o Refactored print_stock_table() in examples/util module to be + four functions, and made all the examples use various of + these functions where appropriate. Before, several of + the examples had one-off stock table printing code because + print_stock_table() wasn't exactly the right thing, for one + reason or another. One practical problem with this is that + some of the examples missed out on the recent Unicode updates; + now such a change affects all examples the same way. + + o Since so many of the examples rely on the util module, the user + manual now covers it. The simple1 example in the user manual + didn't make much sense before, in particular, because it's + really just a driver for the util module. + + o Added custom5 example. It shows how to use the equal_list() + functionality of SSQLS. Thanks to Chris Frey for the original + version of this program. (I simplified it quite a bit after + accepting it.) + + o New user manual now covers the value_list(), equal_list() and + field_list() stuff that the old manual covered but which was + left out in previous versions of the new manaul. Most of the + examples are the same, but the prose is almost completely new. + This new section includes the custom5 example. + + o Every declaration in MySQL++ is now documented in the reference + manual, or explicitly treated as "internal only". + + o Improved docs for MySQL++'s mechanism to map between MySQL + server types and C++ types. Initial doc patch by Chris Frey, + which I greatly reworked. + + o Improved a lot of existing reference manual documentation while + adding the new stuff. + + o Expanded greatly on the exception handling discussion in the user + manual. + + o Added all-new "Quoting and Escaping" section to the user + manual's Tutorial chapter. Moved some existing comments on + quoting and escaping around and added some new ones to other + sections as a result. + + o Added all-new "Handling SQL Nulls" section to the user manual's + Tutorial chapter. + + o Many improvements to the Overview section of the user manual. + + o Row::operator[] reference now explains the right and wrong way to + use the values it returns. This is in response to a mailing list + post where someone was incorrectly using this feature and getting + a bunch of dangling pointers. + + o Updated Doxyfile so 1.3.19.1 parses it without warnings. Still + works with versions back to 1.2.18, at least. (These are + the versions shipped with Fedora Core 3 and Red Hat Linux 9, + respectively.) + + o Using a superior method to make Doxygen ignore certain sections + of the source code. Between this change and the fact that + everything not so ignored is documented, Doxygen no longer + generates any warnings. + + o Lots of code style updates. Everything should now be consistently + formatted. + + +1.7.35, 2005.05.05 (r601) The "Cinco de Mayo" release + + o Added a "how to use Unicode with MySQL++" chapter to the user + manual. (Too bad "Cinco de Mayo" doesn't have any accented + characters. That would be just _too_ precious.) + + o VC++ examples now use the Unicode Win32 APIs, so they can display + Unicode data from MySQL++. + + o Added an optional conversion function to examples/util.cpp to + handle the conversion from UTF-8 to UCS-2 on Win32. + + o Moved "brief history of MySQL++" from intro section of refman to + intro section of userman. + + o Lots of small bits of documentation polishing. + + o Made some minor constness fixes. Thanks to Erwin van Eijk + for this patch. + + o Made some warning fixes for GCC 4.0. Not all warnings are + fixed, because some of the needed changes would break the ABI. + Thanks to Chris Frey for this patch. + + o Added lib/Doxyfile to distribution. + + +1.7.34, 2005.04.30 (r573) + + o Added a multiple-insert method for Query, which lets you insert + a range of records from an STL container (or the whole thing, + if you like) in a single SQL query. This is faster, and it + reduces coding errors due to less repetition. Thanks to Mark + Meredino for the patch. + + o Reference and user manual now get rebuilt automatically when + required. (E.g. on 'make dist', or explicitly now through 'make + docs'.) + + o Made it easier to change the maximum number of SSQLS data members + in generated custom-macros.h file. It used to be hard-coded in + several places in lib/custom.pl; now it's a variable at the top of + the file. + + o Changed default SSQLS data member limit to 25, which is what it + has been documented as for a long time now. It was actually 26 + within custom.pl. + + o Fixed a regression in previous version. + + o Trimmed some fat from the distribution packages. + + o Some more small doucmentation improvements. + + +1.7.33, 2005.04.29 (r555) + + o Worked around an overloaded operator lookup bug in VC++ 7.1 + that caused SSQLS insert, replace and update queries to get + mangled. (Symptom was that custom2 and custom3 examples didn't + work right.) Thanks to Mark Meredino for digging up the + following, which explains the problem and gives the solution: + + http://groups-beta.google.com/group/microsoft.public.vc.stl/browse_thread/thread/9a68d84644e64f15 + + o Some VC++ warning fixes. + + o Major documentation improvements: + + o Using DocBook for user manual and Doxygen for reference + manual. The former now references the latter where + useful. + + o Split out HACKERS and CREDITS files from main README, + and improved remaining bits of README. + + o Moved the text from the old v1.7.9 LaTeX-based + documentation over into the new systems, and reworked + it to more closely resemble English. + + o Added a lot of new material to documentation, and + simplified a lot of what already existed. + + o Documentation is now being built in HTML and PDF forms. + + o ebuild file updated to take advantage of recent configure script + features. Thanks to Chris Frey for this patch. + + + +1.7.32, 2005.03.10 (r479) + + o Example building may now be skipped with --disable-examples + configure script flag. + + o Changed stock items added in resetdb. One is now UTF-8 encoded, + to show that basic use of Unicode with MySQL++ is easy, yet not + foolproof. (See formatting of table on systems where cout isn't + UTF-8 aware!) Other stock items now follow a theme, for your + amusement. :) + + o custom3 example now changes UTF-8 item's name to the 7-bit ASCII + equivalent. Previously, this example would fix a spelling error + in the table. + + o resetdb example now says 'why' when it is unable to create the + sample database. + + o Small formatting change to print_stock_table(), used by several + examples. + + o Was issuing a VC++-specific warning-disable pragma when built by + any Windows compiler. Fixed. + + +1.7.31, 2005.03.05 (r462) The "Inevitable Point-one Followup" release + + o Check for threads support must now be explicitly requested via + configure script's new --enable-thread-check flag. + + o Fix for contacting MySQL server on a nonstandard port number. + Thanks to Chris Frey for this patch. + + o Example programs using standard command line format now accept a + fourth optional parameter, a port number for the server. Thanks + to Chris Frey for this patch. + + o One more g++ 3.4 pedantic warning fix by Chris Frey. + + o Exception handling in resetdb is no longer nested, because you'd + get a segfault on some systems when an exception was thrown from + one of the inner try blocks. + + o Improvements to Connection class's handling of locking mechanism. + Concept based on patches by Rongjun Mu. + + o Implemented the declared-but-never-defined Query::lock(). Thanks + to Rongjun Mu for this patch. + + o Cleaned up some unclear if/else blocks in connection.cpp by + adding explicit braces, correct indenting and putting normal + code path in the if side instead of the else. + + +1.7.30, 2005.02.28 (r443) The "Power of Round Numbers" release + + o bootstrap script now accepts a 'pedantic' argument, which sets a + bunch of CFLAGS that make g++ very picky about the code it + accepts without warnings. + + o Fixed a bunch of things that generated warnings with g++ in + pedantic mode. Only two warnings remain, having to do with + floating point comparisons. (See Wishlist for plans on how to + deal with these.) Thanks to Chris Frey for this patch. + + o Split long tests out of configure.in into M4 files in new config + subdir. This makes configure.in easier to read. + + o Added preliminary thread support. Currently, this just means that + we detect the required compiler and linker thread flags, and link + against the proper thread-safe libraries. THERE MAY BE + UN-THREAD-SAFE CODE IN MYSQL++ STILL! + + o Standard C++ exceptions are the default now. Old pre-Standard + exception stuff removed. + + o Row::lookup_by_name() will throw the new BadFieldName exception if + you pass a bad field name. Thanks for this patch to Chris Frey. + + o Row::operator[] will throw a Standard C++ out of bounds exception + by way of std::vector::at() if you pass it a bad index. Thanks + for this patch to Chris Frey. + + o Setting Connection::is_connected flag to false on close(). + Previously, is_connected() would continue to return true after + close() was called. + + o All number-to-string conversion ctors in SQLString class now use + ostringstream to do the conversion. Previously, we used + snprintf(), which isn't available on all systems. Also, we used a + C99 format specifier for the "long long" conversion, which is also + not available on all systems. This new ostringstream code should + be platform-independent, finally. + + +1.7.28, 2005.02.04 (r403) + + o --with-mysql* flags to configure script now try the given + directory explicitly, and only if that fails do they try + variations, like tacking '/lib' and such onto it to try and find + the MySQL includes and libraries. Thanks to Matthew Walton for + the patch. + + o Finally removed sql_quote.h's dependence on custom.h, by moving + the one definition it needed from custom.h to deps.h. This will + help portability to compilers that can't handle the SSQLS macros, + by making that part of the library truly optional. + + +1.7.27, 2005.01.12 (r395) + + o configure check for libmysqlclient now halts configuration if the + library isn't found. Previously, it would just be flagged as + missing, and MySQL++ would fail to build. + + o Added sql_string.cpp to VC++ and BCBuilder project files. + + o Removed Totte Karlsson's 'populate' example, which never made it + into the distribution anyway. + + o Removed last vestiges of 'dummy.cpp'. + + o Renamed *.cc to *.cpp in BCBuilder project files. + + o Worked around a BCBuilder C++ syntax processing bug in row.h. + + +1.7.26, 2004.12.17 (r382) + + o Moved all of the SQLString definitions out of the header and into + a new .cpp file, reformatted it all, and made the integer + conversion functions use snprintf() or _snprintf() instead of + sprintf(). Also, widened some of the buffers for 64-bit systems. + + o Using quoted #include form for internal library headers, to avoid + some problems with file name clashes. (The headers should still + be installed in their own separate directory for best results, + however.) Thanks to Chris Frey and Evan Wies for the patch and + the discussion that lead to it. + + o Removed unnecessary semicolons on namespace block closures. + Thanks to Evan Wies for this patch. + + o Fixed namespace handling in the legacy headers mysql++.hh and + sqlplus.hh. Thanks to Chris Frey for this patch. + + o #including iostream instead of ostream in lib/null.h for + broader C++ compatibility. (This may allow MySQL++ to work on GCC + 2.95.2 again, but this is unconfirmed.) + + o Detecting proper mysql_shutdown() argument handling automatically + in platform.h for the Windows compiler case instead of making the + user edit the file. Thanks to Evan Wies for this patch. + + o Fixed examples/Makefile.simple to use new *.cpp file naming. + + o Fix to Gentoo ebuild file's exception configure switch handling. + Thanks to Chris Frey for this patch. + + o Rebuilding lib/custom*.h intelligently now, to avoid unnecessary + recompiles after running bootstrap script. + + +1.7.25, 2004.12.09 (r360) + + o Yet more fixes to the --with-mysql-lib and --with-mysql-include + flags. + + o Added DLLEXPORT stuff to platform.h, hopefully so that someone + can figure out how to make VC++ make a DLL version of MySQL++. + + o Renamed *.cc to *.cpp. + + o Made 'set -> myset' change in VC++ project files. + + o Some style changes (mostly whitespace) in header files. + + +1.7.24, 2004.12.08 (r343) + + o Fixed the --with-mysql-lib and --with-mysql-include flags' + behavior, and extended their search ability to handle one other + common case. (Fixed by Steve Roberts) + + o Fixes to put freestanding functions in namespace mysqlpp. (They + weren't in the namespace, while all the class member functions + were.) This required bumping the ABI version number to 4. + + o Renamed set module to myset, to avoid conflicts with Standard C++ + Library's set.h when MySQL++ headers were installed into one of + the standard system include directories. + + o Renamed all the idempotency guards to make them consistent in + style and unique to MySQL++. + + o Reformatted all of lib/*.cc. + + +1.7.23, 2004.11.20 (r333) + + o Query::reset() now empties the stored query string. If you + subsequently stored a longer query in the object, you'd overwrite + the previous query, but otherwise the longer part of the previous + one would stick out past the new query. + + o We now look to the NO_LONG_LONGS macro only to decide whether to + fake 64-bit integer support using 32-bit integers. + + o 64-bit integer support under Visual C++ may be working now, using + that platform's __int64_t type. This has not been tested. + + o Removed 64-bit integer support for Codewarrior on Mac OS 9 and + earlier. OS X uses GCC, so it requires no special support. + + o Added MinGW detection in platform.h. + + o If you pass a flag (-X) to the examples that take the standard + parameters (resetdb, simple1, etc.), it prints a usage message. + + o Better error handling in resetdb example, where errors are the + most critical. (If that one runs without errors, the others + probably will, too, and you have to run that one first.) + + o resetdb now reports success, rather than succeeding silently. + + o Removed the code in sample1 example that duplicated util module's + print_stock_table(), and called that function instead. + + o Moved the preview() calls in the example programs to before the + query execution calls, because execution modifies the query. + + o All examples that take the standard command line parameters now + exit when connect_to_db() fails in one of the ways that don't + throw an exception, rather than bulling onward until the next + MySQL database call fails because the connection isn't up. + + o dbinfo example now takes the standard command line parameters. + + o Much better output formatting in dbinfo example. + + o Calling reset() where appropriate in the various example programs. + Before, the programs may have worked, but not for the right + reason. This lead some people to believe that calling reset() + was not necessary. + + o Fixed an incorrect use of row["string"] in complic1 example. + + o Lots of code style improvements to the examples. + + o Some VC++ type warnings squished. Some remain. + + +1.7.22, 2004.11.17 (r302) + + o Applied patches by Zahroof Mohammed to allow it to build under GCC + 3.4.2. Tested on MinGW and Fedora Core 3 systems. + + o Removed all the forward declarations in defs.h, and added + forward declarations where necessary in individual header files. + #including defs.h in fewer locations as a result. + + o Legacy headers sqlplus.hh and mysql++.hh now declare they are + using namespace mysqlpp, to allow old code to compile against the + new library without changes. + + o Removed query_reset parameter from several class Query member + functions. In the implementation, these parameters were always + overridden! No sense pretending that we pay attention to these + parameters. This changes the ABI version to 3. + + o #including custom.h in sql_query.h again...it's necessary on GCC + 3.4. + + o bootstrap script runs lib/config.pl after configure. This is + just a nicety for those running in 'maintainer mode'. + + +1.7.21, 2004.11.05 (r273) + + o Generating a main mysql++ RPM containing just the library files + and basic documentation, and the -devel package containing + everything else. + + o Devel package contains examples now, along with a new Makefile + that uses the system include and library files, rather than the + automake-based Makefile.am we currently have which uses the files + in the mysql++ source directory. + + o Renamed sqlplusint subdirectory in the package to lib. + + o Removed the obsolete lib/README file. + + o lib/sql_query.h no longer #includes custom.h, simplifying + build-time dependencies and shortening compile times. + + +1.7.20, 2004.11.03 (r258) + + o Collapsed all numbered *.hh headers into a single *.h file. For + example, the contents of row1.hh, row2.hh and row3.hh are now in + row.h. + + o While doing the previous change, broke several circular + dependencies. (The numbered file scheme was probably partly done + to avoid this problem.) The practical upshot of most of these + changes is that some functions are no longer inline. + + o Removed define_short.hh and everything associated with it. The + library now uses the short names exclusively (e.g. Row instead of + MysqlRow). + + o Put all definitions into namespace mysqlpp. For most programs, + simply adding a 'using namespace mysqlpp' near the top of the + program will suffice to convert to this version. + + o Once again, the main include file was renamed, this time to + mysql++.h. Hopefully this is the last renaming! + + o mysql++.hh still exists. It emits a compiler warning that the + file is obsolete, then it #includes mysql++.h for you. + + o sqlplus.hh is back, being a copy of the new mysql++.hh. Both of + these files may go away at any time. They exist simply to help + people transition to the new file naming scheme. + + o Renamed mysql++-windows.hh to platform.h, and added code to it to + handle #inclusion of config.h on autotools-based systems + intelligently. This fixes the config.h error when building under + Visual C++. + + o There is now only one place where conditional inclusion of + winsock.h happens: platform.h. + + o Beautified the example programs. + + +1.7.19, 2004.10.25 (r186) + + o Fixed an infinite loop in the query mechanism resulting from the + strstream change in the previous version. There is an overloaded + set of str() member functions that weren't a problem when query + objects were based on strstream. + + o Query mechanism had a bunch of const-incorrectness: there were + several function parameters and functions that were const for + the convenience of other parts of the code, but within these + functions the constness was const_cast away! This was evil + and wrong; now there are fewer const promises, and only one is + still quietly broken within the code. (It's in the SQLQuery + copy ctor implementation; it should be harmless.) + + o Removed operator=() in Query and SQLQuery classes. It cannot take + a const argument for the same reason we have to cast away const + in the SQLQuery copy ctor. It's tolerable to do this in the copy + ctor, but intolerable in an operator. Since the copy ctor is good + enough for all code within the library and within my own code, I'm + removing the operator. + + o Above changes required bumping the ABI to version 2. + + o Visual C++ projects now look for MySQL build files in c:\mysql, + since that's the default install location. (Previously, it was + c:\program files\mysql.) + + +1.7.18, 2004.10.01 (r177) + + o Changed all the strstream (and friends) stuff to stringstream type + classes. Let there be much rejoicing. + + o Query object now lets you use store() even when the SQL query + cannot return a result, such as a DROP TABLE command. This is + useful for sending arbitrary SQL to the server. Thanks to + Jose Mortensen for the patch. + + o Quote fix in configure.in, thanks to David Sward. + + o Renamed undef_short file to undef_short.hh. + + o Gentoo ebuild file is actually being shipped with the tarball, + instead of just sitting in my private CVS tree since 1.7.14 was + current. Ooops.... + + +1.7.17, 2004.09.16 (r170) + + o Reverted one of the VC++ warning fix changes from 1.7.16 that + caused crashes on Linux. + + o Added a configure test that conditionally adds the extra 'level' + parameter to mysql_shutdown() that was added in MySQL 4.1.3 and + 5.0.1. + + +1.7.16, 2004.09.13 (r160) + + o Building VC++ version with DLL version of C runtime libraries, and + at warning level 3 with no warnings emitted. + + o VC++ build no longer attempts to fake "long long" support. See + the Wishlist for further thoughts on this. + + +1.7.15, 2004.09.02 (r144) + + o Renamed Configure file to common.am, to avoid file name conflict + with configure script on case-sensitive file systems. + + o Added ebuild file and ebuild target to top-level Makefile for + Gentoo systems. Thanks to Chris Frey for this. + + o Small efficiency improvements to BadQuery exception handling. + Initial idea by Chris Frey, improvements by Warren Young. + + +1.7.14, 2004.08.26 (r130) + + o Builds with Visual C++ 7.1. + + o Fixed a bug in custom macro generation that caused problems with + GCC 3.4. (X_cus_value_list ctor definition was broken.) + + +1.7.13, 2004.08.23 (r92) + + o Removed USL CC support. (System V stock system compiler.) Use + GCC on these platforms instead. + + o Added examples/README, explaining how to use the examples, and + what they all do. + + o Most of the example programs now accept command line arguments for + host name, user name and password, like resetdb does. + + o Renamed sinisa_ex example to dbinfo. + + o Several Standard C++ syntax fixes to quash errors emitted by + GCC 3.4 and Borland C++ Builder 6. Thanks to Steffen Schumacher + and Totte Karlsson for their testing and help with these. + + o Added proper #includes for BCBuilder, plus project files for same. + Thanks to Totte Karlsson for these. + + +1.7.12, 2004.08.19 (r63) + + o Many Standard C++ fixes, most from the GCC 3.4 patch by + Rune Kleveland. + + o Added Wishlist file to distribution. + + o Fixed a problem in the bootstrap script that caused complaints + from the autotools on some systems. + + o RPM building is working properly now. + + o Fixed the idempotency guard in datetime1.hh. + + +1.7.11, 2004.08.17 (r50) + + o Renamed mysql++, defs and define_short files, adding .hh to the + end of each. (They're header files!) This shouldn't impact + library users, since these are hopefully used internal to the + library only. + + o Removed sqlplus.hh file. Use mysql++.hh instead. + + o Added mysql++.spec, extracted from contributed 1.7.9 source RPM, + and updated it significantly. Also, added an 'rpm' target to + Makefile.am to automate the process of building RPMs. + + o Added bootstrap and LGPL files to distribution tarball. + + o Added pre-1.7.10 history to this file. + + o Removed .version file. Apparently it's something required by old + versions of libtool. + + +1.7.10, 2004.08.16 (r27) + + o Maintenance taken over by Warren Young (mysqlpp at etr dash usa + dot com.) See http://lists.mysql.com/plusplus/3326 for details. + + o Applied many of the GCC 3.x patches submitted for 1.7.9 over + the years. This allows it to build on everything from 3.0 to + 3.3.3, at least. Because so many patches are rolled up in one + big jump, it's difficult to describe all the changes and where + they came from. Mostly they're Standard C++ fixes, as GCC + has become more strict in the source code that it will accept. + + o MysqlRow used to overload operator[] for string types as well as + integers so you could look up a field by its name, rather than by + its index. GCC 3.3 says this is illegal C++ due to ambiguities in + resolving which overload should be used in various situations. + operator[] is now overloaded only for one integer type, and a + new member function lookup_by_name() was added to maintain the old + by-field-name functionality. + + o Fixed another operator overloading problem in SSQLS macro + generation with GCC 3.3. + + o The _table member of SSQLS-defined structures is now const char*, + so you can assign to it from a const char* string. + + o Got autoconf/automake build system working with current versions + of those tools again. Removed the generated autotools files from + CVS. + + o Renamed library file from libsqlplus to libmysqlpp. + + +1.7.9 (May 1 2001) Sinisa Milivojevic + + * Fixed a serious bug in Connection constructor when reading MySQL + * options + * Improved copy constructor and some other methods in Result / + * ResUse + * Many other minor improvements + * Produced a complete manual with chapter 5 included + * Updated documentation, including a Postscript format + +1.7.8 (November 14 2000) Sinisa Milivojevic + + * Introduced a new, standard way of dealing with C++ exceptions. + * MySQL++ now supports two different methods of tracing exceptions. + * One is by the fixed type (the old one) and one is standard C++ + * type by the usage of what() method. A choice of methods has to be + * done in building a library. If configure script is run with + * -enable-exception option , then new method will be used. If no + * option is provided, or -disable-exception is used, old MySQL++ + * exceptions will be enforced. This innovation is a contribution of + * Mr. Ben Johnson + * MySQL++ now automatically reads at connection all standard MySQL + * configuration files + * Fixed a bug in sql_query::parse to enable it to parse more then 99 + * char's + * Added an optional client flag in connect, which will enable usage + * of this option, e.g. for getting matched and not just affected + * rows. This change does not require any changes in existing + * programs + * Fixed some smaller bugs + * Added better handling of NULL's. Programmers will get a NULL + * string in result set and should use is_null() method in ColData to + * check if value is NULL + * Further improved configuration + * Updated documentation, including a Postscript format + +1.7.6 (September 22 2000) Sinisa Milivojevic + + * This release contains some C++ coherency improvements and scripts + * enhacements + * result_id() is made available to programmers to fetch + * LAST_INSERT_ID() value + * Connection constroctur ambiguity resolved, thanks to marc@mit.edu + * Improved cnnfigure for better finding out MySQL libraries and + * includes + * Updated documentation, including a Postscript format + +1.7.5 (July 30 2000) Sinisa Milivojevic + + * This release has mainl bug fixes and code improvements + * A bug in FieldNames::init has been fixed, enabling a bug free + * usage of this class with in what ever a mixture of cases that is + * required + * Changed behaviour of ResUse, Result and Row classes, so that they + * could be re-used as much as necessary, without any memory leaks, + * nor with any re-initializations necessary + * Fixed all potential leaks that could have been caused by usage of + * delete instead of delete[] after memory has been allocated with + * new[] + * Deleted all unused classes and macros. This led to a reduction of + * library size to one half of the original size. This has + * furthermore brought improvements in compilation speed + * Moved all string manipulation from system libraries to + * libmysqlclient, thus enabling uniformity of code and usage of 64 + * bit integers on all platforms, including Windows, without + * reverting to conditional compilation. This changes now requires + * usage of mysql 3.23 client libraries, as mandatory + * Changed examples to reflect above changes + * Configuration scripts have been largely changed and further + * changes shall appear in consecutive sub-releases. This changes + * have been done and shall be done by our MySQL developer Thimble + * Smith + * Changed README, TODO and text version of manual. Other versions of + * manual have not been updated + * Fixed .version ``bug''. This is only partially fixed and version + * remains 1.7.0 due to some problems in current versions of libtool. + * This shall be finally fixed in a near future + * Several smaller fixes and improvements + * Added build.sh script to point to the correct procedure of + * building of this library. Edit it to add configure options of your + * choice + +1.7 (May17 2000) Sinisa Milivojevic + + * This is mainly a release dealing with bug fixes, consistency + * improvements and easier configure on some platforms + * A bug in fetch_row() method of ResUse class has been fixed. Beside + * changes that existed in a distributed patch, some additional error + * checking has been introduced + * A bug in escape manipulator has been fixed that could cause an + * error if all characters had to be escaped + * An inconsistency in column indexing has been fixed. Before this + * version, column names in row indexing with strings, i.e. + * row[] , has been case sensitive, which was inconsistent + * with MySQL server handling of column names + * An inconsistency in conversion from strings to integers or floats + * has been fixed. In prior version a space found in data would cause + * a BadConversion exception. This has been fixed, but 100% + * consistency with MySQL server has not been targeted, so that other + * non-numeric characters in data will still cause BadConversion + * exception or error. As this API is used in applications, users + * should provide feedback if full compatibility with MySQL server is + * desired, in which case BadConversion exception or error would be + * abolished in some of future versions + * A new method in ColData class has been introduced. is_null() + * method returns a boolean to denote if a column in a row is NULL. + * Finally, as of this release, testing for NULL values is possible. + * Those are columns with empty strings for which is_null() returns + * true. + * Some SPARC Solaris installations had C++ exception problems with + * g++ 2.95.2 This was a bug that was fixed in GNU gcc, as from + * release 2.95 19990728. This version was thoroughly tested and is + * fully functional on SPARC Solaris 2.6 with the above version of + * gcc. + * A 'virtual destructor ' warning for Result class has been fixed + * Several new functions for STL strings have been added. Those + * functions (see string_util.hh) add some of the functionality + * missing in existing STL libraries + * Conversion for 64 bit integers on FreeBSD systems has been added. + * On those systems _FIX_FOR_BSD_ should be defined in CXXFLAGS prior + * to configuring. Complete conversion to the usage of functions for + * integer conversion found in mysqlclient library is planned for one + * of the next releases + * A completely new, fully dynamic, dramatic and fully mutable result + * set has been designed and will be implemented in some of 2.x + * releases + * Several smaller fixes and improvements, including defaulting + * exceptions to true, instead of false, as of this version + * An up-to-date and complete Postscript version of documentation is + * included in this distribution + * Large chunks of this manual are changed, as well as README and + * TODO files. + +1.6 (Feb 3 2000) Sinisa Milivojevic + + * This is a major release as it includes new features and major + * rewrites + * Automatic quoting and escaping with streams. It works + * automatically , depending on the column type. It will work with << + * on all ostream derived types. it is paricularly handy with query + * objects and strstreams. Automatic quoting and escaping on cout, + * cerr and clog stream objects is intentionally left out, as quoting + * / escaping on those stream objects is not necessary. This feature + * can be turned of by setting global boolean dont_quote_auto to + * true. + * Made some major changes in code, so that now execute method should + * be used only with SSQL and template queries, while for all other + * query execution of UPDATE's, INSERT's, DELETE's, new method exec() + * should be used. It is also faster. + * New method get_string is inroduced for easier handling / casting + * ColData into C++ strings. + * Major rewrite of entire code, which led to it's reduction and + * speed improvement. This also led to removal of several source + * files. + * Handling of binary data is introduced. No application program + * changes are required. One of new example programs demonstrates + * handling of binary data + * Three new example programs have been written and thoroughly + * tested. Their intention is to solve some problems addressed by + * MySQL users. + * Thorough changes is Makefile system has been made + * Better configuration scripts are written, thanks to D.Hawkins + * + * Added several bug fixes + * Changed Manual and Changelog + +1.5 (Dec 1 1999) Sinisa Milivojevic + + * Fixed bug in template queries, introduced in 1.4 (!) + * Fixed connect bug + * Fixed several bug in type_info classes + * Added additional robustness in classes + * Added additional methods for SQL type info + * Changed Changelog and README + +1.4 (Nov 25 1999) Sinisa Milivojevic + + * Fixed bug in store and storein methods + * Fixed one serious memory leak + * Fixed a very serious bug generated by gcc 2.95.xx !! + * Added robustness in classes, so that e.g. same query and row + * objects can be re-used + * Changed sinisa_ex example to reflect and demonstrate this + * stability + * Changed Changelog and README + * Few other bug fixes and small improvements and speed-ups + +1.3 (Nov 10 1999) Sinisa Milivojevic + + * Fixed several erronous definitions + * Further changed source to be 2.95.2 compatible + * Expunged unused statements, especially dubious ones, like use of + * pointer_tracker + * Corrected bug in example file fieldinf1 + * Finally fixed mysql_init in Connection constructor, which provided + * much greater stability ! + * Added read and get options, so that clients, like mysqlgui can use + * it + * Changed Changelog and README + * Many other bug fixes. + +1.2 (Oct 15 1999) Sinisa Milivojevic + + * First offical release. Version 1.0 and 1.1 were releases by Sinisa + * before I (Kevin Atkinson) made him the offical maintainer, + * Many manual fixes. + * Changed README and Changelog + * Changed source to be compilable by gcc 2.95.xx, tribute to Kevin + * Atkinson + * Added methods in Connection class which are necessary for + * fullfilling administrative functions with MySQL + * Added many bug fixes in code pertaining to missing class + * initializers , as notified by Michael Rendell + * Sinisa Milivojevic is now the offical + * maintainer. + +1.1 (Aug 2 1999) Sinisa Milivojevic + + * Added several bug fixes + * Fixed memory leak problems and variables overlapping problems. + * Added automake and autoconf support by loic@ceic.com + * Added Makefile for manual + * Added support for cygwin + * Added example sinisa_ex (let modesty prevail) which used to crash + * a lot when memory allocation, memory leak and overlap problems + * were present. Smooth running of this example proves that all those + * bugs are fixed + * Corrected bugs in sql_query.cc regarding delete versus delete[] + * and string length in manip.cc + * Changed manual + * Changed README + * Many other smaller things + +1.0 (June 9 1999) Michael Widenius + + * Added patches from Orion Poplawski to support the + * UnixWare 7.0 compiler + +.64.1.1a (Sep 27 1998) + + * Fixed several bugs that caused my library to fail to compile with + * egcs 1.1. Hopefully it will still compile with egcs 1.0 however I + * have not been able to test it with egcs 1.0. + * Removed some problem causing debug output in sql++pretty. + +.64.1a (Aug 1 1998) + + * Added an (almost) full guide to using Template Queries. + * Fixed it so the SQLQuery will throw an exception when all the + * template parameters are not provided. + * Proofread and speedchecked the manual (it really needed it). + * Other minor document fixes. + +.64.0.1a (July 31 1998) + + * Reworked the Class Reference section a bit. + * Minor document fixes + * Added more examples for SSQLS. + * Changed the syntax of equal_list for SSQLS from equal_list (cchar + * *, Manip, cchar *) to (cchar *, cchar *, Manip). + * Added set methods to SSQLS. These new methods do the same thing as + * there corresponding constructors. + * Added methods for creating a mysql_type_info from a C++ type_info. + +.64.a (July 24 1998) + + * Changed the names of all the classes so they no longer have to + * have Mysql in the begging of it. However if this creates a problem + * you can define a macro to only use the old names instead. + * The Specialized SQL Structures (formally known as Custom Mysql + * Structures) changed from mysql_ to sql_. + * Added the option of using exceptions thoughout the API. + * ColData (formally known as MysqlStrings) will now throw an + * exception if there is a problem in the conversion. + * Added a null adapter. + * Added Mutable Result Sets + * Added a very basic runtime type identification for SQL types + * Changed the document format from POD to LYX . + * Am now using a modified version of Perceps to extract the class + * information directly from the code to make my life easier. + * Added an option of defining a macro to avoid using the automatic + * conversion with binary operators. + * Other small fixed I probully forgot to mentune. + +.63.1.a + + * Added Custom Mysql Structures. + * Fixed the Copy constructor of class Mysql + * Started adding code so that class Mysql lets it children now when + * it is leaving + * Attempted to compile it into a library but still need help. As + * default it will compile as a regular program. + * Other small fixes. + +.62.a (May 3 1998) + + * Added Template Queries + * Created s separate SQLQuery object that is independent of an SQL + * connection. + * You no longer have to import the data for the test program as the + * program creates the database and tables it needs. + * Many small bug fixes. + +.61.1.a (April 28 1998) + + * Cleaned up the example code in test.cc and included it in the + * manual. + * Added an interface layout plan to the manual. + * Added a reverse iterator. + * Fixed a bug with row.hh (It wasn't being included because of a + * typo). + +.61.0.a + + * Major interface changes. I warned you that the interface may + * change while it is in pre-alpha state and I wasn't kidding. + * Created a new and Separate Query Object. You can no longer execute + * queries from the Mysql object instead you have to create a query + * object with Mysql::query() and use it to execute queries. + * Added the comparison operators to MysqlDate, MysqlTime and + * MysqlDateTime. Fixed a few bugs in the MysqlDate... that effected + * the stream output and the conversion of them to strings. + * Reflected the MysqlDate... changes in the manual. + * Added a new MysqlSet object and a bunch of functions for working + * with mysql set strings. + +.60.3a (April 24 1998) + + * Changed strtoq and strtouq to strtoll and strtull for metter + * compatibility Minor Manual fix. + * Changed makefile to make it more compatible with Solaris (Thanks + * Chris H) + * Fixed bug in comparison functions so that they would compare in he + * right direction. + * Added some items to the to do list be sure to have a look. + Index: README.txt ================================================================== --- README.txt +++ README.txt @@ -1,128 +1,234 @@ -What It Is -~~~~~~~~~~ - MySQL++ is a C++ wrapper for MySQL's C API. It is built around STL - principles, to make dealing with the database as easy as dealing - with an STL container. MySQL++ relieves the programmer of dealing - with cumbersome C data structures, generation of repetitive SQL - statements, and manual creation of C++ data structures to mirror - the database schema. - - Its home page is http://tangentsoft.net/mysql++/ +Visual C++ Version Compatibility +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + MySQL++ is fully functional with Visual C++ 2005 and 2008. + + MySQL++ also works with VC++ 2003 (a.k.a. VC++ 7.1), with the + exception of the SSQLS feature. There was partial support for + SSQLS with VC++ 2003 in MySQL++ v2, but a feature we added in + MySQL++ v3.0 crashes this version of the compiler, so we had to + remove support for it entirely. MySQL++ automatically disables + SSQLS when you build it with VC++ 2003. As long as you avoid + using that feature of the library, you should be fine. + + Older versions of Visual C++ are basically hopeless when it + comes to building current versions of MySQL++. They have too + many weaknesses in their Standard C++ implementation to build a + modern library like MySQL++. If you cannot upgrade your compiler, + my advice is that you're best off programming straight to the + MySQL C API rather than try to make MySQL++ build. + + There are two sets of .sln and .vcproj files shipped with MySQL++: + one for Visual C++ 2003 in the vc2003 subdirectory, and another + set for VC++ 2005 and newer in vc2005. The only difference + between them is that the VC++ 2003 versions omit SSQLS related + files from the build. If you're using VC++ 2008, use the vc2005 + project files; Visual Studio will walk you through the conversion + process, which will do the right thing. Prerequisites ~~~~~~~~~~~~~ - To build MySQL++, you must have the MySQL C API development - files installed. - - On Unixy systems (Linux, Mac OS X, Cygwin, *BSD, Solaris...), - the MySQL development files are installed if you build MySQL - from source. If you installed MySQL as a binary package, then - the development files are often packaged separately from the - MySQL server itself. It's common for the package containing the - development files to be called something like "MySQL-devel". - - If you're building on Windows with Visual C++ or MinGW, you - need to install the native Win32 port of MySQL from mysql.com. - The development files are only included with the "complete" - version of the MySQL installer, and some versions of this - installer won't actually install them unless you do a custom - install. Another pitfall is that MySQL++'s project files assume - that you've installed the current General Availability release of - MySQL (v5.0 right now) and it's installed in the default location. - If you've installed a different version, or if MySQL Inc. changes - the default location (which they seem to do regularly!) you'll have - to adjust the link and include file paths in the project settings. - - -Additional Things to Read -~~~~~~~~~~~~~~~~~~~~~~~~~ - Each major platform we support has a dedicated README-*.txt - file for it containing information specific to that platform. - Please read it. - - For authorship information, see the CREDITS.txt file. - - For license information, see the COPYING.txt file. - - If you want to change MySQL++, see the HACKERS.txt file. - - You should have received a user manual and a reference manual - with MySQL++. If not, you can read a recent version online: - - http://tangentsoft.net/mysql++/doc/ - - Search the MySQL++ mailing list archives if you have more - questions: - - http://lists.mysql.com/plusplus/ - - -Building the Library -~~~~~~~~~~~~~~~~~~~~ - MySQL++ uses Bakefile (http://bakefile.org/) to generate - platform-specific project files and makefiles from a single set - of input files. We currently support these build systems: - - autoconf: - For Unixy platforms, including Linux, Mac OS X, and Cygwin, in - addition to the "real" Unices. See README-Unix.txt for general - instructions. Supplementary platform-specific details are - in README-Cygwin.txt, README-Linux.txt, README-Mac-OS-X.txt, - and README-Solaris.txt. - - MinGW: - We ship Makefile.mingw for MinGW. It currently only builds the - static version of the library for technical reasons. This has - licensing ramifications. See README-MinGW.txt for details. - - Visual C++: - We ship Visual Studio 2003, 2005, and 2008 project files. - No older version of Visual C++ will build MySQL++, due to - compiler limitations. See README-Visual-C++.txt for more - details. - - Xcode: - We ship an Xcode v2 project file. It hasn't been tested - much yet, since the autoconf method works just fine on OS X. - As a result, we need both success and failure reports on the - mailing list. See README-Mac-OS-X.txt for more information. - - -Example Programs -~~~~~~~~~~~~~~~~ - You may want to try out the programs in the examples subdirectory - to ensure that the MySQL++ API and your MySQL database are both - working properly. Also, these examples give many examples of - the proper use of MySQL++. See README-examples.txt for further - details. - - -Unsupported Compliers -~~~~~~~~~~~~~~~~~~~~~ - If you're on Windows but want to use some other compiler besides - Visual C++ or GCC, you are currently on your own. There have - been past efforts to port MySQL++ to other Windows compilers, - but for one reason or another, all of these ports have died. - - On Unixy systems, GCC still works best. "Native" compilers and - third-party compilers may work, but you're on your own to get - it working. - - We have nothing in particular against these unsupported systems. - We just lack the time and resources to support everything - ourselves. If you are sufficiently motivated to get MySQL++ - working on one of these alternate systems, see the HACKERS.txt - file first for guidance. If you follow the advice in that file, - your patch will be more likely to be accepted. - - -If You Want to Hack on MySQL++... -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - If you intend to change the library or example code, please read - the HACKERS.txt file. - - If you want to change the user manual, read doc/userman/README.txt - - If you want to change the reference manual, see the Doxygen manual: - http://www.stack.nl/~dimitri/doxygen/manual.html + You need to have the Windows version of the MySQL server installed + on your development system, even if you always access a MySQL + server on a different machine. This is because in addition to + installing the server itself, the official MySQL Windows binaries + also install the client-side development files that MySQL++ + needs in order to communicate with a MySQL server. + + You have to do a Custom install to enable installation of these + development files. If you get an error about mysql-version.h or + mysql.h when building MySQL++, go back and reinstall the MySQL + server, paying careful attention to the options. + + If you've installed the development files and are still getting + header file include errors, read on. + + +Building the Library and Example Programs +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + If you installed the MySQL server somewhere other than + + C:\Program Files\MySQL\MySQL Server 5.0\ + + you need to change the project file settings. If you're willing to + install Bakefile (see below), you can do this quickly by changing + the variable MYSQL_WIN_DIR at the top of the file mysql++.bkl, + then regenerating the project files by running rebake.bat. + Otherwise, you'll need to change the include and library paths + in all of the project files by hand. + + You must build both the Debug and Release versions of the library, + because a release build of your program won't work with a Debug + version of the MySQL++ DLL. Since version 3.0, the VC++ build + of MySQL++ names these two DLLs differently: mysqlpp_d.dll for + the Debug version, and mysqlpp.dll for the Release version. + This lets you keep them in the same PATH directory, without a + concern as to whether the correct one will be used. + + With the library built, run at least the resetdb and simple1 + examples to ensure that the library is working correctly. + In addition to the other generic examples, there are a few + Visual C++ specific examples that you might want to look at in + examples\vstudio. See README-examples.txt for further details. + + Once you're sure the library is working correctly, you can run + the install.hta file at the project root to install the library + files and headers in a directory of your choosing. + + (Aside: You may not have come across the .hta extension before. + It's for a rarely-used feature of Microsoft's Internet Explorer, + called HTML Applications. Know what Adobe AIR is? Kinda like + that, only without the compilation into a single binary blob, + the cross-platform compatibility, and the power of Flash and + ActionScript 3. These limitations don't cause a problem here. + In fact, AIR would be vast overkill here. Just open install.hta + in a text editor to see how it works.) + + +Using MySQL++ in an MFC Project +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + If you don't already have a project set up, open Visual Studio, + say File > New > Project, then choose Visual C++ > MFC > MFC + Application. Go through the wizard setting up the project as + you see fit. + + Once you have your project open, right click on your top-level + executable in the Solution Explorer, choose Properties, and make + the following changes. (Where it doesn't specify Debug or Release, + make the same change to both configurations.) + + o Append the following to C/C++ > General > Additional Include + Directories: + + C:\Program Files\MySQL\MySQL Server 5.0\include, + C:\mysql++\include + + o Under C/C++ > Code Generation change "Runtime Library" to + "Multi-threaded Debug DLL (/MDd)" for the Debug + configuration. For the Release configuration, make it + "Multi-threaded DLL (/MD)". + + o Append the following to Linker > General > Additional Library + Directories for the Debug configuration: + + C:\Program Files\MySQL\MySQL Server 5.0\lib\debug, + C:\mysql++\vc\debug + + For the Release configuration, make it the same, but + change the 'debug' directory names to 'opt'. + + o Under Linker > Input add the following to "Additional + Dependencies" for the Debug configuration: + + libmysql.lib wsock32.lib mysqlpp_d.lib + + ...and then for the Release configuration: + + libmysql.lib wsock32.lib mysqlpp.lib + + This difference is because MySQL++'s Debug DLL and import + library have a _d suffix so you can have both in the same + directory without conflicts. + + You may want to study examples\vstudio\mfc\mfc.vcproj to see + this in action. Note that some of the paths will be different, + because it can use relative paths for mysqlpp.dll. + + +Using MySQL++ in a Windows Forms C++/CLI Project +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Before you start work on getting MySQL++ working with your own + program, you need to make some changes to the MySQL++ build + settings. Open mysqlpp.sln, then right-click on the mysqlpp + target and select Properties. Make the following changes for + both the Debug and Release configurations: + + o Under Configuration Properties > General, change "Common + Language Runtime support" to the /clr setting. + + o Under C/C++ > Code Generation, change "Enable C++ Exceptions" + from "Yes (/EHsc)" to "Yes With SEH Exceptions (/EHa)" + + If you have already built MySQL++, be sure to perform a complete + rebuild after changing these options. The compiler will emit + several C4835 warnings after making those changes, which are + harmless when using the DLL with a C++/CLI program, but which + warn of real problems when using it with unmanaged C++. This is + why MySQL++'s Windows installer (install.hta) offers the option + to install the CLR version into a separate directory; use it if + you need both managed and unmanaged versions installed! + + For the same reason, you might give some thought about where you + install mysqlpp.dll on your end user's machines when distributing + your program. My recommendation is to install it in the same + directory as the .exe file that uses it, rather than installing + into a system directory where it could conflict with a mysqlpp.dll + built with different settings. + + Once you have MySQL++ built with CLR support, open your program's + project. If you don't already have a project set up, open Visual + Studio, say File > New > Project, then choose Visual C++ > CLR > + Windows Forms Application. Go through the wizard setting up the + project as you see fit. + + The configuration process isn't much different from that for an + MFC project, so go through the list above first. Then, make the + following changes particular to .NET and C++/CLI: + + o Under Configuration Properties > General change the setting + from /clr:pure to /clr. (You need mixed assembly support + to allow a C++/CLI program to use a plain C++ library + like MySQL++.) + + o For the Linker > Input settings, you don't need wsock32.lib. + The mere fact that you're using .NET takes care of that + dependency for you. + + In the MFC instructions above, it said that you need to build it + using the Multi-threaded DLL version of the C++ Runtime Library. + That's not strictly true for MFC, but it's an absolute requirement + for C++/CLI. See the Remarks in this MSDN article for details: + + http://msdn2.microsoft.com/en-us/library/k8d11d4s.aspx + + You may want to study examples\vstudio\wforms\wforms.vcproj to + see all this in action. Note that some of the paths will be + different, because it can use relative paths for mysqlpp_d.dll + and mysqlpp.dll. + + +Working With Bakefile +~~~~~~~~~~~~~~~~~~~~~ + MySQL++'s top-level Visual Studio project files aren't + maintained directly. Instead, we use a tool called Bakefile + (http://bakefile.org/) to generate many different project file + and Makefile types from a single set of source files. There is + a native Windows version of Bakefile up on that web site. + Download that and put the directory containing bakefile_gen.exe + in your Windows PATH. + + Bakefile generates the various project files and Makefiles from + a single source file, mysql++.bkl. This is usually the file you + need to change when you want to make some change to the MySQL++ + build system. + + While Bakefile's documentation isn't as comprehensive as it + ought to be, you can at least count on it to list all of the + available features. So, if you can't see a way to make Bakefile + do something, it's likely it just can't do it. Bakefile is a + high-level abstraction of build systems in general, so it'll never + support all the particulars of every odd build system out there. + + Once you've made your changes, you can generate the Visual C++ + project files by running rebake.bat, which you can find in the + same directory as this file. + + +If You Run Into Problems... +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Especially if you have linking problems, make sure your project + settings match the above. Visual C++ is very picky about things + like run time library settings. When in doubt, try running one + of the example programs. If it works, the problem is likely in + your project settings, not in MySQL++. + Index: abi.xml.in ================================================================== --- abi.xml.in +++ abi.xml.in @@ -1,9 +1,123 @@ - - @MYSQLPP_VERSION_MAJOR@.@MYSQLPP_VERSION_MINOR@.@MYSQLPP_VERSION_BUGFIX@ - - - lib - - - . - +# This file 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. +# +# This program 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 + +# Standard autotools stuff +AC_INIT(mysql++, 3.2.2, plusplus@lists.mysql.com, mysql++) +AC_CONFIG_HEADER(config.h) +AC_CONFIG_MACRO_DIR([config]) +AC_CANONICAL_SYSTEM + + +# Enable libtool to decide shared library compile flags (ie -fPIC) +AC_PROG_LIBTOOL +AC_SUBST([LIBTOOL_DEPS]) + + +# Break package version up into major, minor and bugfix components. +MYSQLPP_VERSION_MAJOR=`echo $PACKAGE_VERSION | cut -f1 -d.` +AC_SUBST(MYSQLPP_VERSION_MAJOR) +MYSQLPP_VERSION_MINOR=`echo $PACKAGE_VERSION | cut -f2 -d.` +AC_SUBST(MYSQLPP_VERSION_MINOR) +MYSQLPP_VERSION_BUGFIX=`echo $PACKAGE_VERSION | cut -f3 -d.` +AC_SUBST(MYSQLPP_VERSION_BUGFIX) + + +# Check for Standard C support +AC_PROG_CC +AC_HEADER_STDC + + +# Figure out whether/how to handle threading support, if available. +AC_ARG_ENABLE(thread-check, + [ --enable-thread-check Check for threads, and use if available. ], + [ thread_check=yes ]) +if test "x$thread_check" = "xyes" +then + ACX_PTHREAD + LIBS="$PTHREAD_LIBS $LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + CC="$PTHREAD_CC" + AC_CHECK_HEADERS(synch.h) + AC_CHECK_HEADERS(unistd.h) +fi + + +# Let caller provide -f to lib/*.pl scripts in a uniform way +AC_ARG_WITH([field-limit], + AS_HELP_STRING([--with-field-limit=], + [set max template query and SSQLS field count]), + [], []) +if test -n "$with_field_limit" +then + ( cd lib ; + ./querydef.pl -f $with_field_limit ; + ./ssqls.pl -f $with_field_limit + ) +fi + + +# Try to find local getopt(); if we fail, we'll use the one in lib/cmdline.* +AC_CHECK_FUNC(getopt, + [AC_DEFINE(HAVE_POSIX_GETOPT, [], Define if getopt() is available in unistd.h)], + [AC_CHECK_LIB(iberty, getopt, + [AC_DEFINE(HAVE_LIBIBERTY_GETOPT, [], Define if getopt() is available in libiberty.h)], + [])]) + + +# Checks for libraries and local system features +LIB_MATH +LIB_SOCKET_NSL +MYSQL_C_API_LOCATION +MYSQL_WITH_SSL +AX_C_LOCALTIME_R +AC_CHECK_LIB(intl, main) + + +# If this is Cygwin, add a linker flag to suppress a silly link message. +case "${host}" in + *cygwin*) + LDFLAGS="$LDFLAGS -Wl,--enable-auto-import" + ;; +esac + + +# Check for Standard C++ support, and extensions. This must be near +# the end, because the CPLUSPLUS directive makes autoconf use C++ +# compiler for all subsequent tests! +AC_PROG_CXX +AC_LANG_CPLUSPLUS +STL_SLIST_EXTENSION + + +# Include Bakefile macros +AC_BAKEFILE([m4_include(config/autoconf_inc.m4)]) + + +# +# Configure process complete; write out files generated from *.in. +# +AC_OUTPUT([\ + doc/userman/userman.dbx \ + install.hta \ + lib/Doxyfile \ + lib/mysql++.h \ + ssx/Doxyfile \ + abi.xml \ + mysql++.spec \ + Makefile \ + version +]) +chmod +x version + Index: bmark.txt ================================================================== --- bmark.txt +++ bmark.txt @@ -1,257 +1,105 @@ -All unit tests passed ----------------- BEGIN resetdb OUTPUT ---------------- -Connecting to database server... -Dropping existing sample data tables... -Creating stock table... -Populating stock table...inserted 4 rows. -Creating empty images table... -Creating deadlock testing tables... -Reinitialized sample database successfully. -================ END resetdb OUTPUT ================ - ----------------- BEGIN simple1 OUTPUT ---------------- -We have: - Nürnberger Brats - Pickle Relish - Hot Mustard - Hotdog Buns -================ END simple1 OUTPUT ================ - ----------------- BEGIN simple2 OUTPUT ---------------- -Item Num Weight Price Date - -Nürnberger Brats 97 1.5 8.79 2005-03-10 -Pickle Relish 87 1.5 1.75 1998-09-04 -Hot Mustard 73 0.95 0.97 1998-05-25 -Hotdog Buns 65 1.1 1.10 1998-04-23 -================ END simple2 OUTPUT ================ - ----------------- BEGIN simple3 OUTPUT ---------------- -Item Num Weight Price Date - -Nürnberger Brats 97 1.5 8.79 2005-03-10 -Pickle Relish 87 1.5 1.75 1998-09-04 -Hot Mustard 73 0.95 0.97 1998-05-25 -Hotdog Buns 65 1.1 1.10 1998-04-23 -================ END simple3 OUTPUT ================ - ----------------- BEGIN store_if OUTPUT ---------------- -Records found: 2 - -Item Num Weight Price Date - -Nürnberger Brats 97 1.5 8.79 2005-03-10 -Hot Mustard 73 0.95 0.97 1998-05-25 -================ END store_if OUTPUT ================ - ----------------- BEGIN for_each OUTPUT ---------------- -There are 322 items weighing 416.85 stone and costing 1147.19 cowrie shells. -================ END for_each OUTPUT ================ - ----------------- BEGIN multiquery OUTPUT ---------------- -Multi-query: -DROP TABLE IF EXISTS test_table; CREATE TABLE test_table(id INT); INSERT INTO test_table VALUES(10); UPDATE test_table SET id=20 WHERE id=10; SELECT * FROM test_table; DROP TABLE test_table -Result set 0 is empty. -Result set 1 is empty. -Result set 2 is empty. -Result set 3 is empty. -Result set 4 has 1 row: - +----+ - | id | - +----+ - | 20 | - +----+ -Result set 5 is empty. -Stored procedure query: -DROP PROCEDURE IF EXISTS get_stock; CREATE PROCEDURE get_stock( i_item varchar(20) ) BEGIN SET i_item = concat('%', i_item, '%'); SELECT * FROM stock WHERE lower(item) like lower(i_item); END; -Result set 0 is empty. -Result set 1 is empty. -Query: CALL get_stock('relish') -Result set 0 has 1 row: - +---------------+-----+--------+-------+------------+-------------+ - | item | num | weight | price | sdate | description | - +---------------+-----+--------+-------+------------+-------------+ - | Pickle Relish | 87 | 1.5 | 1.75 | 1998-09-04 | NULL | - +---------------+-----+--------+-------+------------+-------------+ -Result set 1 is empty. -================ END multiquery OUTPUT ================ - ----------------- BEGIN tquery1 OUTPUT ---------------- -Query: select * from stock -Records found: 4 - -Item Num Weight Price Date - -Nuerenberger Bratwurst 97 1.5 8.79 2005-03-10 -Pickle Relish 87 1.5 1.75 1998-09-04 -Hot Mustard 73 0.95 0.97 1998-05-25 -Hotdog Buns 65 1.1 1.1 1998-04-23 -================ END tquery1 OUTPUT ================ - ----------------- BEGIN resetdb OUTPUT ---------------- -Connecting to database server... -Dropping existing sample data tables... -Creating stock table... -Populating stock table...inserted 4 rows. -Creating empty images table... -Creating deadlock testing tables... -Reinitialized sample database successfully. -================ END resetdb OUTPUT ================ - ----------------- BEGIN tquery2 OUTPUT ---------------- -Query: select * from stock -Records found: 4 - -Item Num Weight Price Date - -Nuerenberger Bratwurst 97 1.5 8.79 2005-03-10 -Pickle Relish 87 1.5 1.75 1998-09-04 -Hot Mustard 73 0.95 0.97 1998-05-25 -Hotdog Buns 65 1.1 1.1 1998-04-23 -================ END tquery2 OUTPUT ================ - ----------------- BEGIN tquery3 OUTPUT ---------------- -Stuff we have a lot of in stock: - Nuerenberger Bratwurst - Pickle Relish -================ END tquery3 OUTPUT ================ - ----------------- BEGIN tquery4 OUTPUT ---------------- -Query: update stock set num = 70 where num < 70 -Query: select * from stock -Records found: 4 - -Item Num Weight Price Date - -Nuerenberger Bratwurst 97 1.5 8.79 2005-03-10 -Pickle Relish 87 1.5 1.75 1998-09-04 -Hot Mustard 73 0.95 0.97 1998-05-25 -Hotdog Buns 70 1.1 1.1 1998-04-23 - -Query: select * from stock where weight > 1.2 or description like '%Mustard%' -Records found: 3 - -Item Num Weight Price Date - -Nuerenberger Bratwurst 97 1.5 8.79 2005-03-10 -Pickle Relish 87 1.5 1.75 1998-09-04 -Hot Mustard 73 0.95 0.97 1998-05-25 -================ END tquery4 OUTPUT ================ - ----------------- BEGIN resetdb OUTPUT ---------------- -Connecting to database server... -Dropping existing sample data tables... -Creating stock table... -Populating stock table...inserted 4 rows. -Creating empty images table... -Creating deadlock testing tables... -Reinitialized sample database successfully. -================ END resetdb OUTPUT ================ - ----------------- BEGIN ssqls1 OUTPUT ---------------- -We have: - Nürnberger Brats - Pickle Relish - Hot Mustard (good American yellow mustard, not that European stuff) - Hotdog Buns -================ END ssqls1 OUTPUT ================ - ----------------- BEGIN ssqls2 OUTPUT ---------------- -Query: INSERT INTO `stock` (`item`,`num`,`weight`,`price`,`sDate`,`description`) VALUES ('Hot Dogs',100,1.5,NULL,'1998-09-25',NULL) -Query: select * from stock -Records found: 5 - -Item Num Weight Price Date - -Nürnberger Brats 97 1.5 8.79 2005-03-10 -Pickle Relish 87 1.5 1.75 1998-09-04 -Hot Mustard 73 0.95 0.97 1998-05-25 -Hotdog Buns 65 1.1 1.1 1998-04-23 -Hot Dogs 100 1.5 (NULL) 1998-09-25 -================ END ssqls2 OUTPUT ================ - ----------------- BEGIN ssqls3 OUTPUT ---------------- -Query: UPDATE `stock` SET `item` = 'Nuerenberger Bratwurst',`num` = 97,`weight` = 1.5,`price` = 8.7899999999999991,`sDate` = '2005-03-10',`description` = NULL WHERE `item` = 'Nürnberger Brats' -Query: select * from stock -Records found: 5 - -Item Num Weight Price Date - -Nuerenberger Bratwurst 97 1.5 8.79 2005-03-10 -Pickle Relish 87 1.5 1.75 1998-09-04 -Hot Mustard 73 0.95 0.97 1998-05-25 -Hotdog Buns 65 1.1 1.1 1998-04-23 -Hot Dogs 100 1.5 (NULL) 1998-09-25 -================ END ssqls3 OUTPUT ================ - ----------------- BEGIN ssqls4 OUTPUT ---------------- -Records found: 5 - -Item Num Weight Price Date - -Hot Dogs 100 1.5 (NULL) 1998-09-25 -Hot Mustard 73 0.95 0.97 1998-05-25 -Hotdog Buns 65 1.1 1.1 1998-04-23 -Nuerenberger Bratwurst 97 1.5 8.79 2005-03-10 -Pickle Relish 87 1.5 1.75 1998-09-04 - -Currently 65 hotdog buns in stock. -================ END ssqls4 OUTPUT ================ - ----------------- BEGIN ssqls5 OUTPUT ---------------- -Custom query: -select * from stock where `weight` = 1.5 and `price` = 8.7899999999999991 -================ END ssqls5 OUTPUT ================ - ----------------- BEGIN ssqls6 OUTPUT ---------------- -Query: select * from stock -Records found: 26 - -Item Num Weight Price Date - -Tiny Screws 1000 0.01 0.05 2008-11-11 -Needle-nose Pliers 50 0.5 5.95 2008-11-12 -Small Soldering Iron 40 0.5 15.95 2008-09-01 -Large Soldering Iron 35 0.75 24.95 2008-08-01 -Solder Wick 100 0.1 2.95 2008-04-01 -Mini Screwdrivers, 3 pc. 30 0.4 8.95 2008-03-25 -Mini Screwdrivers, 6 pc. 40 0.6 12.95 2008-04-01 -Wire-wrapping Tool 25 0.2 4.95 2008-04-23 -Red LED, 5mm, 3000mcd 300 0.01 0.29 2008-10-02 -Orange LED, 5mm, 2500mcd 250 0.01 0.29 2008-07-31 -Yellow LED, 5mm, 3000mcd 400 0.01 0.25 2008-09-30 -Green LED, 5mm, 1000mcd 350 0.01 0.45 2008-09-27 -Blue LED, 5mm, 3900mcd 500 0.01 0.34 2007-12-01 -White LED, 5mm, 15000mcd 750 0.01 0.43 2008-02-01 -AA Battery, single 220 0.05 0.5 2007-09-19 -AA Battery, 4-pack 60 0.2 1.79 2007-08-03 -AA Battery, 24-pack 8 1.2 9.99 2007-04-25 -C Battery, single 100 0.075 0.65 2007-11-14 -C Battery, 4-pack 25 0.3 2.29 2007-06-05 -C Battery, 24-pack 5 1.8 10.99 2007-06-13 -D Battery, single 180 0.08 0.7 2007-12-03 -D Battery, 4-pack 45 0.3 2.59 2007-04-01 -D Battery, 24-pack 12 1.9 11.99 2007-05-15 -9-volt Battery, single 90 0.06 0.75 2008-01-02 -9-volt Battery, 3-pack 17 0.2 1.99 2008-02-28 -9-volt Batter, 20-pack 12 1.2 12.99 2007-12-28 -================ END ssqls6 OUTPUT ================ - ----------------- BEGIN load_jpeg OUTPUT ---------------- -Inserted "NULL" into images table, 0 bytes, ID 1 -================ END load_jpeg OUTPUT ================ - ----------------- BEGIN cgi_jpeg OUTPUT ---------------- -Content-type: text/plain - -No image content! -================ END cgi_jpeg OUTPUT ================ - ---- BEGIN ssqlsxlat -i examples/common.ssqls -o ERROR OUTPUT --- -==== END ssqlsxlat -i examples/common.ssqls -o ERROR OUTPUT ==== ---- BEGIN ssqlsxlat -i examples/stock.ssqls -o ERROR OUTPUT --- -==== END ssqlsxlat -i examples/stock.ssqls -o ERROR OUTPUT ==== ---- BEGIN ssqlsxlat -i test/test1.ssqls -o ERROR OUTPUT --- -==== END ssqlsxlat -i test/test1.ssqls -o ERROR OUTPUT ==== ---- BEGIN ssqlsxlat -i test/test2.ssqls -o ERROR OUTPUT --- -==== END ssqlsxlat -i test/test2.ssqls -o ERROR OUTPUT ==== +/*********************************************************************** + test/cpool.cpp - Tests the ConnectionPool class. + + Copyright (c) 2007-2008 by Educational Technology Resources, Inc. and + (c) 2007 by Jonathan Wakely. Others may also hold copyrights on + code in this file. See the CREDITS.txt 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 +#include + +#include + +#if defined(MYSQLPP_PLATFORM_WINDOWS) +# define SLEEP(n) Sleep((n) * 1000) +#else +# include +# define SLEEP(n) sleep(n) +#endif + +using namespace std; + +class TestConnection : public mysqlpp::Connection +{ +public: + TestConnection() : itime_(time(0)) { } + time_t instantiation_time() const { return itime_; } + +private: + time_t itime_; +}; + + +class TestConnectionPool : public mysqlpp::ConnectionPool +{ +public: + ~TestConnectionPool() { clear(); } + + unsigned int max_idle_time() { return 1; } + +private: + TestConnection* create() { return new TestConnection; } + void destroy(mysqlpp::Connection* cp) { delete cp; } +}; + + +int +main() +{ + TestConnectionPool pool; + + mysqlpp::Connection* conn1 = pool.grab(); + mysqlpp::Connection* conn2 = pool.grab(); + if (conn1 == conn2) { + cerr << "Pool returned the same connection twice!" << endl; + return 1; + } + + pool.release(conn2); + mysqlpp::Connection* conn3 = pool.grab(); + if (conn2 != conn3) { + cerr << "conn2 should have been reused but wasn't!" << endl; + return 1; + } + + time_t itime_c1 = dynamic_cast(conn1)-> + instantiation_time(); + pool.release(conn1); + SLEEP(pool.max_idle_time() + 1); + mysqlpp::Connection* conn4 = pool.grab(); + time_t itime_c4 = dynamic_cast(conn4)-> + instantiation_time(); + if (itime_c1 == itime_c4) { + cerr << "conn1 should have been destroyed but wasn't!" << endl; + return 1; + } + + pool.release(conn3); + pool.release(conn4); + pool.shrink(); + if (!pool.empty()) { + cerr << "Shrunken pool is not empty!" << endl; + return 1; + } + + return 0; +} Index: bootstrap ================================================================== --- bootstrap +++ bootstrap @@ -1,119 +1,55 @@ -#!/bin/bash - -ARGS=1 -BF_OPTIONS= -MAINT_FLAGS="--cache-file=config.cache" -while [ $ARGS != 0 ] -do - case "$1" in - bat) - cmd /c bootstrap.bat $BF_OPTIONS - exit 0 - ;; - - nodoc) - BF_OPTIONS="-DBUILDDOCS=no $BF_OPTIONS" - shift - ;; - - noex) - BF_OPTIONS="-DBUILDEXAMPLES=no $BF_OPTIONS" - shift - ;; - - nolib) - BF_OPTIONS="-DBUILDLIBRARY=no $BF_OPTIONS" - shift - ;; - - nomaint) - MAINT_FLAGS= - shift - ;; - - noopt) - export CXXFLAGS="-g -O0" - shift - ;; - - pedantic) - export CXXFLAGS="-g -O2 -ansi -pedantic -Wall -Wextra -W -Wold-style-cast -Wfloat-equal -Wwrite-strings -Wno-overloaded-virtual -Wno-long-long -Wno-variadic-macros -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC" - shift - ;; - - *) - ARGS=0 - ;; - esac -done - -# Check for existence of needed tools, so we can give a better error -# message than the shell will. -tools="make" # POSIX -tools="$tools aclocal autoconf autoheader libtoolize" # autotools -tools="$tools bakefile bakefilize bakefile_gen" # Bakefile -for tool in $tools -do - if ! type -p $tool > /dev/null - then - echo "FAILED to find build tool '$tool'!" - echo - echo BOOTSTRAP FAILED! - echo - exit 1 - fi -done - -# Find location of Bakefile's stock M4 autoconf macros -for d in /usr/share/aclocal /usr/local/share/aclocal \ - '/c/Program Files (x86)/Bakefile/autoconf' -do - BAKEFILE_M4="$d" - if [ -e "$BAKEFILE_M4/bakefile.m4" ] ; then break ; fi -done -if [ ! -e "$BAKEFILE_M4/bakefile.m4" ] -then - echo - echo "Failed to find bakefile.m4. Add the directory containing" - echo "this to the bootstrap script." - echo - exit 1 -fi - -# Do Bakefile stuff first. Autoconf can't succeed without -# autoconf_in.m4, which Bakefile creates. -success= -set -x && - for d in 3 5 8 ; do mkdir -p vc200$d ; done && - bakefilize && - rm -f INSTALL && - bakefile_gen $BF_OPTIONS && - bakefile -f gnu -o Makefile.simple -DBUILDLIBRARY=no mysql++.bkl && - set +x && - success=shonuff - -# Do the autotools stuff if Bakefile steps succeeded -if [ -n "$success" ] -then - rm -f config.cache - mv autoconf_inc.m4 config > /dev/null 2>&1 # don't care if it fails - set -x && - aclocal -I config -I "$BAKEFILE_M4" && - libtoolize && - autoheader && - autoconf && - ./configure $MAINT_FLAGS $* && - make lib/querydef.h lib/ssqls.h && - set +x && - success=awyeah -fi - -# Detect failure in any part of above -if [ -z "$success" ] -then - echo - echo BOOTSTRAP FAILED! - echo - exit 1 -fi - + + +%xinclude; +]> +
+ + MySQL++ v3.2.1 User Manual + + + + Kevin + Atkinson + + + + Sinisa + Milivojevic + + + + Monty + Widenius + + + + Warren + Young + + + + + 1998-2001, 2005-2010 + Kevin Atkinson (original author) + MySQL AB + Educational Technology Resources + + + + + + + + + + + + + + + + + +
Index: bootstrap.bat ================================================================== --- bootstrap.bat +++ bootstrap.bat @@ -1,63 +1,85 @@ -@echo off -if not exist vc2003 mkdir vc2003 -if not exist vc2005 mkdir vc2005 -if not exist vc2008 mkdir vc2008 - -bakefile_gen %* -if errorlevel 1 exit -if not exist vc2003\mysql++.sln goto no_bakefile -if not exist vc2005\mysql++.sln goto no_bakefile -if not exist vc2008\mysql++.sln goto no_bakefile - -cd lib -perl querydef.pl -if errorlevel 1 exit -if not exist querydef.h goto no_perl -perl ssqls.pl -if errorlevel 1 exit -if not exist ssqls.h goto no_perl - -if not exist mysql++.h goto no_mysqlpp_h -cd .. - -exit - -:no_bakefile -echo. -echo Bakefile doesn't seem to be installed on this system. Download it -echo from http://bakefile.org/ You need version 0.2.3 or newer. -echo. -exit - -:no_perl -echo. -echo You need a Perl interpreter installed on your system, somewhere in -echo the PATH. Any recent version or flavor should work; we don't use -echo any special extensions. The easiest to install on Windows would be -echo ActivePerl, from http://activestate.com/Products/activeperl/ -echo If you're familiar with Unix, you might like Cygwin better instead: -echo http://cygwin.com/setup.exe -echo. -cd .. -exit - -:no_mysqlpp_h -echo. -echo WARNING: Can't make lib/mysql++.h -echo. -echo On Unixy systems, autoconf creates lib/mysql++.h from lib/mysql++.h.in -echo but there is no easy way to do this on Windows. You can do it manually: -echo just copy the file to the new name, and edit the MYSQLPP_HEADER_VERSION -echo definition to put the proper version number parts into the macro. It -echo needs to look something like this: -echo. -echo #define MYSQLPP_HEADER_VERSION MYSQLPP_VERSION(3, 0, 0) -echo. -echo It's important that the three numbers match the actual library version -echo number, or else programs that check this (like resetdb) will fail. -echo. -echo Alternately, if you've also got MySQL++ installed on some Unixy type -echo system, you can let its bootstrap procedure create mysql++.h and then -echo copy it to the Windows machine. -echo. -cd .. +/*********************************************************************** + simple2.cpp - Retrieves the entire contents of the sample stock table + using a "store" query, and prints it out. + + Copyright (c) 1998 by Kevin Atkinson, (c) 1999-2001 by MySQL AB, and + (c) 2004-2007 by Educational Technology Resources, Inc. Others may + also hold copyrights on code in this file. See the CREDITS.txt 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 "cmdline.h" +#include "printdata.h" + +#include + +#include +#include + +using namespace std; + +int +main(int argc, char *argv[]) +{ + // Get database access parameters from command line + const char* db = 0, *server = 0, *user = 0, *pass = ""; + if (!parse_command_line(argc, argv, &db, &server, &user, &pass)) { + return 1; + } + + // Connect to the sample database. + mysqlpp::Connection conn(false); + if (conn.connect(db, server, user, pass)) { + // Retrieve the sample stock table set up by resetdb + mysqlpp::Query query = conn.query("select * from stock"); + mysqlpp::StoreQueryResult res = query.store(); + + // Display results + if (res) { + // Display header + cout.setf(ios::left); + cout << setw(31) << "Item" << + setw(10) << "Num" << + setw(10) << "Weight" << + setw(10) << "Price" << + "Date" << endl << endl; + + // Get each row in result set, and print its contents + for (size_t i = 0; i < res.num_rows(); ++i) { + cout << setw(30) << res[i]["item"] << ' ' << + setw(9) << res[i]["num"] << ' ' << + setw(9) << res[i]["weight"] << ' ' << + setw(9) << res[i]["price"] << ' ' << + setw(9) << res[i]["sdate"] << + endl; + } + } + else { + cerr << "Failed to get stock table: " << query.error() << endl; + return 1; + } + + return 0; + } + else { + cerr << "DB connection failed: " << conn.error() << endl; + return 1; + } +} Index: cleanmf ================================================================== --- cleanmf +++ cleanmf @@ -1,3 +1,23890 @@ -#!/bin/sh -rm -f Makefile* -rm -rf *.xcodeproj vc200? + +// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +// This file is generated by the Perl script ssqls.pl. Do not modify +// it directly. Change the script instead. +// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +#if !defined(MYSQLPP_SSQLS_H) +#define MYSQLPP_SSQLS_H + +#include "noexceptions.h" +#include "sql_types.h" + +#if !defined(MYSQLPP_SSQLS_COMPATIBLE) +# error Your compiler is not compatible with the SSQLS feature! +#endif + +#include + +#include + +// Smallest difference between two floating point numbers recognized +// in making comparisons. If the absolute delta is under this +// threshold, the two values are considered equal. You can either +// override this permanently by changing ssqls.pl, or you can do it +// on a case-by-case basis at compile time by defining this to another +// value before #including this header. +#if !defined(MYSQLPP_FP_MIN_DELTA) +# define MYSQLPP_FP_MIN_DELTA 0.00001 +#endif + +namespace mysqlpp { + +enum sql_dummy_type { sql_dummy }; + +#ifdef MYSQLPP_SSQLS_NO_STATICS +# define MYSQLPP_SSQLS_CONDITIONAL_STATICS(...) +#else +# define MYSQLPP_SSQLS_CONDITIONAL_STATICS(...) __VA_ARGS__ +#endif + + +inline int sql_cmp(const Date& a, const Date& b) +{ + return a.compare(b); +} + +inline int sql_cmp(const DateTime& a, const DateTime& b) +{ + return a.compare(b); +} + +inline int sql_cmp(const Time& a, const Time& b) +{ + return a.compare(b); +} + +inline int sql_cmp(const String& a, const String& b) +{ + return a.compare(b); +} + +inline int sql_cmp(const std::string& a, const std::string& b) +{ + return a.compare(b); +} + +inline int sql_cmp(signed char a, signed char b) +{ + return a - b; +} + +inline int sql_cmp(unsigned char a, unsigned char b) +{ + return a - b; +} + +inline int sql_cmp(sql_tinyint a, sql_tinyint b) +{ + return a - b; +} + +inline int sql_cmp(sql_tinyint_unsigned a, sql_tinyint_unsigned b) +{ + return a - b; +} + +inline int sql_cmp(signed int a, signed int b) +{ + return a - b; +} + +inline int sql_cmp(unsigned a, unsigned b) +{ + return a - b; +} + +inline int sql_cmp(signed short a, signed short b) +{ + return a - b; +} + +inline int sql_cmp(unsigned short a, unsigned short b) +{ + return a - b; +} + +inline int sql_cmp(signed long a, signed long b) +{ + return a - b; +} + +inline int sql_cmp(unsigned long a, unsigned long b) +{ + return a - b; +} + +inline int sql_cmp(longlong a, longlong b) +{ + if (a == b) return 0; + if (a < b) return -1; + return 1; +} + +inline int sql_cmp(ulonglong a, ulonglong b) +{ + if (a == b) return 0; + if (a < b) return -1; + return 1; +} + +inline int sql_cmp(double a, double b) +{ + if (fabs(a - b) < MYSQLPP_FP_MIN_DELTA) return 0; + if (a < b) return -1; + return 1; +} + +inline int sql_cmp(float a, float b) +{ + if (fabs(a - b) < MYSQLPP_FP_MIN_DELTA) return 0; + if (a < b) return -1; + return 1; +} + +template +inline int sql_cmp(const mysqlpp::Null& a, const mysqlpp::Null& b) +{ + if (a == b) return 0; + if (a < b) return -1; + return 1; +} + + +// --------------------------------------------------- +// Begin Mandatory Compare +// --------------------------------------------------- + +#define sql_compare_define(NAME) \ + bool operator == (const NAME &other) const \ + {return sql_compare_##NAME(*this,other) == 0;} \ + bool operator != (const NAME &other) const \ + {return sql_compare_##NAME(*this,other) != 0;} \ + bool operator > (const NAME &other) const \ + {return sql_compare_##NAME(*this,other) > 0;} \ + bool operator < (const NAME &other) const \ + {return sql_compare_##NAME(*this,other) < 0;} \ + bool operator >= (const NAME &other) const \ + {return sql_compare_##NAME(*this,other) >= 0;} \ + bool operator <= (const NAME &other) const \ + {return sql_compare_##NAME(*this,other) <= 0;} \ + int cmp (const NAME &other) const \ + {return sql_compare_##NAME(*this,other);} \ + int compare (const NAME &other) const \ + {return sql_compare_##NAME(*this,other);} + +#define sql_compare_define_0(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) + +#define sql_construct_define_0(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) + +#define sql_COMPARE__0(NAME, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19, C20, C21, C22, C23, C24, C25) + +#define sql_compare_type_def_0(NAME, WHAT, NUM) \ + sql_compare_type_def_##NUM(NAME, WHAT, NUM) + +#define sql_compare_type_defe_0(NAME, WHAT, NUM) \ + sql_compare_type_defe_##NUM(NAME, WHAT, NUM) + +// --------------------------------------------------- +// End Mandatory Compare +// --------------------------------------------------- + +// --------------------------------------------------- +// Begin Compare 1 +// --------------------------------------------------- + +#define sql_compare_define_1(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + NAME(const T1 &p1) : C1 (p1) {} \ + void set (const T1 &p1) { \ + C1 = p1;\ + \ + } \ + sql_compare_define(NAME) + +#define sql_construct_define_1(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + void set (const T1 &p1) { \ + C1 = p1;\ + \ + } \ + NAME(const T1 &p1) : C1 (p1), table_override_(0) {} + +#define sql_compare_type_def_1(NAME, WHAT, NUM) \ + return WHAT##_list(d, m, true) + +#define sql_compare_type_defe_1(NAME, WHAT, NUM) \ + return WHAT##_list(d, c, m, true) + +#define sql_COMPARE__1(NAME, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19, C20, C21, C22, C23, C24, C25) \ + template \ + int sql_compare_##NAME(const NAME &x, const NAME &y) { \ + return mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + } \ + template \ + int compare (const NAME &x, const NAME &y) { \ + return mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + } + +// --------------------------------------------------- +// End Compare 1 +// --------------------------------------------------- + + +// --------------------------------------------------- +// Begin Compare 2 +// --------------------------------------------------- + +#define sql_compare_define_2(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + NAME(const T1 &p1, const T2 &p2) : C1 (p1), C2 (p2) {} \ + void set (const T1 &p1, const T2 &p2) { \ + C1 = p1;\ + C2 = p2;\ + \ + } \ + sql_compare_define(NAME) + +#define sql_construct_define_2(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + void set (const T1 &p1, const T2 &p2) { \ + C1 = p1;\ + C2 = p2;\ + \ + } \ + NAME(const T1 &p1, const T2 &p2) : C1 (p1), C2 (p2), table_override_(0) {} + +#define sql_compare_type_def_2(NAME, WHAT, NUM) \ + return WHAT##_list(d, m, true, true) + +#define sql_compare_type_defe_2(NAME, WHAT, NUM) \ + return WHAT##_list(d, c, m, true, true) + +#define sql_COMPARE__2(NAME, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19, C20, C21, C22, C23, C24, C25) \ + template \ + int sql_compare_##NAME(const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + } \ + template \ + int compare (const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + } + +// --------------------------------------------------- +// End Compare 2 +// --------------------------------------------------- + + +// --------------------------------------------------- +// Begin Compare 3 +// --------------------------------------------------- + +#define sql_compare_define_3(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3) : C1 (p1), C2 (p2), C3 (p3) {} \ + void set (const T1 &p1, const T2 &p2, const T3 &p3) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + \ + } \ + sql_compare_define(NAME) + +#define sql_construct_define_3(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + void set (const T1 &p1, const T2 &p2, const T3 &p3) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + \ + } \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3) : C1 (p1), C2 (p2), C3 (p3), table_override_(0) {} + +#define sql_compare_type_def_3(NAME, WHAT, NUM) \ + return WHAT##_list(d, m, true, true, true) + +#define sql_compare_type_defe_3(NAME, WHAT, NUM) \ + return WHAT##_list(d, c, m, true, true, true) + +#define sql_COMPARE__3(NAME, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19, C20, C21, C22, C23, C24, C25) \ + template \ + int sql_compare_##NAME(const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + } \ + template \ + int compare (const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + } + +// --------------------------------------------------- +// End Compare 3 +// --------------------------------------------------- + + +// --------------------------------------------------- +// Begin Compare 4 +// --------------------------------------------------- + +#define sql_compare_define_4(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4) : C1 (p1), C2 (p2), C3 (p3), C4 (p4) {} \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + \ + } \ + sql_compare_define(NAME) + +#define sql_construct_define_4(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + \ + } \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), table_override_(0) {} + +#define sql_compare_type_def_4(NAME, WHAT, NUM) \ + return WHAT##_list(d, m, true, true, true, true) + +#define sql_compare_type_defe_4(NAME, WHAT, NUM) \ + return WHAT##_list(d, c, m, true, true, true, true) + +#define sql_COMPARE__4(NAME, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19, C20, C21, C22, C23, C24, C25) \ + template \ + int sql_compare_##NAME(const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + } \ + template \ + int compare (const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + } + +// --------------------------------------------------- +// End Compare 4 +// --------------------------------------------------- + + +// --------------------------------------------------- +// Begin Compare 5 +// --------------------------------------------------- + +#define sql_compare_define_5(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5) {} \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + \ + } \ + sql_compare_define(NAME) + +#define sql_construct_define_5(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + \ + } \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), table_override_(0) {} + +#define sql_compare_type_def_5(NAME, WHAT, NUM) \ + return WHAT##_list(d, m, true, true, true, true, true) + +#define sql_compare_type_defe_5(NAME, WHAT, NUM) \ + return WHAT##_list(d, c, m, true, true, true, true, true) + +#define sql_COMPARE__5(NAME, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19, C20, C21, C22, C23, C24, C25) \ + template \ + int sql_compare_##NAME(const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + } \ + template \ + int compare (const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + } + +// --------------------------------------------------- +// End Compare 5 +// --------------------------------------------------- + + +// --------------------------------------------------- +// Begin Compare 6 +// --------------------------------------------------- + +#define sql_compare_define_6(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6) {} \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + \ + } \ + sql_compare_define(NAME) + +#define sql_construct_define_6(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + \ + } \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6), table_override_(0) {} + +#define sql_compare_type_def_6(NAME, WHAT, NUM) \ + return WHAT##_list(d, m, true, true, true, true, true, true) + +#define sql_compare_type_defe_6(NAME, WHAT, NUM) \ + return WHAT##_list(d, c, m, true, true, true, true, true, true) + +#define sql_COMPARE__6(NAME, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19, C20, C21, C22, C23, C24, C25) \ + template \ + int sql_compare_##NAME(const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + } \ + template \ + int compare (const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + } + +// --------------------------------------------------- +// End Compare 6 +// --------------------------------------------------- + + +// --------------------------------------------------- +// Begin Compare 7 +// --------------------------------------------------- + +#define sql_compare_define_7(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6), C7 (p7) {} \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + C7 = p7;\ + \ + } \ + sql_compare_define(NAME) + +#define sql_construct_define_7(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + C7 = p7;\ + \ + } \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6), C7 (p7), table_override_(0) {} + +#define sql_compare_type_def_7(NAME, WHAT, NUM) \ + return WHAT##_list(d, m, true, true, true, true, true, true, true) + +#define sql_compare_type_defe_7(NAME, WHAT, NUM) \ + return WHAT##_list(d, c, m, true, true, true, true, true, true, true) + +#define sql_COMPARE__7(NAME, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19, C20, C21, C22, C23, C24, C25) \ + template \ + int sql_compare_##NAME(const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C7 , y.C7 ); \ + } \ + template \ + int compare (const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C7 , y.C7 ); \ + } + +// --------------------------------------------------- +// End Compare 7 +// --------------------------------------------------- + + +// --------------------------------------------------- +// Begin Compare 8 +// --------------------------------------------------- + +#define sql_compare_define_8(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6), C7 (p7), C8 (p8) {} \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + C7 = p7;\ + C8 = p8;\ + \ + } \ + sql_compare_define(NAME) + +#define sql_construct_define_8(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + C7 = p7;\ + C8 = p8;\ + \ + } \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6), C7 (p7), C8 (p8), table_override_(0) {} + +#define sql_compare_type_def_8(NAME, WHAT, NUM) \ + return WHAT##_list(d, m, true, true, true, true, true, true, true, true) + +#define sql_compare_type_defe_8(NAME, WHAT, NUM) \ + return WHAT##_list(d, c, m, true, true, true, true, true, true, true, true) + +#define sql_COMPARE__8(NAME, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19, C20, C21, C22, C23, C24, C25) \ + template \ + int sql_compare_##NAME(const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C7 , y.C7 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C8 , y.C8 ); \ + } \ + template \ + int compare (const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C7 , y.C7 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C8 , y.C8 ); \ + } + +// --------------------------------------------------- +// End Compare 8 +// --------------------------------------------------- + + +// --------------------------------------------------- +// Begin Compare 9 +// --------------------------------------------------- + +#define sql_compare_define_9(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6), C7 (p7), C8 (p8), C9 (p9) {} \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + C7 = p7;\ + C8 = p8;\ + C9 = p9;\ + \ + } \ + sql_compare_define(NAME) + +#define sql_construct_define_9(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + C7 = p7;\ + C8 = p8;\ + C9 = p9;\ + \ + } \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6), C7 (p7), C8 (p8), C9 (p9), table_override_(0) {} + +#define sql_compare_type_def_9(NAME, WHAT, NUM) \ + return WHAT##_list(d, m, true, true, true, true, true, true, true, true, true) + +#define sql_compare_type_defe_9(NAME, WHAT, NUM) \ + return WHAT##_list(d, c, m, true, true, true, true, true, true, true, true, true) + +#define sql_COMPARE__9(NAME, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19, C20, C21, C22, C23, C24, C25) \ + template \ + int sql_compare_##NAME(const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C7 , y.C7 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C8 , y.C8 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C9 , y.C9 ); \ + } \ + template \ + int compare (const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C7 , y.C7 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C8 , y.C8 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C9 , y.C9 ); \ + } + +// --------------------------------------------------- +// End Compare 9 +// --------------------------------------------------- + + +// --------------------------------------------------- +// Begin Compare 10 +// --------------------------------------------------- + +#define sql_compare_define_10(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6), C7 (p7), C8 (p8), C9 (p9), C10 (p10) {} \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + C7 = p7;\ + C8 = p8;\ + C9 = p9;\ + C10 = p10;\ + \ + } \ + sql_compare_define(NAME) + +#define sql_construct_define_10(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + C7 = p7;\ + C8 = p8;\ + C9 = p9;\ + C10 = p10;\ + \ + } \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6), C7 (p7), C8 (p8), C9 (p9), C10 (p10), table_override_(0) {} + +#define sql_compare_type_def_10(NAME, WHAT, NUM) \ + return WHAT##_list(d, m, true, true, true, true, true, true, true, true, true, true) + +#define sql_compare_type_defe_10(NAME, WHAT, NUM) \ + return WHAT##_list(d, c, m, true, true, true, true, true, true, true, true, true, true) + +#define sql_COMPARE__10(NAME, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19, C20, C21, C22, C23, C24, C25) \ + template \ + int sql_compare_##NAME(const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C7 , y.C7 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C8 , y.C8 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C9 , y.C9 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C10 , y.C10 ); \ + } \ + template \ + int compare (const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C7 , y.C7 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C8 , y.C8 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C9 , y.C9 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C10 , y.C10 ); \ + } + +// --------------------------------------------------- +// End Compare 10 +// --------------------------------------------------- + + +// --------------------------------------------------- +// Begin Compare 11 +// --------------------------------------------------- + +#define sql_compare_define_11(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6), C7 (p7), C8 (p8), C9 (p9), C10 (p10), C11 (p11) {} \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + C7 = p7;\ + C8 = p8;\ + C9 = p9;\ + C10 = p10;\ + C11 = p11;\ + \ + } \ + sql_compare_define(NAME) + +#define sql_construct_define_11(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + C7 = p7;\ + C8 = p8;\ + C9 = p9;\ + C10 = p10;\ + C11 = p11;\ + \ + } \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6), C7 (p7), C8 (p8), C9 (p9), C10 (p10), C11 (p11), table_override_(0) {} + +#define sql_compare_type_def_11(NAME, WHAT, NUM) \ + return WHAT##_list(d, m, true, true, true, true, true, true, true, true, true, true, true) + +#define sql_compare_type_defe_11(NAME, WHAT, NUM) \ + return WHAT##_list(d, c, m, true, true, true, true, true, true, true, true, true, true, true) + +#define sql_COMPARE__11(NAME, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19, C20, C21, C22, C23, C24, C25) \ + template \ + int sql_compare_##NAME(const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C7 , y.C7 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C8 , y.C8 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C9 , y.C9 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C10 , y.C10 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C11 , y.C11 ); \ + } \ + template \ + int compare (const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C7 , y.C7 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C8 , y.C8 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C9 , y.C9 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C10 , y.C10 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C11 , y.C11 ); \ + } + +// --------------------------------------------------- +// End Compare 11 +// --------------------------------------------------- + + +// --------------------------------------------------- +// Begin Compare 12 +// --------------------------------------------------- + +#define sql_compare_define_12(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6), C7 (p7), C8 (p8), C9 (p9), C10 (p10), C11 (p11), C12 (p12) {} \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + C7 = p7;\ + C8 = p8;\ + C9 = p9;\ + C10 = p10;\ + C11 = p11;\ + C12 = p12;\ + \ + } \ + sql_compare_define(NAME) + +#define sql_construct_define_12(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + C7 = p7;\ + C8 = p8;\ + C9 = p9;\ + C10 = p10;\ + C11 = p11;\ + C12 = p12;\ + \ + } \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6), C7 (p7), C8 (p8), C9 (p9), C10 (p10), C11 (p11), C12 (p12), table_override_(0) {} + +#define sql_compare_type_def_12(NAME, WHAT, NUM) \ + return WHAT##_list(d, m, true, true, true, true, true, true, true, true, true, true, true, true) + +#define sql_compare_type_defe_12(NAME, WHAT, NUM) \ + return WHAT##_list(d, c, m, true, true, true, true, true, true, true, true, true, true, true, true) + +#define sql_COMPARE__12(NAME, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19, C20, C21, C22, C23, C24, C25) \ + template \ + int sql_compare_##NAME(const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C7 , y.C7 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C8 , y.C8 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C9 , y.C9 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C10 , y.C10 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C11 , y.C11 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C12 , y.C12 ); \ + } \ + template \ + int compare (const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C7 , y.C7 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C8 , y.C8 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C9 , y.C9 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C10 , y.C10 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C11 , y.C11 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C12 , y.C12 ); \ + } + +// --------------------------------------------------- +// End Compare 12 +// --------------------------------------------------- + + +// --------------------------------------------------- +// Begin Compare 13 +// --------------------------------------------------- + +#define sql_compare_define_13(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6), C7 (p7), C8 (p8), C9 (p9), C10 (p10), C11 (p11), C12 (p12), C13 (p13) {} \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + C7 = p7;\ + C8 = p8;\ + C9 = p9;\ + C10 = p10;\ + C11 = p11;\ + C12 = p12;\ + C13 = p13;\ + \ + } \ + sql_compare_define(NAME) + +#define sql_construct_define_13(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + C7 = p7;\ + C8 = p8;\ + C9 = p9;\ + C10 = p10;\ + C11 = p11;\ + C12 = p12;\ + C13 = p13;\ + \ + } \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6), C7 (p7), C8 (p8), C9 (p9), C10 (p10), C11 (p11), C12 (p12), C13 (p13), table_override_(0) {} + +#define sql_compare_type_def_13(NAME, WHAT, NUM) \ + return WHAT##_list(d, m, true, true, true, true, true, true, true, true, true, true, true, true, true) + +#define sql_compare_type_defe_13(NAME, WHAT, NUM) \ + return WHAT##_list(d, c, m, true, true, true, true, true, true, true, true, true, true, true, true, true) + +#define sql_COMPARE__13(NAME, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19, C20, C21, C22, C23, C24, C25) \ + template \ + int sql_compare_##NAME(const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C7 , y.C7 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C8 , y.C8 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C9 , y.C9 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C10 , y.C10 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C11 , y.C11 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C12 , y.C12 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C13 , y.C13 ); \ + } \ + template \ + int compare (const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C7 , y.C7 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C8 , y.C8 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C9 , y.C9 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C10 , y.C10 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C11 , y.C11 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C12 , y.C12 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C13 , y.C13 ); \ + } + +// --------------------------------------------------- +// End Compare 13 +// --------------------------------------------------- + + +// --------------------------------------------------- +// Begin Compare 14 +// --------------------------------------------------- + +#define sql_compare_define_14(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6), C7 (p7), C8 (p8), C9 (p9), C10 (p10), C11 (p11), C12 (p12), C13 (p13), C14 (p14) {} \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + C7 = p7;\ + C8 = p8;\ + C9 = p9;\ + C10 = p10;\ + C11 = p11;\ + C12 = p12;\ + C13 = p13;\ + C14 = p14;\ + \ + } \ + sql_compare_define(NAME) + +#define sql_construct_define_14(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + C7 = p7;\ + C8 = p8;\ + C9 = p9;\ + C10 = p10;\ + C11 = p11;\ + C12 = p12;\ + C13 = p13;\ + C14 = p14;\ + \ + } \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6), C7 (p7), C8 (p8), C9 (p9), C10 (p10), C11 (p11), C12 (p12), C13 (p13), C14 (p14), table_override_(0) {} + +#define sql_compare_type_def_14(NAME, WHAT, NUM) \ + return WHAT##_list(d, m, true, true, true, true, true, true, true, true, true, true, true, true, true, true) + +#define sql_compare_type_defe_14(NAME, WHAT, NUM) \ + return WHAT##_list(d, c, m, true, true, true, true, true, true, true, true, true, true, true, true, true, true) + +#define sql_COMPARE__14(NAME, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19, C20, C21, C22, C23, C24, C25) \ + template \ + int sql_compare_##NAME(const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C7 , y.C7 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C8 , y.C8 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C9 , y.C9 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C10 , y.C10 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C11 , y.C11 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C12 , y.C12 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C13 , y.C13 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C14 , y.C14 ); \ + } \ + template \ + int compare (const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C7 , y.C7 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C8 , y.C8 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C9 , y.C9 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C10 , y.C10 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C11 , y.C11 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C12 , y.C12 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C13 , y.C13 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C14 , y.C14 ); \ + } + +// --------------------------------------------------- +// End Compare 14 +// --------------------------------------------------- + + +// --------------------------------------------------- +// Begin Compare 15 +// --------------------------------------------------- + +#define sql_compare_define_15(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6), C7 (p7), C8 (p8), C9 (p9), C10 (p10), C11 (p11), C12 (p12), C13 (p13), C14 (p14), C15 (p15) {} \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + C7 = p7;\ + C8 = p8;\ + C9 = p9;\ + C10 = p10;\ + C11 = p11;\ + C12 = p12;\ + C13 = p13;\ + C14 = p14;\ + C15 = p15;\ + \ + } \ + sql_compare_define(NAME) + +#define sql_construct_define_15(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + C7 = p7;\ + C8 = p8;\ + C9 = p9;\ + C10 = p10;\ + C11 = p11;\ + C12 = p12;\ + C13 = p13;\ + C14 = p14;\ + C15 = p15;\ + \ + } \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6), C7 (p7), C8 (p8), C9 (p9), C10 (p10), C11 (p11), C12 (p12), C13 (p13), C14 (p14), C15 (p15), table_override_(0) {} + +#define sql_compare_type_def_15(NAME, WHAT, NUM) \ + return WHAT##_list(d, m, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true) + +#define sql_compare_type_defe_15(NAME, WHAT, NUM) \ + return WHAT##_list(d, c, m, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true) + +#define sql_COMPARE__15(NAME, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19, C20, C21, C22, C23, C24, C25) \ + template \ + int sql_compare_##NAME(const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C7 , y.C7 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C8 , y.C8 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C9 , y.C9 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C10 , y.C10 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C11 , y.C11 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C12 , y.C12 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C13 , y.C13 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C14 , y.C14 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C15 , y.C15 ); \ + } \ + template \ + int compare (const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C7 , y.C7 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C8 , y.C8 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C9 , y.C9 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C10 , y.C10 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C11 , y.C11 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C12 , y.C12 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C13 , y.C13 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C14 , y.C14 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C15 , y.C15 ); \ + } + +// --------------------------------------------------- +// End Compare 15 +// --------------------------------------------------- + + +// --------------------------------------------------- +// Begin Compare 16 +// --------------------------------------------------- + +#define sql_compare_define_16(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6), C7 (p7), C8 (p8), C9 (p9), C10 (p10), C11 (p11), C12 (p12), C13 (p13), C14 (p14), C15 (p15), C16 (p16) {} \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + C7 = p7;\ + C8 = p8;\ + C9 = p9;\ + C10 = p10;\ + C11 = p11;\ + C12 = p12;\ + C13 = p13;\ + C14 = p14;\ + C15 = p15;\ + C16 = p16;\ + \ + } \ + sql_compare_define(NAME) + +#define sql_construct_define_16(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + C7 = p7;\ + C8 = p8;\ + C9 = p9;\ + C10 = p10;\ + C11 = p11;\ + C12 = p12;\ + C13 = p13;\ + C14 = p14;\ + C15 = p15;\ + C16 = p16;\ + \ + } \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6), C7 (p7), C8 (p8), C9 (p9), C10 (p10), C11 (p11), C12 (p12), C13 (p13), C14 (p14), C15 (p15), C16 (p16), table_override_(0) {} + +#define sql_compare_type_def_16(NAME, WHAT, NUM) \ + return WHAT##_list(d, m, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true) + +#define sql_compare_type_defe_16(NAME, WHAT, NUM) \ + return WHAT##_list(d, c, m, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true) + +#define sql_COMPARE__16(NAME, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19, C20, C21, C22, C23, C24, C25) \ + template \ + int sql_compare_##NAME(const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C7 , y.C7 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C8 , y.C8 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C9 , y.C9 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C10 , y.C10 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C11 , y.C11 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C12 , y.C12 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C13 , y.C13 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C14 , y.C14 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C15 , y.C15 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C16 , y.C16 ); \ + } \ + template \ + int compare (const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C7 , y.C7 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C8 , y.C8 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C9 , y.C9 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C10 , y.C10 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C11 , y.C11 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C12 , y.C12 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C13 , y.C13 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C14 , y.C14 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C15 , y.C15 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C16 , y.C16 ); \ + } + +// --------------------------------------------------- +// End Compare 16 +// --------------------------------------------------- + + +// --------------------------------------------------- +// Begin Compare 17 +// --------------------------------------------------- + +#define sql_compare_define_17(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16, const T17 &p17) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6), C7 (p7), C8 (p8), C9 (p9), C10 (p10), C11 (p11), C12 (p12), C13 (p13), C14 (p14), C15 (p15), C16 (p16), C17 (p17) {} \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16, const T17 &p17) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + C7 = p7;\ + C8 = p8;\ + C9 = p9;\ + C10 = p10;\ + C11 = p11;\ + C12 = p12;\ + C13 = p13;\ + C14 = p14;\ + C15 = p15;\ + C16 = p16;\ + C17 = p17;\ + \ + } \ + sql_compare_define(NAME) + +#define sql_construct_define_17(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16, const T17 &p17) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + C7 = p7;\ + C8 = p8;\ + C9 = p9;\ + C10 = p10;\ + C11 = p11;\ + C12 = p12;\ + C13 = p13;\ + C14 = p14;\ + C15 = p15;\ + C16 = p16;\ + C17 = p17;\ + \ + } \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16, const T17 &p17) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6), C7 (p7), C8 (p8), C9 (p9), C10 (p10), C11 (p11), C12 (p12), C13 (p13), C14 (p14), C15 (p15), C16 (p16), C17 (p17), table_override_(0) {} + +#define sql_compare_type_def_17(NAME, WHAT, NUM) \ + return WHAT##_list(d, m, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true) + +#define sql_compare_type_defe_17(NAME, WHAT, NUM) \ + return WHAT##_list(d, c, m, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true) + +#define sql_COMPARE__17(NAME, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19, C20, C21, C22, C23, C24, C25) \ + template \ + int sql_compare_##NAME(const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C7 , y.C7 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C8 , y.C8 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C9 , y.C9 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C10 , y.C10 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C11 , y.C11 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C12 , y.C12 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C13 , y.C13 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C14 , y.C14 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C15 , y.C15 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C16 , y.C16 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C17 , y.C17 ); \ + } \ + template \ + int compare (const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C7 , y.C7 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C8 , y.C8 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C9 , y.C9 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C10 , y.C10 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C11 , y.C11 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C12 , y.C12 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C13 , y.C13 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C14 , y.C14 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C15 , y.C15 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C16 , y.C16 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C17 , y.C17 ); \ + } + +// --------------------------------------------------- +// End Compare 17 +// --------------------------------------------------- + + +// --------------------------------------------------- +// Begin Compare 18 +// --------------------------------------------------- + +#define sql_compare_define_18(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16, const T17 &p17, const T18 &p18) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6), C7 (p7), C8 (p8), C9 (p9), C10 (p10), C11 (p11), C12 (p12), C13 (p13), C14 (p14), C15 (p15), C16 (p16), C17 (p17), C18 (p18) {} \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16, const T17 &p17, const T18 &p18) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + C7 = p7;\ + C8 = p8;\ + C9 = p9;\ + C10 = p10;\ + C11 = p11;\ + C12 = p12;\ + C13 = p13;\ + C14 = p14;\ + C15 = p15;\ + C16 = p16;\ + C17 = p17;\ + C18 = p18;\ + \ + } \ + sql_compare_define(NAME) + +#define sql_construct_define_18(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16, const T17 &p17, const T18 &p18) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + C7 = p7;\ + C8 = p8;\ + C9 = p9;\ + C10 = p10;\ + C11 = p11;\ + C12 = p12;\ + C13 = p13;\ + C14 = p14;\ + C15 = p15;\ + C16 = p16;\ + C17 = p17;\ + C18 = p18;\ + \ + } \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16, const T17 &p17, const T18 &p18) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6), C7 (p7), C8 (p8), C9 (p9), C10 (p10), C11 (p11), C12 (p12), C13 (p13), C14 (p14), C15 (p15), C16 (p16), C17 (p17), C18 (p18), table_override_(0) {} + +#define sql_compare_type_def_18(NAME, WHAT, NUM) \ + return WHAT##_list(d, m, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true) + +#define sql_compare_type_defe_18(NAME, WHAT, NUM) \ + return WHAT##_list(d, c, m, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true) + +#define sql_COMPARE__18(NAME, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19, C20, C21, C22, C23, C24, C25) \ + template \ + int sql_compare_##NAME(const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C7 , y.C7 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C8 , y.C8 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C9 , y.C9 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C10 , y.C10 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C11 , y.C11 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C12 , y.C12 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C13 , y.C13 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C14 , y.C14 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C15 , y.C15 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C16 , y.C16 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C17 , y.C17 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C18 , y.C18 ); \ + } \ + template \ + int compare (const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C7 , y.C7 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C8 , y.C8 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C9 , y.C9 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C10 , y.C10 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C11 , y.C11 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C12 , y.C12 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C13 , y.C13 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C14 , y.C14 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C15 , y.C15 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C16 , y.C16 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C17 , y.C17 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C18 , y.C18 ); \ + } + +// --------------------------------------------------- +// End Compare 18 +// --------------------------------------------------- + + +// --------------------------------------------------- +// Begin Compare 19 +// --------------------------------------------------- + +#define sql_compare_define_19(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16, const T17 &p17, const T18 &p18, const T19 &p19) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6), C7 (p7), C8 (p8), C9 (p9), C10 (p10), C11 (p11), C12 (p12), C13 (p13), C14 (p14), C15 (p15), C16 (p16), C17 (p17), C18 (p18), C19 (p19) {} \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16, const T17 &p17, const T18 &p18, const T19 &p19) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + C7 = p7;\ + C8 = p8;\ + C9 = p9;\ + C10 = p10;\ + C11 = p11;\ + C12 = p12;\ + C13 = p13;\ + C14 = p14;\ + C15 = p15;\ + C16 = p16;\ + C17 = p17;\ + C18 = p18;\ + C19 = p19;\ + \ + } \ + sql_compare_define(NAME) + +#define sql_construct_define_19(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16, const T17 &p17, const T18 &p18, const T19 &p19) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + C7 = p7;\ + C8 = p8;\ + C9 = p9;\ + C10 = p10;\ + C11 = p11;\ + C12 = p12;\ + C13 = p13;\ + C14 = p14;\ + C15 = p15;\ + C16 = p16;\ + C17 = p17;\ + C18 = p18;\ + C19 = p19;\ + \ + } \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16, const T17 &p17, const T18 &p18, const T19 &p19) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6), C7 (p7), C8 (p8), C9 (p9), C10 (p10), C11 (p11), C12 (p12), C13 (p13), C14 (p14), C15 (p15), C16 (p16), C17 (p17), C18 (p18), C19 (p19), table_override_(0) {} + +#define sql_compare_type_def_19(NAME, WHAT, NUM) \ + return WHAT##_list(d, m, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true) + +#define sql_compare_type_defe_19(NAME, WHAT, NUM) \ + return WHAT##_list(d, c, m, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true) + +#define sql_COMPARE__19(NAME, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19, C20, C21, C22, C23, C24, C25) \ + template \ + int sql_compare_##NAME(const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C7 , y.C7 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C8 , y.C8 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C9 , y.C9 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C10 , y.C10 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C11 , y.C11 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C12 , y.C12 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C13 , y.C13 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C14 , y.C14 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C15 , y.C15 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C16 , y.C16 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C17 , y.C17 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C18 , y.C18 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C19 , y.C19 ); \ + } \ + template \ + int compare (const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C7 , y.C7 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C8 , y.C8 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C9 , y.C9 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C10 , y.C10 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C11 , y.C11 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C12 , y.C12 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C13 , y.C13 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C14 , y.C14 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C15 , y.C15 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C16 , y.C16 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C17 , y.C17 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C18 , y.C18 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C19 , y.C19 ); \ + } + +// --------------------------------------------------- +// End Compare 19 +// --------------------------------------------------- + + +// --------------------------------------------------- +// Begin Compare 20 +// --------------------------------------------------- + +#define sql_compare_define_20(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16, const T17 &p17, const T18 &p18, const T19 &p19, const T20 &p20) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6), C7 (p7), C8 (p8), C9 (p9), C10 (p10), C11 (p11), C12 (p12), C13 (p13), C14 (p14), C15 (p15), C16 (p16), C17 (p17), C18 (p18), C19 (p19), C20 (p20) {} \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16, const T17 &p17, const T18 &p18, const T19 &p19, const T20 &p20) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + C7 = p7;\ + C8 = p8;\ + C9 = p9;\ + C10 = p10;\ + C11 = p11;\ + C12 = p12;\ + C13 = p13;\ + C14 = p14;\ + C15 = p15;\ + C16 = p16;\ + C17 = p17;\ + C18 = p18;\ + C19 = p19;\ + C20 = p20;\ + \ + } \ + sql_compare_define(NAME) + +#define sql_construct_define_20(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16, const T17 &p17, const T18 &p18, const T19 &p19, const T20 &p20) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + C7 = p7;\ + C8 = p8;\ + C9 = p9;\ + C10 = p10;\ + C11 = p11;\ + C12 = p12;\ + C13 = p13;\ + C14 = p14;\ + C15 = p15;\ + C16 = p16;\ + C17 = p17;\ + C18 = p18;\ + C19 = p19;\ + C20 = p20;\ + \ + } \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16, const T17 &p17, const T18 &p18, const T19 &p19, const T20 &p20) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6), C7 (p7), C8 (p8), C9 (p9), C10 (p10), C11 (p11), C12 (p12), C13 (p13), C14 (p14), C15 (p15), C16 (p16), C17 (p17), C18 (p18), C19 (p19), C20 (p20), table_override_(0) {} + +#define sql_compare_type_def_20(NAME, WHAT, NUM) \ + return WHAT##_list(d, m, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true) + +#define sql_compare_type_defe_20(NAME, WHAT, NUM) \ + return WHAT##_list(d, c, m, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true) + +#define sql_COMPARE__20(NAME, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19, C20, C21, C22, C23, C24, C25) \ + template \ + int sql_compare_##NAME(const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C7 , y.C7 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C8 , y.C8 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C9 , y.C9 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C10 , y.C10 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C11 , y.C11 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C12 , y.C12 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C13 , y.C13 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C14 , y.C14 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C15 , y.C15 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C16 , y.C16 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C17 , y.C17 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C18 , y.C18 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C19 , y.C19 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C20 , y.C20 ); \ + } \ + template \ + int compare (const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C7 , y.C7 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C8 , y.C8 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C9 , y.C9 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C10 , y.C10 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C11 , y.C11 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C12 , y.C12 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C13 , y.C13 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C14 , y.C14 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C15 , y.C15 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C16 , y.C16 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C17 , y.C17 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C18 , y.C18 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C19 , y.C19 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C20 , y.C20 ); \ + } + +// --------------------------------------------------- +// End Compare 20 +// --------------------------------------------------- + + +// --------------------------------------------------- +// Begin Compare 21 +// --------------------------------------------------- + +#define sql_compare_define_21(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16, const T17 &p17, const T18 &p18, const T19 &p19, const T20 &p20, const T21 &p21) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6), C7 (p7), C8 (p8), C9 (p9), C10 (p10), C11 (p11), C12 (p12), C13 (p13), C14 (p14), C15 (p15), C16 (p16), C17 (p17), C18 (p18), C19 (p19), C20 (p20), C21 (p21) {} \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16, const T17 &p17, const T18 &p18, const T19 &p19, const T20 &p20, const T21 &p21) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + C7 = p7;\ + C8 = p8;\ + C9 = p9;\ + C10 = p10;\ + C11 = p11;\ + C12 = p12;\ + C13 = p13;\ + C14 = p14;\ + C15 = p15;\ + C16 = p16;\ + C17 = p17;\ + C18 = p18;\ + C19 = p19;\ + C20 = p20;\ + C21 = p21;\ + \ + } \ + sql_compare_define(NAME) + +#define sql_construct_define_21(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16, const T17 &p17, const T18 &p18, const T19 &p19, const T20 &p20, const T21 &p21) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + C7 = p7;\ + C8 = p8;\ + C9 = p9;\ + C10 = p10;\ + C11 = p11;\ + C12 = p12;\ + C13 = p13;\ + C14 = p14;\ + C15 = p15;\ + C16 = p16;\ + C17 = p17;\ + C18 = p18;\ + C19 = p19;\ + C20 = p20;\ + C21 = p21;\ + \ + } \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16, const T17 &p17, const T18 &p18, const T19 &p19, const T20 &p20, const T21 &p21) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6), C7 (p7), C8 (p8), C9 (p9), C10 (p10), C11 (p11), C12 (p12), C13 (p13), C14 (p14), C15 (p15), C16 (p16), C17 (p17), C18 (p18), C19 (p19), C20 (p20), C21 (p21), table_override_(0) {} + +#define sql_compare_type_def_21(NAME, WHAT, NUM) \ + return WHAT##_list(d, m, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true) + +#define sql_compare_type_defe_21(NAME, WHAT, NUM) \ + return WHAT##_list(d, c, m, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true) + +#define sql_COMPARE__21(NAME, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19, C20, C21, C22, C23, C24, C25) \ + template \ + int sql_compare_##NAME(const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C7 , y.C7 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C8 , y.C8 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C9 , y.C9 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C10 , y.C10 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C11 , y.C11 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C12 , y.C12 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C13 , y.C13 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C14 , y.C14 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C15 , y.C15 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C16 , y.C16 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C17 , y.C17 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C18 , y.C18 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C19 , y.C19 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C20 , y.C20 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C21 , y.C21 ); \ + } \ + template \ + int compare (const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C7 , y.C7 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C8 , y.C8 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C9 , y.C9 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C10 , y.C10 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C11 , y.C11 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C12 , y.C12 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C13 , y.C13 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C14 , y.C14 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C15 , y.C15 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C16 , y.C16 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C17 , y.C17 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C18 , y.C18 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C19 , y.C19 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C20 , y.C20 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C21 , y.C21 ); \ + } + +// --------------------------------------------------- +// End Compare 21 +// --------------------------------------------------- + + +// --------------------------------------------------- +// Begin Compare 22 +// --------------------------------------------------- + +#define sql_compare_define_22(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16, const T17 &p17, const T18 &p18, const T19 &p19, const T20 &p20, const T21 &p21, const T22 &p22) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6), C7 (p7), C8 (p8), C9 (p9), C10 (p10), C11 (p11), C12 (p12), C13 (p13), C14 (p14), C15 (p15), C16 (p16), C17 (p17), C18 (p18), C19 (p19), C20 (p20), C21 (p21), C22 (p22) {} \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16, const T17 &p17, const T18 &p18, const T19 &p19, const T20 &p20, const T21 &p21, const T22 &p22) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + C7 = p7;\ + C8 = p8;\ + C9 = p9;\ + C10 = p10;\ + C11 = p11;\ + C12 = p12;\ + C13 = p13;\ + C14 = p14;\ + C15 = p15;\ + C16 = p16;\ + C17 = p17;\ + C18 = p18;\ + C19 = p19;\ + C20 = p20;\ + C21 = p21;\ + C22 = p22;\ + \ + } \ + sql_compare_define(NAME) + +#define sql_construct_define_22(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16, const T17 &p17, const T18 &p18, const T19 &p19, const T20 &p20, const T21 &p21, const T22 &p22) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + C7 = p7;\ + C8 = p8;\ + C9 = p9;\ + C10 = p10;\ + C11 = p11;\ + C12 = p12;\ + C13 = p13;\ + C14 = p14;\ + C15 = p15;\ + C16 = p16;\ + C17 = p17;\ + C18 = p18;\ + C19 = p19;\ + C20 = p20;\ + C21 = p21;\ + C22 = p22;\ + \ + } \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16, const T17 &p17, const T18 &p18, const T19 &p19, const T20 &p20, const T21 &p21, const T22 &p22) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6), C7 (p7), C8 (p8), C9 (p9), C10 (p10), C11 (p11), C12 (p12), C13 (p13), C14 (p14), C15 (p15), C16 (p16), C17 (p17), C18 (p18), C19 (p19), C20 (p20), C21 (p21), C22 (p22), table_override_(0) {} + +#define sql_compare_type_def_22(NAME, WHAT, NUM) \ + return WHAT##_list(d, m, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true) + +#define sql_compare_type_defe_22(NAME, WHAT, NUM) \ + return WHAT##_list(d, c, m, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true) + +#define sql_COMPARE__22(NAME, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19, C20, C21, C22, C23, C24, C25) \ + template \ + int sql_compare_##NAME(const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C7 , y.C7 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C8 , y.C8 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C9 , y.C9 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C10 , y.C10 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C11 , y.C11 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C12 , y.C12 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C13 , y.C13 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C14 , y.C14 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C15 , y.C15 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C16 , y.C16 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C17 , y.C17 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C18 , y.C18 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C19 , y.C19 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C20 , y.C20 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C21 , y.C21 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C22 , y.C22 ); \ + } \ + template \ + int compare (const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C7 , y.C7 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C8 , y.C8 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C9 , y.C9 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C10 , y.C10 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C11 , y.C11 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C12 , y.C12 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C13 , y.C13 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C14 , y.C14 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C15 , y.C15 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C16 , y.C16 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C17 , y.C17 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C18 , y.C18 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C19 , y.C19 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C20 , y.C20 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C21 , y.C21 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C22 , y.C22 ); \ + } + +// --------------------------------------------------- +// End Compare 22 +// --------------------------------------------------- + + +// --------------------------------------------------- +// Begin Compare 23 +// --------------------------------------------------- + +#define sql_compare_define_23(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16, const T17 &p17, const T18 &p18, const T19 &p19, const T20 &p20, const T21 &p21, const T22 &p22, const T23 &p23) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6), C7 (p7), C8 (p8), C9 (p9), C10 (p10), C11 (p11), C12 (p12), C13 (p13), C14 (p14), C15 (p15), C16 (p16), C17 (p17), C18 (p18), C19 (p19), C20 (p20), C21 (p21), C22 (p22), C23 (p23) {} \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16, const T17 &p17, const T18 &p18, const T19 &p19, const T20 &p20, const T21 &p21, const T22 &p22, const T23 &p23) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + C7 = p7;\ + C8 = p8;\ + C9 = p9;\ + C10 = p10;\ + C11 = p11;\ + C12 = p12;\ + C13 = p13;\ + C14 = p14;\ + C15 = p15;\ + C16 = p16;\ + C17 = p17;\ + C18 = p18;\ + C19 = p19;\ + C20 = p20;\ + C21 = p21;\ + C22 = p22;\ + C23 = p23;\ + \ + } \ + sql_compare_define(NAME) + +#define sql_construct_define_23(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16, const T17 &p17, const T18 &p18, const T19 &p19, const T20 &p20, const T21 &p21, const T22 &p22, const T23 &p23) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + C7 = p7;\ + C8 = p8;\ + C9 = p9;\ + C10 = p10;\ + C11 = p11;\ + C12 = p12;\ + C13 = p13;\ + C14 = p14;\ + C15 = p15;\ + C16 = p16;\ + C17 = p17;\ + C18 = p18;\ + C19 = p19;\ + C20 = p20;\ + C21 = p21;\ + C22 = p22;\ + C23 = p23;\ + \ + } \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16, const T17 &p17, const T18 &p18, const T19 &p19, const T20 &p20, const T21 &p21, const T22 &p22, const T23 &p23) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6), C7 (p7), C8 (p8), C9 (p9), C10 (p10), C11 (p11), C12 (p12), C13 (p13), C14 (p14), C15 (p15), C16 (p16), C17 (p17), C18 (p18), C19 (p19), C20 (p20), C21 (p21), C22 (p22), C23 (p23), table_override_(0) {} + +#define sql_compare_type_def_23(NAME, WHAT, NUM) \ + return WHAT##_list(d, m, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true) + +#define sql_compare_type_defe_23(NAME, WHAT, NUM) \ + return WHAT##_list(d, c, m, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true) + +#define sql_COMPARE__23(NAME, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19, C20, C21, C22, C23, C24, C25) \ + template \ + int sql_compare_##NAME(const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C7 , y.C7 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C8 , y.C8 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C9 , y.C9 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C10 , y.C10 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C11 , y.C11 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C12 , y.C12 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C13 , y.C13 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C14 , y.C14 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C15 , y.C15 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C16 , y.C16 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C17 , y.C17 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C18 , y.C18 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C19 , y.C19 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C20 , y.C20 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C21 , y.C21 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C22 , y.C22 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C23 , y.C23 ); \ + } \ + template \ + int compare (const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C7 , y.C7 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C8 , y.C8 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C9 , y.C9 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C10 , y.C10 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C11 , y.C11 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C12 , y.C12 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C13 , y.C13 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C14 , y.C14 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C15 , y.C15 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C16 , y.C16 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C17 , y.C17 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C18 , y.C18 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C19 , y.C19 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C20 , y.C20 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C21 , y.C21 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C22 , y.C22 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C23 , y.C23 ); \ + } + +// --------------------------------------------------- +// End Compare 23 +// --------------------------------------------------- + + +// --------------------------------------------------- +// Begin Compare 24 +// --------------------------------------------------- + +#define sql_compare_define_24(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16, const T17 &p17, const T18 &p18, const T19 &p19, const T20 &p20, const T21 &p21, const T22 &p22, const T23 &p23, const T24 &p24) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6), C7 (p7), C8 (p8), C9 (p9), C10 (p10), C11 (p11), C12 (p12), C13 (p13), C14 (p14), C15 (p15), C16 (p16), C17 (p17), C18 (p18), C19 (p19), C20 (p20), C21 (p21), C22 (p22), C23 (p23), C24 (p24) {} \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16, const T17 &p17, const T18 &p18, const T19 &p19, const T20 &p20, const T21 &p21, const T22 &p22, const T23 &p23, const T24 &p24) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + C7 = p7;\ + C8 = p8;\ + C9 = p9;\ + C10 = p10;\ + C11 = p11;\ + C12 = p12;\ + C13 = p13;\ + C14 = p14;\ + C15 = p15;\ + C16 = p16;\ + C17 = p17;\ + C18 = p18;\ + C19 = p19;\ + C20 = p20;\ + C21 = p21;\ + C22 = p22;\ + C23 = p23;\ + C24 = p24;\ + \ + } \ + sql_compare_define(NAME) + +#define sql_construct_define_24(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16, const T17 &p17, const T18 &p18, const T19 &p19, const T20 &p20, const T21 &p21, const T22 &p22, const T23 &p23, const T24 &p24) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + C7 = p7;\ + C8 = p8;\ + C9 = p9;\ + C10 = p10;\ + C11 = p11;\ + C12 = p12;\ + C13 = p13;\ + C14 = p14;\ + C15 = p15;\ + C16 = p16;\ + C17 = p17;\ + C18 = p18;\ + C19 = p19;\ + C20 = p20;\ + C21 = p21;\ + C22 = p22;\ + C23 = p23;\ + C24 = p24;\ + \ + } \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16, const T17 &p17, const T18 &p18, const T19 &p19, const T20 &p20, const T21 &p21, const T22 &p22, const T23 &p23, const T24 &p24) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6), C7 (p7), C8 (p8), C9 (p9), C10 (p10), C11 (p11), C12 (p12), C13 (p13), C14 (p14), C15 (p15), C16 (p16), C17 (p17), C18 (p18), C19 (p19), C20 (p20), C21 (p21), C22 (p22), C23 (p23), C24 (p24), table_override_(0) {} + +#define sql_compare_type_def_24(NAME, WHAT, NUM) \ + return WHAT##_list(d, m, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true) + +#define sql_compare_type_defe_24(NAME, WHAT, NUM) \ + return WHAT##_list(d, c, m, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true) + +#define sql_COMPARE__24(NAME, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19, C20, C21, C22, C23, C24, C25) \ + template \ + int sql_compare_##NAME(const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C7 , y.C7 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C8 , y.C8 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C9 , y.C9 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C10 , y.C10 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C11 , y.C11 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C12 , y.C12 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C13 , y.C13 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C14 , y.C14 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C15 , y.C15 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C16 , y.C16 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C17 , y.C17 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C18 , y.C18 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C19 , y.C19 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C20 , y.C20 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C21 , y.C21 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C22 , y.C22 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C23 , y.C23 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C24 , y.C24 ); \ + } \ + template \ + int compare (const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C7 , y.C7 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C8 , y.C8 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C9 , y.C9 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C10 , y.C10 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C11 , y.C11 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C12 , y.C12 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C13 , y.C13 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C14 , y.C14 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C15 , y.C15 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C16 , y.C16 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C17 , y.C17 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C18 , y.C18 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C19 , y.C19 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C20 , y.C20 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C21 , y.C21 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C22 , y.C22 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C23 , y.C23 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C24 , y.C24 ); \ + } + +// --------------------------------------------------- +// End Compare 24 +// --------------------------------------------------- + + +// --------------------------------------------------- +// Begin Compare 25 +// --------------------------------------------------- + +#define sql_compare_define_25(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16, const T17 &p17, const T18 &p18, const T19 &p19, const T20 &p20, const T21 &p21, const T22 &p22, const T23 &p23, const T24 &p24, const T25 &p25) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6), C7 (p7), C8 (p8), C9 (p9), C10 (p10), C11 (p11), C12 (p12), C13 (p13), C14 (p14), C15 (p15), C16 (p16), C17 (p17), C18 (p18), C19 (p19), C20 (p20), C21 (p21), C22 (p22), C23 (p23), C24 (p24), C25 (p25) {} \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16, const T17 &p17, const T18 &p18, const T19 &p19, const T20 &p20, const T21 &p21, const T22 &p22, const T23 &p23, const T24 &p24, const T25 &p25) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + C7 = p7;\ + C8 = p8;\ + C9 = p9;\ + C10 = p10;\ + C11 = p11;\ + C12 = p12;\ + C13 = p13;\ + C14 = p14;\ + C15 = p15;\ + C16 = p16;\ + C17 = p17;\ + C18 = p18;\ + C19 = p19;\ + C20 = p20;\ + C21 = p21;\ + C22 = p22;\ + C23 = p23;\ + C24 = p24;\ + C25 = p25;\ + \ + } \ + sql_compare_define(NAME) + +#define sql_construct_define_25(NAME, T1, C1, T2, C2, T3, C3, T4, C4, T5, C5, T6, C6, T7, C7, T8, C8, T9, C9, T10, C10, T11, C11, T12, C12, T13, C13, T14, C14, T15, C15, T16, C16, T17, C17, T18, C18, T19, C19, T20, C20, T21, C21, T22, C22, T23, C23, T24, C24, T25, C25) \ + void set (const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16, const T17 &p17, const T18 &p18, const T19 &p19, const T20 &p20, const T21 &p21, const T22 &p22, const T23 &p23, const T24 &p24, const T25 &p25) { \ + C1 = p1;\ + C2 = p2;\ + C3 = p3;\ + C4 = p4;\ + C5 = p5;\ + C6 = p6;\ + C7 = p7;\ + C8 = p8;\ + C9 = p9;\ + C10 = p10;\ + C11 = p11;\ + C12 = p12;\ + C13 = p13;\ + C14 = p14;\ + C15 = p15;\ + C16 = p16;\ + C17 = p17;\ + C18 = p18;\ + C19 = p19;\ + C20 = p20;\ + C21 = p21;\ + C22 = p22;\ + C23 = p23;\ + C24 = p24;\ + C25 = p25;\ + \ + } \ + NAME(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4, const T5 &p5, const T6 &p6, const T7 &p7, const T8 &p8, const T9 &p9, const T10 &p10, const T11 &p11, const T12 &p12, const T13 &p13, const T14 &p14, const T15 &p15, const T16 &p16, const T17 &p17, const T18 &p18, const T19 &p19, const T20 &p20, const T21 &p21, const T22 &p22, const T23 &p23, const T24 &p24, const T25 &p25) : C1 (p1), C2 (p2), C3 (p3), C4 (p4), C5 (p5), C6 (p6), C7 (p7), C8 (p8), C9 (p9), C10 (p10), C11 (p11), C12 (p12), C13 (p13), C14 (p14), C15 (p15), C16 (p16), C17 (p17), C18 (p18), C19 (p19), C20 (p20), C21 (p21), C22 (p22), C23 (p23), C24 (p24), C25 (p25), table_override_(0) {} + +#define sql_compare_type_def_25(NAME, WHAT, NUM) \ + return WHAT##_list(d, m, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true) + +#define sql_compare_type_defe_25(NAME, WHAT, NUM) \ + return WHAT##_list(d, c, m, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true) + +#define sql_COMPARE__25(NAME, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19, C20, C21, C22, C23, C24, C25) \ + template \ + int sql_compare_##NAME(const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C7 , y.C7 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C8 , y.C8 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C9 , y.C9 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C10 , y.C10 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C11 , y.C11 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C12 , y.C12 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C13 , y.C13 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C14 , y.C14 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C15 , y.C15 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C16 , y.C16 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C17 , y.C17 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C18 , y.C18 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C19 , y.C19 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C20 , y.C20 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C21 , y.C21 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C22 , y.C22 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C23 , y.C23 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C24 , y.C24 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C25 , y.C25 ); \ + } \ + template \ + int compare (const NAME &x, const NAME &y) { \ + int cmp; \ + cmp = mysqlpp::sql_cmp(x.C1 , y.C1 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C2 , y.C2 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C3 , y.C3 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C4 , y.C4 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C5 , y.C5 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C6 , y.C6 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C7 , y.C7 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C8 , y.C8 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C9 , y.C9 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C10 , y.C10 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C11 , y.C11 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C12 , y.C12 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C13 , y.C13 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C14 , y.C14 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C15 , y.C15 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C16 , y.C16 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C17 , y.C17 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C18 , y.C18 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C19 , y.C19 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C20 , y.C20 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C21 , y.C21 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C22 , y.C22 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C23 , y.C23 ); \ + if (cmp) return cmp; \ + cmp = mysqlpp::sql_cmp(x.C24 , y.C24 ); \ + if (cmp) return cmp; \ + return mysqlpp::sql_cmp(x.C25 , y.C25 ); \ + } + +// --------------------------------------------------- +// End Compare 25 +// --------------------------------------------------- + +// --------------------------------------------------- +// Begin Create 1 +// --------------------------------------------------- +#define sql_create_complete_1(NAME, CMP, CONTR, T1, I1, N1) \ + struct NAME; \ + enum NAME##_enum { \ + NAME##_##I1 \ + ,NAME##_NULL \ + }; \ + template \ + class NAME##_value_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_value_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_##field_list {\ + public: \ + const NAME *obj; \ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_field_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_equal_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public: \ + NAME##_equal_list (const NAME *o, const char *d, const char *c, Manip m) \ + : obj(o), delim(d), comp(c), manip(m) {}\ + };\ + template \ + class NAME##_cus_value_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_value_list () {if (del_vector) delete include;} \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, bool i1);\ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, NAME##_enum i1); \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m ,std::vector* i)\ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_field_list { \ + public:\ + const NAME *obj; \ + std::vector *include; \ + bool del_vector; \ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_field_list () {if (del_vector) delete include;} \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, bool i1); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, NAME##_enum i1); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_equal_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public:\ + ~NAME##_##cus_equal_list () {if (del_vector) delete include;}\ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, bool i1); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), comp(c), manip(m) {}\ + };\ + template int sql_compare_##NAME(const NAME&, const NAME&);\ + struct NAME { \ + T1 I1; \ + NAME() : table_override_(0) {} \ + NAME(const mysqlpp::Row& row);\ + void set(const mysqlpp::Row &row);\ + sql_compare_define_##CMP(NAME, T1, I1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + sql_construct_define_##CONTR(NAME, T1, I1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + static const char* names[];\ + static void table(const char* t) { table_ = t; }\ + const char* const table() const\ + { return table_override_ ? table_override_ : NAME::table_; }\ + void instance_table(const char* t) { table_override_ = t; }\ + NAME##_value_list value_list() const {\ + return value_list(",", mysqlpp::quote);}\ + NAME##_value_list value_list(const char *d) const {\ + return value_list(d, mysqlpp::quote);}\ + template \ + NAME##_value_list value_list(const char *d, Manip m) const; \ + NAME##_field_list field_list() const {\ + return field_list(",", mysqlpp::do_nothing);}\ + NAME##_field_list field_list(const char *d) const {\ + return field_list(d, mysqlpp::do_nothing);}\ + template \ + NAME##_field_list field_list(const char *d, Manip m) const; \ + NAME##_equal_list equal_list(const char *d = ",", \ + const char *c = " = ") const{\ + return equal_list(d, c, mysqlpp::quote);}\ + template \ + NAME##_equal_list equal_list(const char *d, const char *c, Manip m) const; \ + /* cus_data */\ + NAME##_cus_value_list value_list(bool i1) const {\ + return value_list(",", mysqlpp::quote, i1);\ + }\ + NAME##_cus_value_list value_list(NAME##_enum i1) const {\ + return value_list(",", mysqlpp::quote, i1);\ + }\ + NAME##_cus_value_list value_list(std::vector *i) const {\ + return value_list(",", mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(mysqlpp::sql_cmp_type sc) const {\ + return value_list(",", mysqlpp::quote, sc);\ + }\ + NAME##_cus_value_list value_list(const char *d, bool i1) const {\ + return value_list(d, mysqlpp::quote, i1);\ + }\ + NAME##_cus_value_list value_list(const char *d, NAME##_enum i1) const {\ + return value_list(d, mysqlpp::quote, i1);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + std::vector *i) const {\ + return value_list(d, mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return value_list(d, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + bool i1) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + NAME##_enum i1) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus field */\ + NAME##_cus_field_list field_list(bool i1) const {\ + return field_list(",", mysqlpp::do_nothing, i1);\ + }\ + NAME##_cus_field_list field_list(NAME##_enum i1) const {\ + return field_list(",", mysqlpp::do_nothing, i1);\ + }\ + NAME##_cus_field_list field_list(std::vector *i) const {\ + return field_list(",", mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(mysqlpp::sql_cmp_type sc) const\ + {\ + return field_list(",", mysqlpp::do_nothing, sc);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + bool i1) const {\ + return field_list(d, mysqlpp::do_nothing, i1);\ + }\ + NAME##_cus_field_list field_list(const char *d,\ + NAME##_enum i1) const {\ + return field_list(d, mysqlpp::do_nothing, i1);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + std::vector *i) const {\ + return field_list(d, mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return field_list(d, mysqlpp::do_nothing, sc);\ + }\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + bool i1) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + NAME##_enum i1) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + std::vector *i) const;\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus equal */\ + NAME##_cus_equal_list equal_list(bool i1) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1);\ + }\ + NAME##_cus_equal_list equal_list(NAME##_enum i1) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1);\ + }\ + NAME##_cus_equal_list equal_list(std::vector *i) const {\ + return equal_list(",", " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(mysqlpp::sql_cmp_type sc) const {\ + return equal_list(",", " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, bool i1) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, NAME##_enum i1) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + std::vector *i) const {\ + return equal_list(d, " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + bool i1) const {\ + return equal_list(d, c, mysqlpp::quote, i1);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + NAME##_enum i1) const {\ + return equal_list(d, c, mysqlpp::quote, i1);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + std::vector *i) const {\ + return equal_list(d, c, mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, c, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + bool i1) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + private:\ + static const char* table_;\ + const char* table_override_;\ + }; \ + MYSQLPP_SSQLS_CONDITIONAL_STATICS(\ + const char *NAME::names[] = { \ + N1 \ + }; \ + const char* NAME::table_ = #NAME;\ + )\ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, bool i1) \ + { \ + delim = d;\ + manip = m;\ + del_vector = true;\ + obj = o; \ + include = new std::vector(1, false);\ + if (i1) (*include)[0]=true;\ + } \ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(1, false); \ + (*include)[i1]=true;\ + }\ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, bool i1) {\ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(1, false); \ + if (i1) (*include)[0]=true;\ + } \ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(1, false); \ + (*include)[i1]=true;\ + }\ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, bool i1) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(1, false); \ + if (i1) (*include)[0]=true;\ + } \ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(1, false); \ + (*include)[i1]=true;\ + }\ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_value_list& obj) { \ + s << obj.manip << obj.obj->I1; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_field_list& obj) { \ + s << obj.manip << obj.obj->names[0]; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_equal_list& obj) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_value_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->I1;\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_field_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->names[0];\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_equal_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1;\ + } \ + return s; \ + } \ + template \ + inline NAME##_value_list NAME::value_list(const char *d, Manip m) const { \ + return NAME##_value_list (this, d, m); \ + } \ + template \ + inline NAME##_field_list NAME::field_list(const char *d, Manip m) const { \ + return NAME##_field_list (this, d, m); \ + } \ + template \ + inline NAME##_equal_list NAME::equal_list(const char *d, const char *c, Manip m) const { \ + return NAME##_equal_list (this, d, c, m); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + bool i1) const {\ + return NAME##_cus_value_list (this, d, m, i1); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + bool i1) const { \ + return NAME##_cus_field_list (this, d, m, i1); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + bool i1) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + NAME##_enum i1) const { \ + return NAME##_cus_value_list (this, d, m, i1); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + NAME##_enum i1) const {\ + return NAME##_cus_field_list (this, d, m, i1); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_value_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_field_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_equal_list (this, d, c, m, i);\ + }\ + template \ + inline NAME##_cus_value_list \ + NAME::value_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, value, NUM);\ + }\ + template \ + inline NAME##_cus_field_list \ + NAME::field_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, field, NUM);\ + }\ + template \ + inline NAME##_cus_equal_list \ + NAME::equal_list(const char *d, const char *c, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_defe_##CMP(NAME, equal, NUM);\ + }\ + template \ + void populate_##NAME(NAME *s, const mysqlpp::Row &row) { \ + mysqlpp::NoExceptions ignore_schema_mismatches(row);\ + s->I1 = row[N1].conv(T1());\ + } \ + inline NAME::NAME(const mysqlpp::Row& row) :\ + table_override_(0)\ + {\ + populate_##NAME(this, row);\ + }\ + inline void NAME::set(const mysqlpp::Row& row)\ + {\ + populate_##NAME(this, row);\ + }\ + sql_COMPARE__##CMP(NAME, I1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ) + +#define sql_create_1(NAME, CMP, CONTR, T1, I1) \ + sql_create_complete_1(NAME, CMP, CONTR, T1, I1, #I1) \ + +// --------------------------------------------------- +// End Create 1 +// --------------------------------------------------- + +// --------------------------------------------------- +// Begin Create 2 +// --------------------------------------------------- +#define sql_create_complete_2(NAME, CMP, CONTR, T1, I1, N1, T2, I2, N2) \ + struct NAME; \ + enum NAME##_enum { \ + NAME##_##I1,\ + NAME##_##I2 \ + ,NAME##_NULL \ + }; \ + template \ + class NAME##_value_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_value_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_##field_list {\ + public: \ + const NAME *obj; \ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_field_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_equal_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public: \ + NAME##_equal_list (const NAME *o, const char *d, const char *c, Manip m) \ + : obj(o), delim(d), comp(c), manip(m) {}\ + };\ + template \ + class NAME##_cus_value_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_value_list () {if (del_vector) delete include;} \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, bool i1, bool i2);\ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2); \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m ,std::vector* i)\ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_field_list { \ + public:\ + const NAME *obj; \ + std::vector *include; \ + bool del_vector; \ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_field_list () {if (del_vector) delete include;} \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, bool i1, bool i2); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_equal_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public:\ + ~NAME##_##cus_equal_list () {if (del_vector) delete include;}\ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), comp(c), manip(m) {}\ + };\ + template int sql_compare_##NAME(const NAME&, const NAME&);\ + struct NAME { \ + T1 I1;\ + T2 I2; \ + NAME() : table_override_(0) {} \ + NAME(const mysqlpp::Row& row);\ + void set(const mysqlpp::Row &row);\ + sql_compare_define_##CMP(NAME, T1, I1, T2, I2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + sql_construct_define_##CONTR(NAME, T1, I1, T2, I2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + static const char* names[];\ + static void table(const char* t) { table_ = t; }\ + const char* const table() const\ + { return table_override_ ? table_override_ : NAME::table_; }\ + void instance_table(const char* t) { table_override_ = t; }\ + NAME##_value_list value_list() const {\ + return value_list(",", mysqlpp::quote);}\ + NAME##_value_list value_list(const char *d) const {\ + return value_list(d, mysqlpp::quote);}\ + template \ + NAME##_value_list value_list(const char *d, Manip m) const; \ + NAME##_field_list field_list() const {\ + return field_list(",", mysqlpp::do_nothing);}\ + NAME##_field_list field_list(const char *d) const {\ + return field_list(d, mysqlpp::do_nothing);}\ + template \ + NAME##_field_list field_list(const char *d, Manip m) const; \ + NAME##_equal_list equal_list(const char *d = ",", \ + const char *c = " = ") const{\ + return equal_list(d, c, mysqlpp::quote);}\ + template \ + NAME##_equal_list equal_list(const char *d, const char *c, Manip m) const; \ + /* cus_data */\ + NAME##_cus_value_list value_list(bool i1, bool i2 = false) const {\ + return value_list(",", mysqlpp::quote, i1, i2);\ + }\ + NAME##_cus_value_list value_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL) const {\ + return value_list(",", mysqlpp::quote, i1, i2);\ + }\ + NAME##_cus_value_list value_list(std::vector *i) const {\ + return value_list(",", mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(mysqlpp::sql_cmp_type sc) const {\ + return value_list(",", mysqlpp::quote, sc);\ + }\ + NAME##_cus_value_list value_list(const char *d, bool i1, bool i2 = false) const {\ + return value_list(d, mysqlpp::quote, i1, i2);\ + }\ + NAME##_cus_value_list value_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL) const {\ + return value_list(d, mysqlpp::quote, i1, i2);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + std::vector *i) const {\ + return value_list(d, mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return value_list(d, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + bool i1, bool i2 = false) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus field */\ + NAME##_cus_field_list field_list(bool i1, bool i2 = false) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2);\ + }\ + NAME##_cus_field_list field_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2);\ + }\ + NAME##_cus_field_list field_list(std::vector *i) const {\ + return field_list(",", mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(mysqlpp::sql_cmp_type sc) const\ + {\ + return field_list(",", mysqlpp::do_nothing, sc);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + bool i1, bool i2 = false) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2);\ + }\ + NAME##_cus_field_list field_list(const char *d,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + std::vector *i) const {\ + return field_list(d, mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return field_list(d, mysqlpp::do_nothing, sc);\ + }\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + bool i1, bool i2 = false) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + std::vector *i) const;\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus equal */\ + NAME##_cus_equal_list equal_list(bool i1, bool i2 = false) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2);\ + }\ + NAME##_cus_equal_list equal_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2);\ + }\ + NAME##_cus_equal_list equal_list(std::vector *i) const {\ + return equal_list(",", " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(mysqlpp::sql_cmp_type sc) const {\ + return equal_list(",", " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, bool i1, bool i2 = false) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + std::vector *i) const {\ + return equal_list(d, " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + bool i1, bool i2 = false) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + std::vector *i) const {\ + return equal_list(d, c, mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, c, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + bool i1, bool i2 = false) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + private:\ + static const char* table_;\ + const char* table_override_;\ + }; \ + MYSQLPP_SSQLS_CONDITIONAL_STATICS(\ + const char *NAME::names[] = { \ + N1 ,\ + N2 \ + }; \ + const char* NAME::table_ = #NAME;\ + )\ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2) \ + { \ + delim = d;\ + manip = m;\ + del_vector = true;\ + obj = o; \ + include = new std::vector(2, false);\ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + } \ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(2, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + }\ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2) {\ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(2, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + } \ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(2, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + }\ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(2, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + } \ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(2, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + }\ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_value_list& obj) { \ + s << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.manip << obj.obj->I2; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_field_list& obj) { \ + s << obj.manip << obj.obj->names[0] << obj.delim;\ + s << obj.manip << obj.obj->names[1]; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_equal_list& obj) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_value_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I2;\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_field_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->names[0];\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[1];\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_equal_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2;\ + } \ + return s; \ + } \ + template \ + inline NAME##_value_list NAME::value_list(const char *d, Manip m) const { \ + return NAME##_value_list (this, d, m); \ + } \ + template \ + inline NAME##_field_list NAME::field_list(const char *d, Manip m) const { \ + return NAME##_field_list (this, d, m); \ + } \ + template \ + inline NAME##_equal_list NAME::equal_list(const char *d, const char *c, Manip m) const { \ + return NAME##_equal_list (this, d, c, m); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + bool i1, bool i2) const {\ + return NAME##_cus_value_list (this, d, m, i1, i2); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + bool i1, bool i2) const { \ + return NAME##_cus_field_list (this, d, m, i1, i2); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + bool i1, bool i2) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2) const { \ + return NAME##_cus_value_list (this, d, m, i1, i2); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2) const {\ + return NAME##_cus_field_list (this, d, m, i1, i2); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_value_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_field_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_equal_list (this, d, c, m, i);\ + }\ + template \ + inline NAME##_cus_value_list \ + NAME::value_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, value, NUM);\ + }\ + template \ + inline NAME##_cus_field_list \ + NAME::field_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, field, NUM);\ + }\ + template \ + inline NAME##_cus_equal_list \ + NAME::equal_list(const char *d, const char *c, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_defe_##CMP(NAME, equal, NUM);\ + }\ + template \ + void populate_##NAME(NAME *s, const mysqlpp::Row &row) { \ + mysqlpp::NoExceptions ignore_schema_mismatches(row);\ + s->I1 = row[N1].conv(T1());\ + s->I2 = row[N2].conv(T2());\ + } \ + inline NAME::NAME(const mysqlpp::Row& row) :\ + table_override_(0)\ + {\ + populate_##NAME(this, row);\ + }\ + inline void NAME::set(const mysqlpp::Row& row)\ + {\ + populate_##NAME(this, row);\ + }\ + sql_COMPARE__##CMP(NAME, I1, I2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ) + +#define sql_create_2(NAME, CMP, CONTR, T1, I1, T2, I2) \ + sql_create_complete_2(NAME, CMP, CONTR, T1, I1, #I1, T2, I2, #I2) \ + +// --------------------------------------------------- +// End Create 2 +// --------------------------------------------------- + +// --------------------------------------------------- +// Begin Create 3 +// --------------------------------------------------- +#define sql_create_complete_3(NAME, CMP, CONTR, T1, I1, N1, T2, I2, N2, T3, I3, N3) \ + struct NAME; \ + enum NAME##_enum { \ + NAME##_##I1,\ + NAME##_##I2,\ + NAME##_##I3 \ + ,NAME##_NULL \ + }; \ + template \ + class NAME##_value_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_value_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_##field_list {\ + public: \ + const NAME *obj; \ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_field_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_equal_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public: \ + NAME##_equal_list (const NAME *o, const char *d, const char *c, Manip m) \ + : obj(o), delim(d), comp(c), manip(m) {}\ + };\ + template \ + class NAME##_cus_value_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_value_list () {if (del_vector) delete include;} \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3);\ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3); \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m ,std::vector* i)\ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_field_list { \ + public:\ + const NAME *obj; \ + std::vector *include; \ + bool del_vector; \ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_field_list () {if (del_vector) delete include;} \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_equal_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public:\ + ~NAME##_##cus_equal_list () {if (del_vector) delete include;}\ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), comp(c), manip(m) {}\ + };\ + template int sql_compare_##NAME(const NAME&, const NAME&);\ + struct NAME { \ + T1 I1;\ + T2 I2;\ + T3 I3; \ + NAME() : table_override_(0) {} \ + NAME(const mysqlpp::Row& row);\ + void set(const mysqlpp::Row &row);\ + sql_compare_define_##CMP(NAME, T1, I1, T2, I2, T3, I3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + sql_construct_define_##CONTR(NAME, T1, I1, T2, I2, T3, I3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + static const char* names[];\ + static void table(const char* t) { table_ = t; }\ + const char* const table() const\ + { return table_override_ ? table_override_ : NAME::table_; }\ + void instance_table(const char* t) { table_override_ = t; }\ + NAME##_value_list value_list() const {\ + return value_list(",", mysqlpp::quote);}\ + NAME##_value_list value_list(const char *d) const {\ + return value_list(d, mysqlpp::quote);}\ + template \ + NAME##_value_list value_list(const char *d, Manip m) const; \ + NAME##_field_list field_list() const {\ + return field_list(",", mysqlpp::do_nothing);}\ + NAME##_field_list field_list(const char *d) const {\ + return field_list(d, mysqlpp::do_nothing);}\ + template \ + NAME##_field_list field_list(const char *d, Manip m) const; \ + NAME##_equal_list equal_list(const char *d = ",", \ + const char *c = " = ") const{\ + return equal_list(d, c, mysqlpp::quote);}\ + template \ + NAME##_equal_list equal_list(const char *d, const char *c, Manip m) const; \ + /* cus_data */\ + NAME##_cus_value_list value_list(bool i1, bool i2 = false, bool i3 = false) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3);\ + }\ + NAME##_cus_value_list value_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3);\ + }\ + NAME##_cus_value_list value_list(std::vector *i) const {\ + return value_list(",", mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(mysqlpp::sql_cmp_type sc) const {\ + return value_list(",", mysqlpp::quote, sc);\ + }\ + NAME##_cus_value_list value_list(const char *d, bool i1, bool i2 = false, bool i3 = false) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3);\ + }\ + NAME##_cus_value_list value_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + std::vector *i) const {\ + return value_list(d, mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return value_list(d, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus field */\ + NAME##_cus_field_list field_list(bool i1, bool i2 = false, bool i3 = false) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3);\ + }\ + NAME##_cus_field_list field_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3);\ + }\ + NAME##_cus_field_list field_list(std::vector *i) const {\ + return field_list(",", mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(mysqlpp::sql_cmp_type sc) const\ + {\ + return field_list(",", mysqlpp::do_nothing, sc);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + bool i1, bool i2 = false, bool i3 = false) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3);\ + }\ + NAME##_cus_field_list field_list(const char *d,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + std::vector *i) const {\ + return field_list(d, mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return field_list(d, mysqlpp::do_nothing, sc);\ + }\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + std::vector *i) const;\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus equal */\ + NAME##_cus_equal_list equal_list(bool i1, bool i2 = false, bool i3 = false) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3);\ + }\ + NAME##_cus_equal_list equal_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3);\ + }\ + NAME##_cus_equal_list equal_list(std::vector *i) const {\ + return equal_list(",", " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(mysqlpp::sql_cmp_type sc) const {\ + return equal_list(",", " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, bool i1, bool i2 = false, bool i3 = false) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + std::vector *i) const {\ + return equal_list(d, " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + bool i1, bool i2 = false, bool i3 = false) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + std::vector *i) const {\ + return equal_list(d, c, mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, c, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + bool i1, bool i2 = false, bool i3 = false) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + private:\ + static const char* table_;\ + const char* table_override_;\ + }; \ + MYSQLPP_SSQLS_CONDITIONAL_STATICS(\ + const char *NAME::names[] = { \ + N1 ,\ + N2 ,\ + N3 \ + }; \ + const char* NAME::table_ = #NAME;\ + )\ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3) \ + { \ + delim = d;\ + manip = m;\ + del_vector = true;\ + obj = o; \ + include = new std::vector(3, false);\ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + } \ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(3, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + }\ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3) {\ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(3, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + } \ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(3, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + }\ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(3, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + } \ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(3, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + }\ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_value_list& obj) { \ + s << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.manip << obj.obj->I3; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_field_list& obj) { \ + s << obj.manip << obj.obj->names[0] << obj.delim;\ + s << obj.manip << obj.obj->names[1] << obj.delim;\ + s << obj.manip << obj.obj->names[2]; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_equal_list& obj) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_value_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I3;\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_field_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->names[0];\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[1];\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[2];\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_equal_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3;\ + } \ + return s; \ + } \ + template \ + inline NAME##_value_list NAME::value_list(const char *d, Manip m) const { \ + return NAME##_value_list (this, d, m); \ + } \ + template \ + inline NAME##_field_list NAME::field_list(const char *d, Manip m) const { \ + return NAME##_field_list (this, d, m); \ + } \ + template \ + inline NAME##_equal_list NAME::equal_list(const char *d, const char *c, Manip m) const { \ + return NAME##_equal_list (this, d, c, m); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3) const {\ + return NAME##_cus_value_list (this, d, m, i1, i2, i3); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3) const { \ + return NAME##_cus_field_list (this, d, m, i1, i2, i3); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + bool i1, bool i2, bool i3) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3) const { \ + return NAME##_cus_value_list (this, d, m, i1, i2, i3); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3) const {\ + return NAME##_cus_field_list (this, d, m, i1, i2, i3); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_value_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_field_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_equal_list (this, d, c, m, i);\ + }\ + template \ + inline NAME##_cus_value_list \ + NAME::value_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, value, NUM);\ + }\ + template \ + inline NAME##_cus_field_list \ + NAME::field_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, field, NUM);\ + }\ + template \ + inline NAME##_cus_equal_list \ + NAME::equal_list(const char *d, const char *c, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_defe_##CMP(NAME, equal, NUM);\ + }\ + template \ + void populate_##NAME(NAME *s, const mysqlpp::Row &row) { \ + mysqlpp::NoExceptions ignore_schema_mismatches(row);\ + s->I1 = row[N1].conv(T1());\ + s->I2 = row[N2].conv(T2());\ + s->I3 = row[N3].conv(T3());\ + } \ + inline NAME::NAME(const mysqlpp::Row& row) :\ + table_override_(0)\ + {\ + populate_##NAME(this, row);\ + }\ + inline void NAME::set(const mysqlpp::Row& row)\ + {\ + populate_##NAME(this, row);\ + }\ + sql_COMPARE__##CMP(NAME, I1, I2, I3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ) + +#define sql_create_3(NAME, CMP, CONTR, T1, I1, T2, I2, T3, I3) \ + sql_create_complete_3(NAME, CMP, CONTR, T1, I1, #I1, T2, I2, #I2, T3, I3, #I3) \ + +// --------------------------------------------------- +// End Create 3 +// --------------------------------------------------- + +// --------------------------------------------------- +// Begin Create 4 +// --------------------------------------------------- +#define sql_create_complete_4(NAME, CMP, CONTR, T1, I1, N1, T2, I2, N2, T3, I3, N3, T4, I4, N4) \ + struct NAME; \ + enum NAME##_enum { \ + NAME##_##I1,\ + NAME##_##I2,\ + NAME##_##I3,\ + NAME##_##I4 \ + ,NAME##_NULL \ + }; \ + template \ + class NAME##_value_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_value_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_##field_list {\ + public: \ + const NAME *obj; \ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_field_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_equal_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public: \ + NAME##_equal_list (const NAME *o, const char *d, const char *c, Manip m) \ + : obj(o), delim(d), comp(c), manip(m) {}\ + };\ + template \ + class NAME##_cus_value_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_value_list () {if (del_vector) delete include;} \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4);\ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4); \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m ,std::vector* i)\ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_field_list { \ + public:\ + const NAME *obj; \ + std::vector *include; \ + bool del_vector; \ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_field_list () {if (del_vector) delete include;} \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_equal_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public:\ + ~NAME##_##cus_equal_list () {if (del_vector) delete include;}\ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), comp(c), manip(m) {}\ + };\ + template int sql_compare_##NAME(const NAME&, const NAME&);\ + struct NAME { \ + T1 I1;\ + T2 I2;\ + T3 I3;\ + T4 I4; \ + NAME() : table_override_(0) {} \ + NAME(const mysqlpp::Row& row);\ + void set(const mysqlpp::Row &row);\ + sql_compare_define_##CMP(NAME, T1, I1, T2, I2, T3, I3, T4, I4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + sql_construct_define_##CONTR(NAME, T1, I1, T2, I2, T3, I3, T4, I4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + static const char* names[];\ + static void table(const char* t) { table_ = t; }\ + const char* const table() const\ + { return table_override_ ? table_override_ : NAME::table_; }\ + void instance_table(const char* t) { table_override_ = t; }\ + NAME##_value_list value_list() const {\ + return value_list(",", mysqlpp::quote);}\ + NAME##_value_list value_list(const char *d) const {\ + return value_list(d, mysqlpp::quote);}\ + template \ + NAME##_value_list value_list(const char *d, Manip m) const; \ + NAME##_field_list field_list() const {\ + return field_list(",", mysqlpp::do_nothing);}\ + NAME##_field_list field_list(const char *d) const {\ + return field_list(d, mysqlpp::do_nothing);}\ + template \ + NAME##_field_list field_list(const char *d, Manip m) const; \ + NAME##_equal_list equal_list(const char *d = ",", \ + const char *c = " = ") const{\ + return equal_list(d, c, mysqlpp::quote);}\ + template \ + NAME##_equal_list equal_list(const char *d, const char *c, Manip m) const; \ + /* cus_data */\ + NAME##_cus_value_list value_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4);\ + }\ + NAME##_cus_value_list value_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4);\ + }\ + NAME##_cus_value_list value_list(std::vector *i) const {\ + return value_list(",", mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(mysqlpp::sql_cmp_type sc) const {\ + return value_list(",", mysqlpp::quote, sc);\ + }\ + NAME##_cus_value_list value_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4);\ + }\ + NAME##_cus_value_list value_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + std::vector *i) const {\ + return value_list(d, mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return value_list(d, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus field */\ + NAME##_cus_field_list field_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4);\ + }\ + NAME##_cus_field_list field_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4);\ + }\ + NAME##_cus_field_list field_list(std::vector *i) const {\ + return field_list(",", mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(mysqlpp::sql_cmp_type sc) const\ + {\ + return field_list(",", mysqlpp::do_nothing, sc);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4);\ + }\ + NAME##_cus_field_list field_list(const char *d,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + std::vector *i) const {\ + return field_list(d, mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return field_list(d, mysqlpp::do_nothing, sc);\ + }\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + std::vector *i) const;\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus equal */\ + NAME##_cus_equal_list equal_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4);\ + }\ + NAME##_cus_equal_list equal_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4);\ + }\ + NAME##_cus_equal_list equal_list(std::vector *i) const {\ + return equal_list(",", " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(mysqlpp::sql_cmp_type sc) const {\ + return equal_list(",", " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + std::vector *i) const {\ + return equal_list(d, " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + std::vector *i) const {\ + return equal_list(d, c, mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, c, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + private:\ + static const char* table_;\ + const char* table_override_;\ + }; \ + MYSQLPP_SSQLS_CONDITIONAL_STATICS(\ + const char *NAME::names[] = { \ + N1 ,\ + N2 ,\ + N3 ,\ + N4 \ + }; \ + const char* NAME::table_ = #NAME;\ + )\ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4) \ + { \ + delim = d;\ + manip = m;\ + del_vector = true;\ + obj = o; \ + include = new std::vector(4, false);\ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + } \ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(4, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + }\ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4) {\ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(4, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + } \ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(4, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + }\ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(4, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + } \ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(4, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + }\ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_value_list& obj) { \ + s << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.manip << obj.obj->I4; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_field_list& obj) { \ + s << obj.manip << obj.obj->names[0] << obj.delim;\ + s << obj.manip << obj.obj->names[1] << obj.delim;\ + s << obj.manip << obj.obj->names[2] << obj.delim;\ + s << obj.manip << obj.obj->names[3]; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_equal_list& obj) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_value_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I4;\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_field_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->names[0];\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[1];\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[2];\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[3];\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_equal_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4;\ + } \ + return s; \ + } \ + template \ + inline NAME##_value_list NAME::value_list(const char *d, Manip m) const { \ + return NAME##_value_list (this, d, m); \ + } \ + template \ + inline NAME##_field_list NAME::field_list(const char *d, Manip m) const { \ + return NAME##_field_list (this, d, m); \ + } \ + template \ + inline NAME##_equal_list NAME::equal_list(const char *d, const char *c, Manip m) const { \ + return NAME##_equal_list (this, d, c, m); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4) const {\ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4) const { \ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + bool i1, bool i2, bool i3, bool i4) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4) const { \ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4) const {\ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_value_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_field_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_equal_list (this, d, c, m, i);\ + }\ + template \ + inline NAME##_cus_value_list \ + NAME::value_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, value, NUM);\ + }\ + template \ + inline NAME##_cus_field_list \ + NAME::field_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, field, NUM);\ + }\ + template \ + inline NAME##_cus_equal_list \ + NAME::equal_list(const char *d, const char *c, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_defe_##CMP(NAME, equal, NUM);\ + }\ + template \ + void populate_##NAME(NAME *s, const mysqlpp::Row &row) { \ + mysqlpp::NoExceptions ignore_schema_mismatches(row);\ + s->I1 = row[N1].conv(T1());\ + s->I2 = row[N2].conv(T2());\ + s->I3 = row[N3].conv(T3());\ + s->I4 = row[N4].conv(T4());\ + } \ + inline NAME::NAME(const mysqlpp::Row& row) :\ + table_override_(0)\ + {\ + populate_##NAME(this, row);\ + }\ + inline void NAME::set(const mysqlpp::Row& row)\ + {\ + populate_##NAME(this, row);\ + }\ + sql_COMPARE__##CMP(NAME, I1, I2, I3, I4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ) + +#define sql_create_4(NAME, CMP, CONTR, T1, I1, T2, I2, T3, I3, T4, I4) \ + sql_create_complete_4(NAME, CMP, CONTR, T1, I1, #I1, T2, I2, #I2, T3, I3, #I3, T4, I4, #I4) \ + +// --------------------------------------------------- +// End Create 4 +// --------------------------------------------------- + +// --------------------------------------------------- +// Begin Create 5 +// --------------------------------------------------- +#define sql_create_complete_5(NAME, CMP, CONTR, T1, I1, N1, T2, I2, N2, T3, I3, N3, T4, I4, N4, T5, I5, N5) \ + struct NAME; \ + enum NAME##_enum { \ + NAME##_##I1,\ + NAME##_##I2,\ + NAME##_##I3,\ + NAME##_##I4,\ + NAME##_##I5 \ + ,NAME##_NULL \ + }; \ + template \ + class NAME##_value_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_value_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_##field_list {\ + public: \ + const NAME *obj; \ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_field_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_equal_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public: \ + NAME##_equal_list (const NAME *o, const char *d, const char *c, Manip m) \ + : obj(o), delim(d), comp(c), manip(m) {}\ + };\ + template \ + class NAME##_cus_value_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_value_list () {if (del_vector) delete include;} \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5);\ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5); \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m ,std::vector* i)\ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_field_list { \ + public:\ + const NAME *obj; \ + std::vector *include; \ + bool del_vector; \ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_field_list () {if (del_vector) delete include;} \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_equal_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public:\ + ~NAME##_##cus_equal_list () {if (del_vector) delete include;}\ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), comp(c), manip(m) {}\ + };\ + template int sql_compare_##NAME(const NAME&, const NAME&);\ + struct NAME { \ + T1 I1;\ + T2 I2;\ + T3 I3;\ + T4 I4;\ + T5 I5; \ + NAME() : table_override_(0) {} \ + NAME(const mysqlpp::Row& row);\ + void set(const mysqlpp::Row &row);\ + sql_compare_define_##CMP(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + sql_construct_define_##CONTR(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + static const char* names[];\ + static void table(const char* t) { table_ = t; }\ + const char* const table() const\ + { return table_override_ ? table_override_ : NAME::table_; }\ + void instance_table(const char* t) { table_override_ = t; }\ + NAME##_value_list value_list() const {\ + return value_list(",", mysqlpp::quote);}\ + NAME##_value_list value_list(const char *d) const {\ + return value_list(d, mysqlpp::quote);}\ + template \ + NAME##_value_list value_list(const char *d, Manip m) const; \ + NAME##_field_list field_list() const {\ + return field_list(",", mysqlpp::do_nothing);}\ + NAME##_field_list field_list(const char *d) const {\ + return field_list(d, mysqlpp::do_nothing);}\ + template \ + NAME##_field_list field_list(const char *d, Manip m) const; \ + NAME##_equal_list equal_list(const char *d = ",", \ + const char *c = " = ") const{\ + return equal_list(d, c, mysqlpp::quote);}\ + template \ + NAME##_equal_list equal_list(const char *d, const char *c, Manip m) const; \ + /* cus_data */\ + NAME##_cus_value_list value_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5);\ + }\ + NAME##_cus_value_list value_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5);\ + }\ + NAME##_cus_value_list value_list(std::vector *i) const {\ + return value_list(",", mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(mysqlpp::sql_cmp_type sc) const {\ + return value_list(",", mysqlpp::quote, sc);\ + }\ + NAME##_cus_value_list value_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5);\ + }\ + NAME##_cus_value_list value_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + std::vector *i) const {\ + return value_list(d, mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return value_list(d, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus field */\ + NAME##_cus_field_list field_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5);\ + }\ + NAME##_cus_field_list field_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5);\ + }\ + NAME##_cus_field_list field_list(std::vector *i) const {\ + return field_list(",", mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(mysqlpp::sql_cmp_type sc) const\ + {\ + return field_list(",", mysqlpp::do_nothing, sc);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5);\ + }\ + NAME##_cus_field_list field_list(const char *d,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + std::vector *i) const {\ + return field_list(d, mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return field_list(d, mysqlpp::do_nothing, sc);\ + }\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + std::vector *i) const;\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus equal */\ + NAME##_cus_equal_list equal_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5);\ + }\ + NAME##_cus_equal_list equal_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5);\ + }\ + NAME##_cus_equal_list equal_list(std::vector *i) const {\ + return equal_list(",", " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(mysqlpp::sql_cmp_type sc) const {\ + return equal_list(",", " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + std::vector *i) const {\ + return equal_list(d, " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + std::vector *i) const {\ + return equal_list(d, c, mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, c, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + private:\ + static const char* table_;\ + const char* table_override_;\ + }; \ + MYSQLPP_SSQLS_CONDITIONAL_STATICS(\ + const char *NAME::names[] = { \ + N1 ,\ + N2 ,\ + N3 ,\ + N4 ,\ + N5 \ + }; \ + const char* NAME::table_ = #NAME;\ + )\ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5) \ + { \ + delim = d;\ + manip = m;\ + del_vector = true;\ + obj = o; \ + include = new std::vector(5, false);\ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + } \ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(5, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + }\ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5) {\ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(5, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + } \ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(5, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + }\ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(5, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + } \ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(5, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + }\ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_value_list& obj) { \ + s << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.manip << obj.obj->I5; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_field_list& obj) { \ + s << obj.manip << obj.obj->names[0] << obj.delim;\ + s << obj.manip << obj.obj->names[1] << obj.delim;\ + s << obj.manip << obj.obj->names[2] << obj.delim;\ + s << obj.manip << obj.obj->names[3] << obj.delim;\ + s << obj.manip << obj.obj->names[4]; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_equal_list& obj) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_value_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I5;\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_field_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->names[0];\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[1];\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[2];\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[3];\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[4];\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_equal_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5;\ + } \ + return s; \ + } \ + template \ + inline NAME##_value_list NAME::value_list(const char *d, Manip m) const { \ + return NAME##_value_list (this, d, m); \ + } \ + template \ + inline NAME##_field_list NAME::field_list(const char *d, Manip m) const { \ + return NAME##_field_list (this, d, m); \ + } \ + template \ + inline NAME##_equal_list NAME::equal_list(const char *d, const char *c, Manip m) const { \ + return NAME##_equal_list (this, d, c, m); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5) const {\ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5) const { \ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5) const { \ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5) const {\ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_value_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_field_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_equal_list (this, d, c, m, i);\ + }\ + template \ + inline NAME##_cus_value_list \ + NAME::value_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, value, NUM);\ + }\ + template \ + inline NAME##_cus_field_list \ + NAME::field_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, field, NUM);\ + }\ + template \ + inline NAME##_cus_equal_list \ + NAME::equal_list(const char *d, const char *c, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_defe_##CMP(NAME, equal, NUM);\ + }\ + template \ + void populate_##NAME(NAME *s, const mysqlpp::Row &row) { \ + mysqlpp::NoExceptions ignore_schema_mismatches(row);\ + s->I1 = row[N1].conv(T1());\ + s->I2 = row[N2].conv(T2());\ + s->I3 = row[N3].conv(T3());\ + s->I4 = row[N4].conv(T4());\ + s->I5 = row[N5].conv(T5());\ + } \ + inline NAME::NAME(const mysqlpp::Row& row) :\ + table_override_(0)\ + {\ + populate_##NAME(this, row);\ + }\ + inline void NAME::set(const mysqlpp::Row& row)\ + {\ + populate_##NAME(this, row);\ + }\ + sql_COMPARE__##CMP(NAME, I1, I2, I3, I4, I5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ) + +#define sql_create_5(NAME, CMP, CONTR, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5) \ + sql_create_complete_5(NAME, CMP, CONTR, T1, I1, #I1, T2, I2, #I2, T3, I3, #I3, T4, I4, #I4, T5, I5, #I5) \ + +// --------------------------------------------------- +// End Create 5 +// --------------------------------------------------- + +// --------------------------------------------------- +// Begin Create 6 +// --------------------------------------------------- +#define sql_create_complete_6(NAME, CMP, CONTR, T1, I1, N1, T2, I2, N2, T3, I3, N3, T4, I4, N4, T5, I5, N5, T6, I6, N6) \ + struct NAME; \ + enum NAME##_enum { \ + NAME##_##I1,\ + NAME##_##I2,\ + NAME##_##I3,\ + NAME##_##I4,\ + NAME##_##I5,\ + NAME##_##I6 \ + ,NAME##_NULL \ + }; \ + template \ + class NAME##_value_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_value_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_##field_list {\ + public: \ + const NAME *obj; \ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_field_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_equal_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public: \ + NAME##_equal_list (const NAME *o, const char *d, const char *c, Manip m) \ + : obj(o), delim(d), comp(c), manip(m) {}\ + };\ + template \ + class NAME##_cus_value_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_value_list () {if (del_vector) delete include;} \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6);\ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6); \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m ,std::vector* i)\ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_field_list { \ + public:\ + const NAME *obj; \ + std::vector *include; \ + bool del_vector; \ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_field_list () {if (del_vector) delete include;} \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_equal_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public:\ + ~NAME##_##cus_equal_list () {if (del_vector) delete include;}\ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), comp(c), manip(m) {}\ + };\ + template int sql_compare_##NAME(const NAME&, const NAME&);\ + struct NAME { \ + T1 I1;\ + T2 I2;\ + T3 I3;\ + T4 I4;\ + T5 I5;\ + T6 I6; \ + NAME() : table_override_(0) {} \ + NAME(const mysqlpp::Row& row);\ + void set(const mysqlpp::Row &row);\ + sql_compare_define_##CMP(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + sql_construct_define_##CONTR(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + static const char* names[];\ + static void table(const char* t) { table_ = t; }\ + const char* const table() const\ + { return table_override_ ? table_override_ : NAME::table_; }\ + void instance_table(const char* t) { table_override_ = t; }\ + NAME##_value_list value_list() const {\ + return value_list(",", mysqlpp::quote);}\ + NAME##_value_list value_list(const char *d) const {\ + return value_list(d, mysqlpp::quote);}\ + template \ + NAME##_value_list value_list(const char *d, Manip m) const; \ + NAME##_field_list field_list() const {\ + return field_list(",", mysqlpp::do_nothing);}\ + NAME##_field_list field_list(const char *d) const {\ + return field_list(d, mysqlpp::do_nothing);}\ + template \ + NAME##_field_list field_list(const char *d, Manip m) const; \ + NAME##_equal_list equal_list(const char *d = ",", \ + const char *c = " = ") const{\ + return equal_list(d, c, mysqlpp::quote);}\ + template \ + NAME##_equal_list equal_list(const char *d, const char *c, Manip m) const; \ + /* cus_data */\ + NAME##_cus_value_list value_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6);\ + }\ + NAME##_cus_value_list value_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6);\ + }\ + NAME##_cus_value_list value_list(std::vector *i) const {\ + return value_list(",", mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(mysqlpp::sql_cmp_type sc) const {\ + return value_list(",", mysqlpp::quote, sc);\ + }\ + NAME##_cus_value_list value_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6);\ + }\ + NAME##_cus_value_list value_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + std::vector *i) const {\ + return value_list(d, mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return value_list(d, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus field */\ + NAME##_cus_field_list field_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6);\ + }\ + NAME##_cus_field_list field_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6);\ + }\ + NAME##_cus_field_list field_list(std::vector *i) const {\ + return field_list(",", mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(mysqlpp::sql_cmp_type sc) const\ + {\ + return field_list(",", mysqlpp::do_nothing, sc);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6);\ + }\ + NAME##_cus_field_list field_list(const char *d,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + std::vector *i) const {\ + return field_list(d, mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return field_list(d, mysqlpp::do_nothing, sc);\ + }\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + std::vector *i) const;\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus equal */\ + NAME##_cus_equal_list equal_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6);\ + }\ + NAME##_cus_equal_list equal_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6);\ + }\ + NAME##_cus_equal_list equal_list(std::vector *i) const {\ + return equal_list(",", " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(mysqlpp::sql_cmp_type sc) const {\ + return equal_list(",", " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + std::vector *i) const {\ + return equal_list(d, " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + std::vector *i) const {\ + return equal_list(d, c, mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, c, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + private:\ + static const char* table_;\ + const char* table_override_;\ + }; \ + MYSQLPP_SSQLS_CONDITIONAL_STATICS(\ + const char *NAME::names[] = { \ + N1 ,\ + N2 ,\ + N3 ,\ + N4 ,\ + N5 ,\ + N6 \ + }; \ + const char* NAME::table_ = #NAME;\ + )\ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6) \ + { \ + delim = d;\ + manip = m;\ + del_vector = true;\ + obj = o; \ + include = new std::vector(6, false);\ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + } \ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(6, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + }\ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6) {\ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(6, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + } \ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(6, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + }\ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(6, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + } \ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(6, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + }\ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_value_list& obj) { \ + s << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.manip << obj.obj->I6; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_field_list& obj) { \ + s << obj.manip << obj.obj->names[0] << obj.delim;\ + s << obj.manip << obj.obj->names[1] << obj.delim;\ + s << obj.manip << obj.obj->names[2] << obj.delim;\ + s << obj.manip << obj.obj->names[3] << obj.delim;\ + s << obj.manip << obj.obj->names[4] << obj.delim;\ + s << obj.manip << obj.obj->names[5]; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_equal_list& obj) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_value_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I6;\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_field_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->names[0];\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[1];\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[2];\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[3];\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[4];\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[5];\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_equal_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6;\ + } \ + return s; \ + } \ + template \ + inline NAME##_value_list NAME::value_list(const char *d, Manip m) const { \ + return NAME##_value_list (this, d, m); \ + } \ + template \ + inline NAME##_field_list NAME::field_list(const char *d, Manip m) const { \ + return NAME##_field_list (this, d, m); \ + } \ + template \ + inline NAME##_equal_list NAME::equal_list(const char *d, const char *c, Manip m) const { \ + return NAME##_equal_list (this, d, c, m); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6) const {\ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6) const { \ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6) const { \ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6) const {\ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_value_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_field_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_equal_list (this, d, c, m, i);\ + }\ + template \ + inline NAME##_cus_value_list \ + NAME::value_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, value, NUM);\ + }\ + template \ + inline NAME##_cus_field_list \ + NAME::field_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, field, NUM);\ + }\ + template \ + inline NAME##_cus_equal_list \ + NAME::equal_list(const char *d, const char *c, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_defe_##CMP(NAME, equal, NUM);\ + }\ + template \ + void populate_##NAME(NAME *s, const mysqlpp::Row &row) { \ + mysqlpp::NoExceptions ignore_schema_mismatches(row);\ + s->I1 = row[N1].conv(T1());\ + s->I2 = row[N2].conv(T2());\ + s->I3 = row[N3].conv(T3());\ + s->I4 = row[N4].conv(T4());\ + s->I5 = row[N5].conv(T5());\ + s->I6 = row[N6].conv(T6());\ + } \ + inline NAME::NAME(const mysqlpp::Row& row) :\ + table_override_(0)\ + {\ + populate_##NAME(this, row);\ + }\ + inline void NAME::set(const mysqlpp::Row& row)\ + {\ + populate_##NAME(this, row);\ + }\ + sql_COMPARE__##CMP(NAME, I1, I2, I3, I4, I5, I6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ) + +#define sql_create_6(NAME, CMP, CONTR, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6) \ + sql_create_complete_6(NAME, CMP, CONTR, T1, I1, #I1, T2, I2, #I2, T3, I3, #I3, T4, I4, #I4, T5, I5, #I5, T6, I6, #I6) \ + +// --------------------------------------------------- +// End Create 6 +// --------------------------------------------------- + +// --------------------------------------------------- +// Begin Create 7 +// --------------------------------------------------- +#define sql_create_complete_7(NAME, CMP, CONTR, T1, I1, N1, T2, I2, N2, T3, I3, N3, T4, I4, N4, T5, I5, N5, T6, I6, N6, T7, I7, N7) \ + struct NAME; \ + enum NAME##_enum { \ + NAME##_##I1,\ + NAME##_##I2,\ + NAME##_##I3,\ + NAME##_##I4,\ + NAME##_##I5,\ + NAME##_##I6,\ + NAME##_##I7 \ + ,NAME##_NULL \ + }; \ + template \ + class NAME##_value_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_value_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_##field_list {\ + public: \ + const NAME *obj; \ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_field_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_equal_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public: \ + NAME##_equal_list (const NAME *o, const char *d, const char *c, Manip m) \ + : obj(o), delim(d), comp(c), manip(m) {}\ + };\ + template \ + class NAME##_cus_value_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_value_list () {if (del_vector) delete include;} \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7);\ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7); \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m ,std::vector* i)\ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_field_list { \ + public:\ + const NAME *obj; \ + std::vector *include; \ + bool del_vector; \ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_field_list () {if (del_vector) delete include;} \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_equal_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public:\ + ~NAME##_##cus_equal_list () {if (del_vector) delete include;}\ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), comp(c), manip(m) {}\ + };\ + template int sql_compare_##NAME(const NAME&, const NAME&);\ + struct NAME { \ + T1 I1;\ + T2 I2;\ + T3 I3;\ + T4 I4;\ + T5 I5;\ + T6 I6;\ + T7 I7; \ + NAME() : table_override_(0) {} \ + NAME(const mysqlpp::Row& row);\ + void set(const mysqlpp::Row &row);\ + sql_compare_define_##CMP(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + sql_construct_define_##CONTR(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + static const char* names[];\ + static void table(const char* t) { table_ = t; }\ + const char* const table() const\ + { return table_override_ ? table_override_ : NAME::table_; }\ + void instance_table(const char* t) { table_override_ = t; }\ + NAME##_value_list value_list() const {\ + return value_list(",", mysqlpp::quote);}\ + NAME##_value_list value_list(const char *d) const {\ + return value_list(d, mysqlpp::quote);}\ + template \ + NAME##_value_list value_list(const char *d, Manip m) const; \ + NAME##_field_list field_list() const {\ + return field_list(",", mysqlpp::do_nothing);}\ + NAME##_field_list field_list(const char *d) const {\ + return field_list(d, mysqlpp::do_nothing);}\ + template \ + NAME##_field_list field_list(const char *d, Manip m) const; \ + NAME##_equal_list equal_list(const char *d = ",", \ + const char *c = " = ") const{\ + return equal_list(d, c, mysqlpp::quote);}\ + template \ + NAME##_equal_list equal_list(const char *d, const char *c, Manip m) const; \ + /* cus_data */\ + NAME##_cus_value_list value_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7);\ + }\ + NAME##_cus_value_list value_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7);\ + }\ + NAME##_cus_value_list value_list(std::vector *i) const {\ + return value_list(",", mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(mysqlpp::sql_cmp_type sc) const {\ + return value_list(",", mysqlpp::quote, sc);\ + }\ + NAME##_cus_value_list value_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7);\ + }\ + NAME##_cus_value_list value_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + std::vector *i) const {\ + return value_list(d, mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return value_list(d, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus field */\ + NAME##_cus_field_list field_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7);\ + }\ + NAME##_cus_field_list field_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7);\ + }\ + NAME##_cus_field_list field_list(std::vector *i) const {\ + return field_list(",", mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(mysqlpp::sql_cmp_type sc) const\ + {\ + return field_list(",", mysqlpp::do_nothing, sc);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7);\ + }\ + NAME##_cus_field_list field_list(const char *d,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + std::vector *i) const {\ + return field_list(d, mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return field_list(d, mysqlpp::do_nothing, sc);\ + }\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + std::vector *i) const;\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus equal */\ + NAME##_cus_equal_list equal_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7);\ + }\ + NAME##_cus_equal_list equal_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7);\ + }\ + NAME##_cus_equal_list equal_list(std::vector *i) const {\ + return equal_list(",", " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(mysqlpp::sql_cmp_type sc) const {\ + return equal_list(",", " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + std::vector *i) const {\ + return equal_list(d, " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + std::vector *i) const {\ + return equal_list(d, c, mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, c, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + private:\ + static const char* table_;\ + const char* table_override_;\ + }; \ + MYSQLPP_SSQLS_CONDITIONAL_STATICS(\ + const char *NAME::names[] = { \ + N1 ,\ + N2 ,\ + N3 ,\ + N4 ,\ + N5 ,\ + N6 ,\ + N7 \ + }; \ + const char* NAME::table_ = #NAME;\ + )\ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7) \ + { \ + delim = d;\ + manip = m;\ + del_vector = true;\ + obj = o; \ + include = new std::vector(7, false);\ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + } \ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(7, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + }\ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7) {\ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(7, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + } \ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(7, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + }\ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(7, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + } \ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(7, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + }\ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_value_list& obj) { \ + s << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.manip << obj.obj->I6 << obj.delim;\ + s << obj.manip << obj.obj->I7; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_field_list& obj) { \ + s << obj.manip << obj.obj->names[0] << obj.delim;\ + s << obj.manip << obj.obj->names[1] << obj.delim;\ + s << obj.manip << obj.obj->names[2] << obj.delim;\ + s << obj.manip << obj.obj->names[3] << obj.delim;\ + s << obj.manip << obj.obj->names[4] << obj.delim;\ + s << obj.manip << obj.obj->names[5] << obj.delim;\ + s << obj.manip << obj.obj->names[6]; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_equal_list& obj) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6 << obj.delim;\ + s << obj.obj->names[6] << obj.comp << obj.manip << obj.obj->I7; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_value_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I6;\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I7;\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_field_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->names[0];\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[1];\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[2];\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[3];\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[4];\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[5];\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[6];\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_equal_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6;\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[6] << obj.comp << obj.manip << obj.obj->I7;\ + } \ + return s; \ + } \ + template \ + inline NAME##_value_list NAME::value_list(const char *d, Manip m) const { \ + return NAME##_value_list (this, d, m); \ + } \ + template \ + inline NAME##_field_list NAME::field_list(const char *d, Manip m) const { \ + return NAME##_field_list (this, d, m); \ + } \ + template \ + inline NAME##_equal_list NAME::equal_list(const char *d, const char *c, Manip m) const { \ + return NAME##_equal_list (this, d, c, m); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7) const {\ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6, i7); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7) const { \ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6, i7); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6, i7); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7) const { \ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6, i7); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7) const {\ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6, i7); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6, i7); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_value_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_field_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_equal_list (this, d, c, m, i);\ + }\ + template \ + inline NAME##_cus_value_list \ + NAME::value_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, value, NUM);\ + }\ + template \ + inline NAME##_cus_field_list \ + NAME::field_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, field, NUM);\ + }\ + template \ + inline NAME##_cus_equal_list \ + NAME::equal_list(const char *d, const char *c, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_defe_##CMP(NAME, equal, NUM);\ + }\ + template \ + void populate_##NAME(NAME *s, const mysqlpp::Row &row) { \ + mysqlpp::NoExceptions ignore_schema_mismatches(row);\ + s->I1 = row[N1].conv(T1());\ + s->I2 = row[N2].conv(T2());\ + s->I3 = row[N3].conv(T3());\ + s->I4 = row[N4].conv(T4());\ + s->I5 = row[N5].conv(T5());\ + s->I6 = row[N6].conv(T6());\ + s->I7 = row[N7].conv(T7());\ + } \ + inline NAME::NAME(const mysqlpp::Row& row) :\ + table_override_(0)\ + {\ + populate_##NAME(this, row);\ + }\ + inline void NAME::set(const mysqlpp::Row& row)\ + {\ + populate_##NAME(this, row);\ + }\ + sql_COMPARE__##CMP(NAME, I1, I2, I3, I4, I5, I6, I7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ) + +#define sql_create_7(NAME, CMP, CONTR, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7) \ + sql_create_complete_7(NAME, CMP, CONTR, T1, I1, #I1, T2, I2, #I2, T3, I3, #I3, T4, I4, #I4, T5, I5, #I5, T6, I6, #I6, T7, I7, #I7) \ + +// --------------------------------------------------- +// End Create 7 +// --------------------------------------------------- + +// --------------------------------------------------- +// Begin Create 8 +// --------------------------------------------------- +#define sql_create_complete_8(NAME, CMP, CONTR, T1, I1, N1, T2, I2, N2, T3, I3, N3, T4, I4, N4, T5, I5, N5, T6, I6, N6, T7, I7, N7, T8, I8, N8) \ + struct NAME; \ + enum NAME##_enum { \ + NAME##_##I1,\ + NAME##_##I2,\ + NAME##_##I3,\ + NAME##_##I4,\ + NAME##_##I5,\ + NAME##_##I6,\ + NAME##_##I7,\ + NAME##_##I8 \ + ,NAME##_NULL \ + }; \ + template \ + class NAME##_value_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_value_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_##field_list {\ + public: \ + const NAME *obj; \ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_field_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_equal_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public: \ + NAME##_equal_list (const NAME *o, const char *d, const char *c, Manip m) \ + : obj(o), delim(d), comp(c), manip(m) {}\ + };\ + template \ + class NAME##_cus_value_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_value_list () {if (del_vector) delete include;} \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8);\ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8); \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m ,std::vector* i)\ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_field_list { \ + public:\ + const NAME *obj; \ + std::vector *include; \ + bool del_vector; \ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_field_list () {if (del_vector) delete include;} \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_equal_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public:\ + ~NAME##_##cus_equal_list () {if (del_vector) delete include;}\ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), comp(c), manip(m) {}\ + };\ + template int sql_compare_##NAME(const NAME&, const NAME&);\ + struct NAME { \ + T1 I1;\ + T2 I2;\ + T3 I3;\ + T4 I4;\ + T5 I5;\ + T6 I6;\ + T7 I7;\ + T8 I8; \ + NAME() : table_override_(0) {} \ + NAME(const mysqlpp::Row& row);\ + void set(const mysqlpp::Row &row);\ + sql_compare_define_##CMP(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + sql_construct_define_##CONTR(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + static const char* names[];\ + static void table(const char* t) { table_ = t; }\ + const char* const table() const\ + { return table_override_ ? table_override_ : NAME::table_; }\ + void instance_table(const char* t) { table_override_ = t; }\ + NAME##_value_list value_list() const {\ + return value_list(",", mysqlpp::quote);}\ + NAME##_value_list value_list(const char *d) const {\ + return value_list(d, mysqlpp::quote);}\ + template \ + NAME##_value_list value_list(const char *d, Manip m) const; \ + NAME##_field_list field_list() const {\ + return field_list(",", mysqlpp::do_nothing);}\ + NAME##_field_list field_list(const char *d) const {\ + return field_list(d, mysqlpp::do_nothing);}\ + template \ + NAME##_field_list field_list(const char *d, Manip m) const; \ + NAME##_equal_list equal_list(const char *d = ",", \ + const char *c = " = ") const{\ + return equal_list(d, c, mysqlpp::quote);}\ + template \ + NAME##_equal_list equal_list(const char *d, const char *c, Manip m) const; \ + /* cus_data */\ + NAME##_cus_value_list value_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8);\ + }\ + NAME##_cus_value_list value_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8);\ + }\ + NAME##_cus_value_list value_list(std::vector *i) const {\ + return value_list(",", mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(mysqlpp::sql_cmp_type sc) const {\ + return value_list(",", mysqlpp::quote, sc);\ + }\ + NAME##_cus_value_list value_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8);\ + }\ + NAME##_cus_value_list value_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + std::vector *i) const {\ + return value_list(d, mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return value_list(d, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus field */\ + NAME##_cus_field_list field_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8);\ + }\ + NAME##_cus_field_list field_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8);\ + }\ + NAME##_cus_field_list field_list(std::vector *i) const {\ + return field_list(",", mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(mysqlpp::sql_cmp_type sc) const\ + {\ + return field_list(",", mysqlpp::do_nothing, sc);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8);\ + }\ + NAME##_cus_field_list field_list(const char *d,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + std::vector *i) const {\ + return field_list(d, mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return field_list(d, mysqlpp::do_nothing, sc);\ + }\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + std::vector *i) const;\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus equal */\ + NAME##_cus_equal_list equal_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8);\ + }\ + NAME##_cus_equal_list equal_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8);\ + }\ + NAME##_cus_equal_list equal_list(std::vector *i) const {\ + return equal_list(",", " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(mysqlpp::sql_cmp_type sc) const {\ + return equal_list(",", " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + std::vector *i) const {\ + return equal_list(d, " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + std::vector *i) const {\ + return equal_list(d, c, mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, c, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + private:\ + static const char* table_;\ + const char* table_override_;\ + }; \ + MYSQLPP_SSQLS_CONDITIONAL_STATICS(\ + const char *NAME::names[] = { \ + N1 ,\ + N2 ,\ + N3 ,\ + N4 ,\ + N5 ,\ + N6 ,\ + N7 ,\ + N8 \ + }; \ + const char* NAME::table_ = #NAME;\ + )\ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8) \ + { \ + delim = d;\ + manip = m;\ + del_vector = true;\ + obj = o; \ + include = new std::vector(8, false);\ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + } \ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(8, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + }\ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8) {\ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(8, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + } \ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(8, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + }\ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(8, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + } \ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(8, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + }\ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_value_list& obj) { \ + s << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.manip << obj.obj->I6 << obj.delim;\ + s << obj.manip << obj.obj->I7 << obj.delim;\ + s << obj.manip << obj.obj->I8; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_field_list& obj) { \ + s << obj.manip << obj.obj->names[0] << obj.delim;\ + s << obj.manip << obj.obj->names[1] << obj.delim;\ + s << obj.manip << obj.obj->names[2] << obj.delim;\ + s << obj.manip << obj.obj->names[3] << obj.delim;\ + s << obj.manip << obj.obj->names[4] << obj.delim;\ + s << obj.manip << obj.obj->names[5] << obj.delim;\ + s << obj.manip << obj.obj->names[6] << obj.delim;\ + s << obj.manip << obj.obj->names[7]; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_equal_list& obj) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6 << obj.delim;\ + s << obj.obj->names[6] << obj.comp << obj.manip << obj.obj->I7 << obj.delim;\ + s << obj.obj->names[7] << obj.comp << obj.manip << obj.obj->I8; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_value_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I6;\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I7;\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I8;\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_field_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->names[0];\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[1];\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[2];\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[3];\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[4];\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[5];\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[6];\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[7];\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_equal_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6;\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[6] << obj.comp << obj.manip << obj.obj->I7;\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[7] << obj.comp << obj.manip << obj.obj->I8;\ + } \ + return s; \ + } \ + template \ + inline NAME##_value_list NAME::value_list(const char *d, Manip m) const { \ + return NAME##_value_list (this, d, m); \ + } \ + template \ + inline NAME##_field_list NAME::field_list(const char *d, Manip m) const { \ + return NAME##_field_list (this, d, m); \ + } \ + template \ + inline NAME##_equal_list NAME::equal_list(const char *d, const char *c, Manip m) const { \ + return NAME##_equal_list (this, d, c, m); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8) const {\ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8) const { \ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6, i7, i8); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8) const { \ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8) const {\ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6, i7, i8); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_value_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_field_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_equal_list (this, d, c, m, i);\ + }\ + template \ + inline NAME##_cus_value_list \ + NAME::value_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, value, NUM);\ + }\ + template \ + inline NAME##_cus_field_list \ + NAME::field_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, field, NUM);\ + }\ + template \ + inline NAME##_cus_equal_list \ + NAME::equal_list(const char *d, const char *c, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_defe_##CMP(NAME, equal, NUM);\ + }\ + template \ + void populate_##NAME(NAME *s, const mysqlpp::Row &row) { \ + mysqlpp::NoExceptions ignore_schema_mismatches(row);\ + s->I1 = row[N1].conv(T1());\ + s->I2 = row[N2].conv(T2());\ + s->I3 = row[N3].conv(T3());\ + s->I4 = row[N4].conv(T4());\ + s->I5 = row[N5].conv(T5());\ + s->I6 = row[N6].conv(T6());\ + s->I7 = row[N7].conv(T7());\ + s->I8 = row[N8].conv(T8());\ + } \ + inline NAME::NAME(const mysqlpp::Row& row) :\ + table_override_(0)\ + {\ + populate_##NAME(this, row);\ + }\ + inline void NAME::set(const mysqlpp::Row& row)\ + {\ + populate_##NAME(this, row);\ + }\ + sql_COMPARE__##CMP(NAME, I1, I2, I3, I4, I5, I6, I7, I8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ) + +#define sql_create_8(NAME, CMP, CONTR, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8) \ + sql_create_complete_8(NAME, CMP, CONTR, T1, I1, #I1, T2, I2, #I2, T3, I3, #I3, T4, I4, #I4, T5, I5, #I5, T6, I6, #I6, T7, I7, #I7, T8, I8, #I8) \ + +// --------------------------------------------------- +// End Create 8 +// --------------------------------------------------- + +// --------------------------------------------------- +// Begin Create 9 +// --------------------------------------------------- +#define sql_create_complete_9(NAME, CMP, CONTR, T1, I1, N1, T2, I2, N2, T3, I3, N3, T4, I4, N4, T5, I5, N5, T6, I6, N6, T7, I7, N7, T8, I8, N8, T9, I9, N9) \ + struct NAME; \ + enum NAME##_enum { \ + NAME##_##I1,\ + NAME##_##I2,\ + NAME##_##I3,\ + NAME##_##I4,\ + NAME##_##I5,\ + NAME##_##I6,\ + NAME##_##I7,\ + NAME##_##I8,\ + NAME##_##I9 \ + ,NAME##_NULL \ + }; \ + template \ + class NAME##_value_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_value_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_##field_list {\ + public: \ + const NAME *obj; \ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_field_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_equal_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public: \ + NAME##_equal_list (const NAME *o, const char *d, const char *c, Manip m) \ + : obj(o), delim(d), comp(c), manip(m) {}\ + };\ + template \ + class NAME##_cus_value_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_value_list () {if (del_vector) delete include;} \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9);\ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9); \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m ,std::vector* i)\ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_field_list { \ + public:\ + const NAME *obj; \ + std::vector *include; \ + bool del_vector; \ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_field_list () {if (del_vector) delete include;} \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_equal_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public:\ + ~NAME##_##cus_equal_list () {if (del_vector) delete include;}\ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), comp(c), manip(m) {}\ + };\ + template int sql_compare_##NAME(const NAME&, const NAME&);\ + struct NAME { \ + T1 I1;\ + T2 I2;\ + T3 I3;\ + T4 I4;\ + T5 I5;\ + T6 I6;\ + T7 I7;\ + T8 I8;\ + T9 I9; \ + NAME() : table_override_(0) {} \ + NAME(const mysqlpp::Row& row);\ + void set(const mysqlpp::Row &row);\ + sql_compare_define_##CMP(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + sql_construct_define_##CONTR(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + static const char* names[];\ + static void table(const char* t) { table_ = t; }\ + const char* const table() const\ + { return table_override_ ? table_override_ : NAME::table_; }\ + void instance_table(const char* t) { table_override_ = t; }\ + NAME##_value_list value_list() const {\ + return value_list(",", mysqlpp::quote);}\ + NAME##_value_list value_list(const char *d) const {\ + return value_list(d, mysqlpp::quote);}\ + template \ + NAME##_value_list value_list(const char *d, Manip m) const; \ + NAME##_field_list field_list() const {\ + return field_list(",", mysqlpp::do_nothing);}\ + NAME##_field_list field_list(const char *d) const {\ + return field_list(d, mysqlpp::do_nothing);}\ + template \ + NAME##_field_list field_list(const char *d, Manip m) const; \ + NAME##_equal_list equal_list(const char *d = ",", \ + const char *c = " = ") const{\ + return equal_list(d, c, mysqlpp::quote);}\ + template \ + NAME##_equal_list equal_list(const char *d, const char *c, Manip m) const; \ + /* cus_data */\ + NAME##_cus_value_list value_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9);\ + }\ + NAME##_cus_value_list value_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9);\ + }\ + NAME##_cus_value_list value_list(std::vector *i) const {\ + return value_list(",", mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(mysqlpp::sql_cmp_type sc) const {\ + return value_list(",", mysqlpp::quote, sc);\ + }\ + NAME##_cus_value_list value_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9);\ + }\ + NAME##_cus_value_list value_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + std::vector *i) const {\ + return value_list(d, mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return value_list(d, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus field */\ + NAME##_cus_field_list field_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9);\ + }\ + NAME##_cus_field_list field_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9);\ + }\ + NAME##_cus_field_list field_list(std::vector *i) const {\ + return field_list(",", mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(mysqlpp::sql_cmp_type sc) const\ + {\ + return field_list(",", mysqlpp::do_nothing, sc);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9);\ + }\ + NAME##_cus_field_list field_list(const char *d,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + std::vector *i) const {\ + return field_list(d, mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return field_list(d, mysqlpp::do_nothing, sc);\ + }\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + std::vector *i) const;\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus equal */\ + NAME##_cus_equal_list equal_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9);\ + }\ + NAME##_cus_equal_list equal_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9);\ + }\ + NAME##_cus_equal_list equal_list(std::vector *i) const {\ + return equal_list(",", " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(mysqlpp::sql_cmp_type sc) const {\ + return equal_list(",", " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + std::vector *i) const {\ + return equal_list(d, " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + std::vector *i) const {\ + return equal_list(d, c, mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, c, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + private:\ + static const char* table_;\ + const char* table_override_;\ + }; \ + MYSQLPP_SSQLS_CONDITIONAL_STATICS(\ + const char *NAME::names[] = { \ + N1 ,\ + N2 ,\ + N3 ,\ + N4 ,\ + N5 ,\ + N6 ,\ + N7 ,\ + N8 ,\ + N9 \ + }; \ + const char* NAME::table_ = #NAME;\ + )\ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9) \ + { \ + delim = d;\ + manip = m;\ + del_vector = true;\ + obj = o; \ + include = new std::vector(9, false);\ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + } \ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(9, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + }\ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9) {\ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(9, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + } \ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(9, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + }\ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(9, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + } \ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(9, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + }\ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_value_list& obj) { \ + s << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.manip << obj.obj->I6 << obj.delim;\ + s << obj.manip << obj.obj->I7 << obj.delim;\ + s << obj.manip << obj.obj->I8 << obj.delim;\ + s << obj.manip << obj.obj->I9; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_field_list& obj) { \ + s << obj.manip << obj.obj->names[0] << obj.delim;\ + s << obj.manip << obj.obj->names[1] << obj.delim;\ + s << obj.manip << obj.obj->names[2] << obj.delim;\ + s << obj.manip << obj.obj->names[3] << obj.delim;\ + s << obj.manip << obj.obj->names[4] << obj.delim;\ + s << obj.manip << obj.obj->names[5] << obj.delim;\ + s << obj.manip << obj.obj->names[6] << obj.delim;\ + s << obj.manip << obj.obj->names[7] << obj.delim;\ + s << obj.manip << obj.obj->names[8]; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_equal_list& obj) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6 << obj.delim;\ + s << obj.obj->names[6] << obj.comp << obj.manip << obj.obj->I7 << obj.delim;\ + s << obj.obj->names[7] << obj.comp << obj.manip << obj.obj->I8 << obj.delim;\ + s << obj.obj->names[8] << obj.comp << obj.manip << obj.obj->I9; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_value_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I6;\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I7;\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I8;\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I9;\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_field_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->names[0];\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[1];\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[2];\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[3];\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[4];\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[5];\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[6];\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[7];\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[8];\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_equal_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6;\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[6] << obj.comp << obj.manip << obj.obj->I7;\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[7] << obj.comp << obj.manip << obj.obj->I8;\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[8] << obj.comp << obj.manip << obj.obj->I9;\ + } \ + return s; \ + } \ + template \ + inline NAME##_value_list NAME::value_list(const char *d, Manip m) const { \ + return NAME##_value_list (this, d, m); \ + } \ + template \ + inline NAME##_field_list NAME::field_list(const char *d, Manip m) const { \ + return NAME##_field_list (this, d, m); \ + } \ + template \ + inline NAME##_equal_list NAME::equal_list(const char *d, const char *c, Manip m) const { \ + return NAME##_equal_list (this, d, c, m); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9) const {\ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9) const { \ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6, i7, i8, i9); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9) const { \ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9) const {\ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6, i7, i8, i9); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_value_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_field_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_equal_list (this, d, c, m, i);\ + }\ + template \ + inline NAME##_cus_value_list \ + NAME::value_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, value, NUM);\ + }\ + template \ + inline NAME##_cus_field_list \ + NAME::field_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, field, NUM);\ + }\ + template \ + inline NAME##_cus_equal_list \ + NAME::equal_list(const char *d, const char *c, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_defe_##CMP(NAME, equal, NUM);\ + }\ + template \ + void populate_##NAME(NAME *s, const mysqlpp::Row &row) { \ + mysqlpp::NoExceptions ignore_schema_mismatches(row);\ + s->I1 = row[N1].conv(T1());\ + s->I2 = row[N2].conv(T2());\ + s->I3 = row[N3].conv(T3());\ + s->I4 = row[N4].conv(T4());\ + s->I5 = row[N5].conv(T5());\ + s->I6 = row[N6].conv(T6());\ + s->I7 = row[N7].conv(T7());\ + s->I8 = row[N8].conv(T8());\ + s->I9 = row[N9].conv(T9());\ + } \ + inline NAME::NAME(const mysqlpp::Row& row) :\ + table_override_(0)\ + {\ + populate_##NAME(this, row);\ + }\ + inline void NAME::set(const mysqlpp::Row& row)\ + {\ + populate_##NAME(this, row);\ + }\ + sql_COMPARE__##CMP(NAME, I1, I2, I3, I4, I5, I6, I7, I8, I9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ) + +#define sql_create_9(NAME, CMP, CONTR, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9) \ + sql_create_complete_9(NAME, CMP, CONTR, T1, I1, #I1, T2, I2, #I2, T3, I3, #I3, T4, I4, #I4, T5, I5, #I5, T6, I6, #I6, T7, I7, #I7, T8, I8, #I8, T9, I9, #I9) \ + +// --------------------------------------------------- +// End Create 9 +// --------------------------------------------------- + +// --------------------------------------------------- +// Begin Create 10 +// --------------------------------------------------- +#define sql_create_complete_10(NAME, CMP, CONTR, T1, I1, N1, T2, I2, N2, T3, I3, N3, T4, I4, N4, T5, I5, N5, T6, I6, N6, T7, I7, N7, T8, I8, N8, T9, I9, N9, T10, I10, N10) \ + struct NAME; \ + enum NAME##_enum { \ + NAME##_##I1,\ + NAME##_##I2,\ + NAME##_##I3,\ + NAME##_##I4,\ + NAME##_##I5,\ + NAME##_##I6,\ + NAME##_##I7,\ + NAME##_##I8,\ + NAME##_##I9,\ + NAME##_##I10 \ + ,NAME##_NULL \ + }; \ + template \ + class NAME##_value_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_value_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_##field_list {\ + public: \ + const NAME *obj; \ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_field_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_equal_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public: \ + NAME##_equal_list (const NAME *o, const char *d, const char *c, Manip m) \ + : obj(o), delim(d), comp(c), manip(m) {}\ + };\ + template \ + class NAME##_cus_value_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_value_list () {if (del_vector) delete include;} \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10);\ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10); \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m ,std::vector* i)\ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_field_list { \ + public:\ + const NAME *obj; \ + std::vector *include; \ + bool del_vector; \ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_field_list () {if (del_vector) delete include;} \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_equal_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public:\ + ~NAME##_##cus_equal_list () {if (del_vector) delete include;}\ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), comp(c), manip(m) {}\ + };\ + template int sql_compare_##NAME(const NAME&, const NAME&);\ + struct NAME { \ + T1 I1;\ + T2 I2;\ + T3 I3;\ + T4 I4;\ + T5 I5;\ + T6 I6;\ + T7 I7;\ + T8 I8;\ + T9 I9;\ + T10 I10; \ + NAME() : table_override_(0) {} \ + NAME(const mysqlpp::Row& row);\ + void set(const mysqlpp::Row &row);\ + sql_compare_define_##CMP(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + sql_construct_define_##CONTR(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + static const char* names[];\ + static void table(const char* t) { table_ = t; }\ + const char* const table() const\ + { return table_override_ ? table_override_ : NAME::table_; }\ + void instance_table(const char* t) { table_override_ = t; }\ + NAME##_value_list value_list() const {\ + return value_list(",", mysqlpp::quote);}\ + NAME##_value_list value_list(const char *d) const {\ + return value_list(d, mysqlpp::quote);}\ + template \ + NAME##_value_list value_list(const char *d, Manip m) const; \ + NAME##_field_list field_list() const {\ + return field_list(",", mysqlpp::do_nothing);}\ + NAME##_field_list field_list(const char *d) const {\ + return field_list(d, mysqlpp::do_nothing);}\ + template \ + NAME##_field_list field_list(const char *d, Manip m) const; \ + NAME##_equal_list equal_list(const char *d = ",", \ + const char *c = " = ") const{\ + return equal_list(d, c, mysqlpp::quote);}\ + template \ + NAME##_equal_list equal_list(const char *d, const char *c, Manip m) const; \ + /* cus_data */\ + NAME##_cus_value_list value_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10);\ + }\ + NAME##_cus_value_list value_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10);\ + }\ + NAME##_cus_value_list value_list(std::vector *i) const {\ + return value_list(",", mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(mysqlpp::sql_cmp_type sc) const {\ + return value_list(",", mysqlpp::quote, sc);\ + }\ + NAME##_cus_value_list value_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10);\ + }\ + NAME##_cus_value_list value_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + std::vector *i) const {\ + return value_list(d, mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return value_list(d, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus field */\ + NAME##_cus_field_list field_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10);\ + }\ + NAME##_cus_field_list field_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10);\ + }\ + NAME##_cus_field_list field_list(std::vector *i) const {\ + return field_list(",", mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(mysqlpp::sql_cmp_type sc) const\ + {\ + return field_list(",", mysqlpp::do_nothing, sc);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10);\ + }\ + NAME##_cus_field_list field_list(const char *d,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + std::vector *i) const {\ + return field_list(d, mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return field_list(d, mysqlpp::do_nothing, sc);\ + }\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + std::vector *i) const;\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus equal */\ + NAME##_cus_equal_list equal_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10);\ + }\ + NAME##_cus_equal_list equal_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10);\ + }\ + NAME##_cus_equal_list equal_list(std::vector *i) const {\ + return equal_list(",", " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(mysqlpp::sql_cmp_type sc) const {\ + return equal_list(",", " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + std::vector *i) const {\ + return equal_list(d, " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + std::vector *i) const {\ + return equal_list(d, c, mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, c, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + private:\ + static const char* table_;\ + const char* table_override_;\ + }; \ + MYSQLPP_SSQLS_CONDITIONAL_STATICS(\ + const char *NAME::names[] = { \ + N1 ,\ + N2 ,\ + N3 ,\ + N4 ,\ + N5 ,\ + N6 ,\ + N7 ,\ + N8 ,\ + N9 ,\ + N10 \ + }; \ + const char* NAME::table_ = #NAME;\ + )\ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10) \ + { \ + delim = d;\ + manip = m;\ + del_vector = true;\ + obj = o; \ + include = new std::vector(10, false);\ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + } \ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(10, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + }\ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10) {\ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(10, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + } \ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(10, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + }\ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(10, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + } \ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(10, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + }\ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_value_list& obj) { \ + s << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.manip << obj.obj->I6 << obj.delim;\ + s << obj.manip << obj.obj->I7 << obj.delim;\ + s << obj.manip << obj.obj->I8 << obj.delim;\ + s << obj.manip << obj.obj->I9 << obj.delim;\ + s << obj.manip << obj.obj->I10; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_field_list& obj) { \ + s << obj.manip << obj.obj->names[0] << obj.delim;\ + s << obj.manip << obj.obj->names[1] << obj.delim;\ + s << obj.manip << obj.obj->names[2] << obj.delim;\ + s << obj.manip << obj.obj->names[3] << obj.delim;\ + s << obj.manip << obj.obj->names[4] << obj.delim;\ + s << obj.manip << obj.obj->names[5] << obj.delim;\ + s << obj.manip << obj.obj->names[6] << obj.delim;\ + s << obj.manip << obj.obj->names[7] << obj.delim;\ + s << obj.manip << obj.obj->names[8] << obj.delim;\ + s << obj.manip << obj.obj->names[9]; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_equal_list& obj) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6 << obj.delim;\ + s << obj.obj->names[6] << obj.comp << obj.manip << obj.obj->I7 << obj.delim;\ + s << obj.obj->names[7] << obj.comp << obj.manip << obj.obj->I8 << obj.delim;\ + s << obj.obj->names[8] << obj.comp << obj.manip << obj.obj->I9 << obj.delim;\ + s << obj.obj->names[9] << obj.comp << obj.manip << obj.obj->I10; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_value_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I6;\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I7;\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I8;\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I9;\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I10;\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_field_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->names[0];\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[1];\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[2];\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[3];\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[4];\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[5];\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[6];\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[7];\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[8];\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[9];\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_equal_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6;\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[6] << obj.comp << obj.manip << obj.obj->I7;\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[7] << obj.comp << obj.manip << obj.obj->I8;\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[8] << obj.comp << obj.manip << obj.obj->I9;\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[9] << obj.comp << obj.manip << obj.obj->I10;\ + } \ + return s; \ + } \ + template \ + inline NAME##_value_list NAME::value_list(const char *d, Manip m) const { \ + return NAME##_value_list (this, d, m); \ + } \ + template \ + inline NAME##_field_list NAME::field_list(const char *d, Manip m) const { \ + return NAME##_field_list (this, d, m); \ + } \ + template \ + inline NAME##_equal_list NAME::equal_list(const char *d, const char *c, Manip m) const { \ + return NAME##_equal_list (this, d, c, m); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10) const {\ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10) const { \ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10) const { \ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10) const {\ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_value_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_field_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_equal_list (this, d, c, m, i);\ + }\ + template \ + inline NAME##_cus_value_list \ + NAME::value_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, value, NUM);\ + }\ + template \ + inline NAME##_cus_field_list \ + NAME::field_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, field, NUM);\ + }\ + template \ + inline NAME##_cus_equal_list \ + NAME::equal_list(const char *d, const char *c, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_defe_##CMP(NAME, equal, NUM);\ + }\ + template \ + void populate_##NAME(NAME *s, const mysqlpp::Row &row) { \ + mysqlpp::NoExceptions ignore_schema_mismatches(row);\ + s->I1 = row[N1].conv(T1());\ + s->I2 = row[N2].conv(T2());\ + s->I3 = row[N3].conv(T3());\ + s->I4 = row[N4].conv(T4());\ + s->I5 = row[N5].conv(T5());\ + s->I6 = row[N6].conv(T6());\ + s->I7 = row[N7].conv(T7());\ + s->I8 = row[N8].conv(T8());\ + s->I9 = row[N9].conv(T9());\ + s->I10 = row[N10].conv(T10());\ + } \ + inline NAME::NAME(const mysqlpp::Row& row) :\ + table_override_(0)\ + {\ + populate_##NAME(this, row);\ + }\ + inline void NAME::set(const mysqlpp::Row& row)\ + {\ + populate_##NAME(this, row);\ + }\ + sql_COMPARE__##CMP(NAME, I1, I2, I3, I4, I5, I6, I7, I8, I9, I10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ) + +#define sql_create_10(NAME, CMP, CONTR, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10) \ + sql_create_complete_10(NAME, CMP, CONTR, T1, I1, #I1, T2, I2, #I2, T3, I3, #I3, T4, I4, #I4, T5, I5, #I5, T6, I6, #I6, T7, I7, #I7, T8, I8, #I8, T9, I9, #I9, T10, I10, #I10) \ + +// --------------------------------------------------- +// End Create 10 +// --------------------------------------------------- + +// --------------------------------------------------- +// Begin Create 11 +// --------------------------------------------------- +#define sql_create_complete_11(NAME, CMP, CONTR, T1, I1, N1, T2, I2, N2, T3, I3, N3, T4, I4, N4, T5, I5, N5, T6, I6, N6, T7, I7, N7, T8, I8, N8, T9, I9, N9, T10, I10, N10, T11, I11, N11) \ + struct NAME; \ + enum NAME##_enum { \ + NAME##_##I1,\ + NAME##_##I2,\ + NAME##_##I3,\ + NAME##_##I4,\ + NAME##_##I5,\ + NAME##_##I6,\ + NAME##_##I7,\ + NAME##_##I8,\ + NAME##_##I9,\ + NAME##_##I10,\ + NAME##_##I11 \ + ,NAME##_NULL \ + }; \ + template \ + class NAME##_value_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_value_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_##field_list {\ + public: \ + const NAME *obj; \ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_field_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_equal_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public: \ + NAME##_equal_list (const NAME *o, const char *d, const char *c, Manip m) \ + : obj(o), delim(d), comp(c), manip(m) {}\ + };\ + template \ + class NAME##_cus_value_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_value_list () {if (del_vector) delete include;} \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11);\ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11); \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m ,std::vector* i)\ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_field_list { \ + public:\ + const NAME *obj; \ + std::vector *include; \ + bool del_vector; \ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_field_list () {if (del_vector) delete include;} \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_equal_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public:\ + ~NAME##_##cus_equal_list () {if (del_vector) delete include;}\ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), comp(c), manip(m) {}\ + };\ + template int sql_compare_##NAME(const NAME&, const NAME&);\ + struct NAME { \ + T1 I1;\ + T2 I2;\ + T3 I3;\ + T4 I4;\ + T5 I5;\ + T6 I6;\ + T7 I7;\ + T8 I8;\ + T9 I9;\ + T10 I10;\ + T11 I11; \ + NAME() : table_override_(0) {} \ + NAME(const mysqlpp::Row& row);\ + void set(const mysqlpp::Row &row);\ + sql_compare_define_##CMP(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + sql_construct_define_##CONTR(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + static const char* names[];\ + static void table(const char* t) { table_ = t; }\ + const char* const table() const\ + { return table_override_ ? table_override_ : NAME::table_; }\ + void instance_table(const char* t) { table_override_ = t; }\ + NAME##_value_list value_list() const {\ + return value_list(",", mysqlpp::quote);}\ + NAME##_value_list value_list(const char *d) const {\ + return value_list(d, mysqlpp::quote);}\ + template \ + NAME##_value_list value_list(const char *d, Manip m) const; \ + NAME##_field_list field_list() const {\ + return field_list(",", mysqlpp::do_nothing);}\ + NAME##_field_list field_list(const char *d) const {\ + return field_list(d, mysqlpp::do_nothing);}\ + template \ + NAME##_field_list field_list(const char *d, Manip m) const; \ + NAME##_equal_list equal_list(const char *d = ",", \ + const char *c = " = ") const{\ + return equal_list(d, c, mysqlpp::quote);}\ + template \ + NAME##_equal_list equal_list(const char *d, const char *c, Manip m) const; \ + /* cus_data */\ + NAME##_cus_value_list value_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11);\ + }\ + NAME##_cus_value_list value_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11);\ + }\ + NAME##_cus_value_list value_list(std::vector *i) const {\ + return value_list(",", mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(mysqlpp::sql_cmp_type sc) const {\ + return value_list(",", mysqlpp::quote, sc);\ + }\ + NAME##_cus_value_list value_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11);\ + }\ + NAME##_cus_value_list value_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + std::vector *i) const {\ + return value_list(d, mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return value_list(d, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus field */\ + NAME##_cus_field_list field_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11);\ + }\ + NAME##_cus_field_list field_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11);\ + }\ + NAME##_cus_field_list field_list(std::vector *i) const {\ + return field_list(",", mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(mysqlpp::sql_cmp_type sc) const\ + {\ + return field_list(",", mysqlpp::do_nothing, sc);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11);\ + }\ + NAME##_cus_field_list field_list(const char *d,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + std::vector *i) const {\ + return field_list(d, mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return field_list(d, mysqlpp::do_nothing, sc);\ + }\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + std::vector *i) const;\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus equal */\ + NAME##_cus_equal_list equal_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11);\ + }\ + NAME##_cus_equal_list equal_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11);\ + }\ + NAME##_cus_equal_list equal_list(std::vector *i) const {\ + return equal_list(",", " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(mysqlpp::sql_cmp_type sc) const {\ + return equal_list(",", " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + std::vector *i) const {\ + return equal_list(d, " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + std::vector *i) const {\ + return equal_list(d, c, mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, c, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + private:\ + static const char* table_;\ + const char* table_override_;\ + }; \ + MYSQLPP_SSQLS_CONDITIONAL_STATICS(\ + const char *NAME::names[] = { \ + N1 ,\ + N2 ,\ + N3 ,\ + N4 ,\ + N5 ,\ + N6 ,\ + N7 ,\ + N8 ,\ + N9 ,\ + N10 ,\ + N11 \ + }; \ + const char* NAME::table_ = #NAME;\ + )\ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11) \ + { \ + delim = d;\ + manip = m;\ + del_vector = true;\ + obj = o; \ + include = new std::vector(11, false);\ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + } \ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(11, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + }\ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11) {\ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(11, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + } \ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(11, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + }\ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(11, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + } \ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(11, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + }\ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_value_list& obj) { \ + s << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.manip << obj.obj->I6 << obj.delim;\ + s << obj.manip << obj.obj->I7 << obj.delim;\ + s << obj.manip << obj.obj->I8 << obj.delim;\ + s << obj.manip << obj.obj->I9 << obj.delim;\ + s << obj.manip << obj.obj->I10 << obj.delim;\ + s << obj.manip << obj.obj->I11; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_field_list& obj) { \ + s << obj.manip << obj.obj->names[0] << obj.delim;\ + s << obj.manip << obj.obj->names[1] << obj.delim;\ + s << obj.manip << obj.obj->names[2] << obj.delim;\ + s << obj.manip << obj.obj->names[3] << obj.delim;\ + s << obj.manip << obj.obj->names[4] << obj.delim;\ + s << obj.manip << obj.obj->names[5] << obj.delim;\ + s << obj.manip << obj.obj->names[6] << obj.delim;\ + s << obj.manip << obj.obj->names[7] << obj.delim;\ + s << obj.manip << obj.obj->names[8] << obj.delim;\ + s << obj.manip << obj.obj->names[9] << obj.delim;\ + s << obj.manip << obj.obj->names[10]; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_equal_list& obj) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6 << obj.delim;\ + s << obj.obj->names[6] << obj.comp << obj.manip << obj.obj->I7 << obj.delim;\ + s << obj.obj->names[7] << obj.comp << obj.manip << obj.obj->I8 << obj.delim;\ + s << obj.obj->names[8] << obj.comp << obj.manip << obj.obj->I9 << obj.delim;\ + s << obj.obj->names[9] << obj.comp << obj.manip << obj.obj->I10 << obj.delim;\ + s << obj.obj->names[10] << obj.comp << obj.manip << obj.obj->I11; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_value_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I6;\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I7;\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I8;\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I9;\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I10;\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I11;\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_field_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->names[0];\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[1];\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[2];\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[3];\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[4];\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[5];\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[6];\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[7];\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[8];\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[9];\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[10];\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_equal_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6;\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[6] << obj.comp << obj.manip << obj.obj->I7;\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[7] << obj.comp << obj.manip << obj.obj->I8;\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[8] << obj.comp << obj.manip << obj.obj->I9;\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[9] << obj.comp << obj.manip << obj.obj->I10;\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[10] << obj.comp << obj.manip << obj.obj->I11;\ + } \ + return s; \ + } \ + template \ + inline NAME##_value_list NAME::value_list(const char *d, Manip m) const { \ + return NAME##_value_list (this, d, m); \ + } \ + template \ + inline NAME##_field_list NAME::field_list(const char *d, Manip m) const { \ + return NAME##_field_list (this, d, m); \ + } \ + template \ + inline NAME##_equal_list NAME::equal_list(const char *d, const char *c, Manip m) const { \ + return NAME##_equal_list (this, d, c, m); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11) const {\ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11) const { \ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11) const { \ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11) const {\ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_value_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_field_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_equal_list (this, d, c, m, i);\ + }\ + template \ + inline NAME##_cus_value_list \ + NAME::value_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, value, NUM);\ + }\ + template \ + inline NAME##_cus_field_list \ + NAME::field_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, field, NUM);\ + }\ + template \ + inline NAME##_cus_equal_list \ + NAME::equal_list(const char *d, const char *c, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_defe_##CMP(NAME, equal, NUM);\ + }\ + template \ + void populate_##NAME(NAME *s, const mysqlpp::Row &row) { \ + mysqlpp::NoExceptions ignore_schema_mismatches(row);\ + s->I1 = row[N1].conv(T1());\ + s->I2 = row[N2].conv(T2());\ + s->I3 = row[N3].conv(T3());\ + s->I4 = row[N4].conv(T4());\ + s->I5 = row[N5].conv(T5());\ + s->I6 = row[N6].conv(T6());\ + s->I7 = row[N7].conv(T7());\ + s->I8 = row[N8].conv(T8());\ + s->I9 = row[N9].conv(T9());\ + s->I10 = row[N10].conv(T10());\ + s->I11 = row[N11].conv(T11());\ + } \ + inline NAME::NAME(const mysqlpp::Row& row) :\ + table_override_(0)\ + {\ + populate_##NAME(this, row);\ + }\ + inline void NAME::set(const mysqlpp::Row& row)\ + {\ + populate_##NAME(this, row);\ + }\ + sql_COMPARE__##CMP(NAME, I1, I2, I3, I4, I5, I6, I7, I8, I9, I10, I11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ) + +#define sql_create_11(NAME, CMP, CONTR, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11) \ + sql_create_complete_11(NAME, CMP, CONTR, T1, I1, #I1, T2, I2, #I2, T3, I3, #I3, T4, I4, #I4, T5, I5, #I5, T6, I6, #I6, T7, I7, #I7, T8, I8, #I8, T9, I9, #I9, T10, I10, #I10, T11, I11, #I11) \ + +// --------------------------------------------------- +// End Create 11 +// --------------------------------------------------- + +// --------------------------------------------------- +// Begin Create 12 +// --------------------------------------------------- +#define sql_create_complete_12(NAME, CMP, CONTR, T1, I1, N1, T2, I2, N2, T3, I3, N3, T4, I4, N4, T5, I5, N5, T6, I6, N6, T7, I7, N7, T8, I8, N8, T9, I9, N9, T10, I10, N10, T11, I11, N11, T12, I12, N12) \ + struct NAME; \ + enum NAME##_enum { \ + NAME##_##I1,\ + NAME##_##I2,\ + NAME##_##I3,\ + NAME##_##I4,\ + NAME##_##I5,\ + NAME##_##I6,\ + NAME##_##I7,\ + NAME##_##I8,\ + NAME##_##I9,\ + NAME##_##I10,\ + NAME##_##I11,\ + NAME##_##I12 \ + ,NAME##_NULL \ + }; \ + template \ + class NAME##_value_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_value_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_##field_list {\ + public: \ + const NAME *obj; \ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_field_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_equal_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public: \ + NAME##_equal_list (const NAME *o, const char *d, const char *c, Manip m) \ + : obj(o), delim(d), comp(c), manip(m) {}\ + };\ + template \ + class NAME##_cus_value_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_value_list () {if (del_vector) delete include;} \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12);\ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12); \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m ,std::vector* i)\ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_field_list { \ + public:\ + const NAME *obj; \ + std::vector *include; \ + bool del_vector; \ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_field_list () {if (del_vector) delete include;} \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_equal_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public:\ + ~NAME##_##cus_equal_list () {if (del_vector) delete include;}\ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), comp(c), manip(m) {}\ + };\ + template int sql_compare_##NAME(const NAME&, const NAME&);\ + struct NAME { \ + T1 I1;\ + T2 I2;\ + T3 I3;\ + T4 I4;\ + T5 I5;\ + T6 I6;\ + T7 I7;\ + T8 I8;\ + T9 I9;\ + T10 I10;\ + T11 I11;\ + T12 I12; \ + NAME() : table_override_(0) {} \ + NAME(const mysqlpp::Row& row);\ + void set(const mysqlpp::Row &row);\ + sql_compare_define_##CMP(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + sql_construct_define_##CONTR(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + static const char* names[];\ + static void table(const char* t) { table_ = t; }\ + const char* const table() const\ + { return table_override_ ? table_override_ : NAME::table_; }\ + void instance_table(const char* t) { table_override_ = t; }\ + NAME##_value_list value_list() const {\ + return value_list(",", mysqlpp::quote);}\ + NAME##_value_list value_list(const char *d) const {\ + return value_list(d, mysqlpp::quote);}\ + template \ + NAME##_value_list value_list(const char *d, Manip m) const; \ + NAME##_field_list field_list() const {\ + return field_list(",", mysqlpp::do_nothing);}\ + NAME##_field_list field_list(const char *d) const {\ + return field_list(d, mysqlpp::do_nothing);}\ + template \ + NAME##_field_list field_list(const char *d, Manip m) const; \ + NAME##_equal_list equal_list(const char *d = ",", \ + const char *c = " = ") const{\ + return equal_list(d, c, mysqlpp::quote);}\ + template \ + NAME##_equal_list equal_list(const char *d, const char *c, Manip m) const; \ + /* cus_data */\ + NAME##_cus_value_list value_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12);\ + }\ + NAME##_cus_value_list value_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12);\ + }\ + NAME##_cus_value_list value_list(std::vector *i) const {\ + return value_list(",", mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(mysqlpp::sql_cmp_type sc) const {\ + return value_list(",", mysqlpp::quote, sc);\ + }\ + NAME##_cus_value_list value_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12);\ + }\ + NAME##_cus_value_list value_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + std::vector *i) const {\ + return value_list(d, mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return value_list(d, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus field */\ + NAME##_cus_field_list field_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12);\ + }\ + NAME##_cus_field_list field_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12);\ + }\ + NAME##_cus_field_list field_list(std::vector *i) const {\ + return field_list(",", mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(mysqlpp::sql_cmp_type sc) const\ + {\ + return field_list(",", mysqlpp::do_nothing, sc);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12);\ + }\ + NAME##_cus_field_list field_list(const char *d,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + std::vector *i) const {\ + return field_list(d, mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return field_list(d, mysqlpp::do_nothing, sc);\ + }\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + std::vector *i) const;\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus equal */\ + NAME##_cus_equal_list equal_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12);\ + }\ + NAME##_cus_equal_list equal_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12);\ + }\ + NAME##_cus_equal_list equal_list(std::vector *i) const {\ + return equal_list(",", " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(mysqlpp::sql_cmp_type sc) const {\ + return equal_list(",", " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + std::vector *i) const {\ + return equal_list(d, " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + std::vector *i) const {\ + return equal_list(d, c, mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, c, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + private:\ + static const char* table_;\ + const char* table_override_;\ + }; \ + MYSQLPP_SSQLS_CONDITIONAL_STATICS(\ + const char *NAME::names[] = { \ + N1 ,\ + N2 ,\ + N3 ,\ + N4 ,\ + N5 ,\ + N6 ,\ + N7 ,\ + N8 ,\ + N9 ,\ + N10 ,\ + N11 ,\ + N12 \ + }; \ + const char* NAME::table_ = #NAME;\ + )\ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12) \ + { \ + delim = d;\ + manip = m;\ + del_vector = true;\ + obj = o; \ + include = new std::vector(12, false);\ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + } \ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(12, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + }\ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12) {\ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(12, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + } \ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(12, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + }\ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(12, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + } \ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(12, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + }\ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_value_list& obj) { \ + s << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.manip << obj.obj->I6 << obj.delim;\ + s << obj.manip << obj.obj->I7 << obj.delim;\ + s << obj.manip << obj.obj->I8 << obj.delim;\ + s << obj.manip << obj.obj->I9 << obj.delim;\ + s << obj.manip << obj.obj->I10 << obj.delim;\ + s << obj.manip << obj.obj->I11 << obj.delim;\ + s << obj.manip << obj.obj->I12; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_field_list& obj) { \ + s << obj.manip << obj.obj->names[0] << obj.delim;\ + s << obj.manip << obj.obj->names[1] << obj.delim;\ + s << obj.manip << obj.obj->names[2] << obj.delim;\ + s << obj.manip << obj.obj->names[3] << obj.delim;\ + s << obj.manip << obj.obj->names[4] << obj.delim;\ + s << obj.manip << obj.obj->names[5] << obj.delim;\ + s << obj.manip << obj.obj->names[6] << obj.delim;\ + s << obj.manip << obj.obj->names[7] << obj.delim;\ + s << obj.manip << obj.obj->names[8] << obj.delim;\ + s << obj.manip << obj.obj->names[9] << obj.delim;\ + s << obj.manip << obj.obj->names[10] << obj.delim;\ + s << obj.manip << obj.obj->names[11]; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_equal_list& obj) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6 << obj.delim;\ + s << obj.obj->names[6] << obj.comp << obj.manip << obj.obj->I7 << obj.delim;\ + s << obj.obj->names[7] << obj.comp << obj.manip << obj.obj->I8 << obj.delim;\ + s << obj.obj->names[8] << obj.comp << obj.manip << obj.obj->I9 << obj.delim;\ + s << obj.obj->names[9] << obj.comp << obj.manip << obj.obj->I10 << obj.delim;\ + s << obj.obj->names[10] << obj.comp << obj.manip << obj.obj->I11 << obj.delim;\ + s << obj.obj->names[11] << obj.comp << obj.manip << obj.obj->I12; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_value_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I6;\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I7;\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I8;\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I9;\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I10;\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I11;\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I12;\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_field_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->names[0];\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[1];\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[2];\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[3];\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[4];\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[5];\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[6];\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[7];\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[8];\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[9];\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[10];\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[11];\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_equal_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6;\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[6] << obj.comp << obj.manip << obj.obj->I7;\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[7] << obj.comp << obj.manip << obj.obj->I8;\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[8] << obj.comp << obj.manip << obj.obj->I9;\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[9] << obj.comp << obj.manip << obj.obj->I10;\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[10] << obj.comp << obj.manip << obj.obj->I11;\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[11] << obj.comp << obj.manip << obj.obj->I12;\ + } \ + return s; \ + } \ + template \ + inline NAME##_value_list NAME::value_list(const char *d, Manip m) const { \ + return NAME##_value_list (this, d, m); \ + } \ + template \ + inline NAME##_field_list NAME::field_list(const char *d, Manip m) const { \ + return NAME##_field_list (this, d, m); \ + } \ + template \ + inline NAME##_equal_list NAME::equal_list(const char *d, const char *c, Manip m) const { \ + return NAME##_equal_list (this, d, c, m); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12) const {\ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12) const { \ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12) const { \ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12) const {\ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_value_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_field_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_equal_list (this, d, c, m, i);\ + }\ + template \ + inline NAME##_cus_value_list \ + NAME::value_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, value, NUM);\ + }\ + template \ + inline NAME##_cus_field_list \ + NAME::field_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, field, NUM);\ + }\ + template \ + inline NAME##_cus_equal_list \ + NAME::equal_list(const char *d, const char *c, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_defe_##CMP(NAME, equal, NUM);\ + }\ + template \ + void populate_##NAME(NAME *s, const mysqlpp::Row &row) { \ + mysqlpp::NoExceptions ignore_schema_mismatches(row);\ + s->I1 = row[N1].conv(T1());\ + s->I2 = row[N2].conv(T2());\ + s->I3 = row[N3].conv(T3());\ + s->I4 = row[N4].conv(T4());\ + s->I5 = row[N5].conv(T5());\ + s->I6 = row[N6].conv(T6());\ + s->I7 = row[N7].conv(T7());\ + s->I8 = row[N8].conv(T8());\ + s->I9 = row[N9].conv(T9());\ + s->I10 = row[N10].conv(T10());\ + s->I11 = row[N11].conv(T11());\ + s->I12 = row[N12].conv(T12());\ + } \ + inline NAME::NAME(const mysqlpp::Row& row) :\ + table_override_(0)\ + {\ + populate_##NAME(this, row);\ + }\ + inline void NAME::set(const mysqlpp::Row& row)\ + {\ + populate_##NAME(this, row);\ + }\ + sql_COMPARE__##CMP(NAME, I1, I2, I3, I4, I5, I6, I7, I8, I9, I10, I11, I12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ) + +#define sql_create_12(NAME, CMP, CONTR, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12) \ + sql_create_complete_12(NAME, CMP, CONTR, T1, I1, #I1, T2, I2, #I2, T3, I3, #I3, T4, I4, #I4, T5, I5, #I5, T6, I6, #I6, T7, I7, #I7, T8, I8, #I8, T9, I9, #I9, T10, I10, #I10, T11, I11, #I11, T12, I12, #I12) \ + +// --------------------------------------------------- +// End Create 12 +// --------------------------------------------------- + +// --------------------------------------------------- +// Begin Create 13 +// --------------------------------------------------- +#define sql_create_complete_13(NAME, CMP, CONTR, T1, I1, N1, T2, I2, N2, T3, I3, N3, T4, I4, N4, T5, I5, N5, T6, I6, N6, T7, I7, N7, T8, I8, N8, T9, I9, N9, T10, I10, N10, T11, I11, N11, T12, I12, N12, T13, I13, N13) \ + struct NAME; \ + enum NAME##_enum { \ + NAME##_##I1,\ + NAME##_##I2,\ + NAME##_##I3,\ + NAME##_##I4,\ + NAME##_##I5,\ + NAME##_##I6,\ + NAME##_##I7,\ + NAME##_##I8,\ + NAME##_##I9,\ + NAME##_##I10,\ + NAME##_##I11,\ + NAME##_##I12,\ + NAME##_##I13 \ + ,NAME##_NULL \ + }; \ + template \ + class NAME##_value_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_value_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_##field_list {\ + public: \ + const NAME *obj; \ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_field_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_equal_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public: \ + NAME##_equal_list (const NAME *o, const char *d, const char *c, Manip m) \ + : obj(o), delim(d), comp(c), manip(m) {}\ + };\ + template \ + class NAME##_cus_value_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_value_list () {if (del_vector) delete include;} \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13);\ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13); \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m ,std::vector* i)\ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_field_list { \ + public:\ + const NAME *obj; \ + std::vector *include; \ + bool del_vector; \ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_field_list () {if (del_vector) delete include;} \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_equal_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public:\ + ~NAME##_##cus_equal_list () {if (del_vector) delete include;}\ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), comp(c), manip(m) {}\ + };\ + template int sql_compare_##NAME(const NAME&, const NAME&);\ + struct NAME { \ + T1 I1;\ + T2 I2;\ + T3 I3;\ + T4 I4;\ + T5 I5;\ + T6 I6;\ + T7 I7;\ + T8 I8;\ + T9 I9;\ + T10 I10;\ + T11 I11;\ + T12 I12;\ + T13 I13; \ + NAME() : table_override_(0) {} \ + NAME(const mysqlpp::Row& row);\ + void set(const mysqlpp::Row &row);\ + sql_compare_define_##CMP(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, T13, I13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + sql_construct_define_##CONTR(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, T13, I13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + static const char* names[];\ + static void table(const char* t) { table_ = t; }\ + const char* const table() const\ + { return table_override_ ? table_override_ : NAME::table_; }\ + void instance_table(const char* t) { table_override_ = t; }\ + NAME##_value_list value_list() const {\ + return value_list(",", mysqlpp::quote);}\ + NAME##_value_list value_list(const char *d) const {\ + return value_list(d, mysqlpp::quote);}\ + template \ + NAME##_value_list value_list(const char *d, Manip m) const; \ + NAME##_field_list field_list() const {\ + return field_list(",", mysqlpp::do_nothing);}\ + NAME##_field_list field_list(const char *d) const {\ + return field_list(d, mysqlpp::do_nothing);}\ + template \ + NAME##_field_list field_list(const char *d, Manip m) const; \ + NAME##_equal_list equal_list(const char *d = ",", \ + const char *c = " = ") const{\ + return equal_list(d, c, mysqlpp::quote);}\ + template \ + NAME##_equal_list equal_list(const char *d, const char *c, Manip m) const; \ + /* cus_data */\ + NAME##_cus_value_list value_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13);\ + }\ + NAME##_cus_value_list value_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13);\ + }\ + NAME##_cus_value_list value_list(std::vector *i) const {\ + return value_list(",", mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(mysqlpp::sql_cmp_type sc) const {\ + return value_list(",", mysqlpp::quote, sc);\ + }\ + NAME##_cus_value_list value_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13);\ + }\ + NAME##_cus_value_list value_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + std::vector *i) const {\ + return value_list(d, mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return value_list(d, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus field */\ + NAME##_cus_field_list field_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13);\ + }\ + NAME##_cus_field_list field_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13);\ + }\ + NAME##_cus_field_list field_list(std::vector *i) const {\ + return field_list(",", mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(mysqlpp::sql_cmp_type sc) const\ + {\ + return field_list(",", mysqlpp::do_nothing, sc);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13);\ + }\ + NAME##_cus_field_list field_list(const char *d,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + std::vector *i) const {\ + return field_list(d, mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return field_list(d, mysqlpp::do_nothing, sc);\ + }\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + std::vector *i) const;\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus equal */\ + NAME##_cus_equal_list equal_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13);\ + }\ + NAME##_cus_equal_list equal_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13);\ + }\ + NAME##_cus_equal_list equal_list(std::vector *i) const {\ + return equal_list(",", " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(mysqlpp::sql_cmp_type sc) const {\ + return equal_list(",", " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + std::vector *i) const {\ + return equal_list(d, " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + std::vector *i) const {\ + return equal_list(d, c, mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, c, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + private:\ + static const char* table_;\ + const char* table_override_;\ + }; \ + MYSQLPP_SSQLS_CONDITIONAL_STATICS(\ + const char *NAME::names[] = { \ + N1 ,\ + N2 ,\ + N3 ,\ + N4 ,\ + N5 ,\ + N6 ,\ + N7 ,\ + N8 ,\ + N9 ,\ + N10 ,\ + N11 ,\ + N12 ,\ + N13 \ + }; \ + const char* NAME::table_ = #NAME;\ + )\ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13) \ + { \ + delim = d;\ + manip = m;\ + del_vector = true;\ + obj = o; \ + include = new std::vector(13, false);\ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + if (i13) (*include)[12]=true;\ + } \ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(13, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + if (i13 == NAME##_NULL) return;\ + (*include)[i13]=true;\ + }\ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13) {\ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(13, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + if (i13) (*include)[12]=true;\ + } \ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(13, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + if (i13 == NAME##_NULL) return;\ + (*include)[i13]=true;\ + }\ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(13, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + if (i13) (*include)[12]=true;\ + } \ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(13, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + if (i13 == NAME##_NULL) return;\ + (*include)[i13]=true;\ + }\ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_value_list& obj) { \ + s << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.manip << obj.obj->I6 << obj.delim;\ + s << obj.manip << obj.obj->I7 << obj.delim;\ + s << obj.manip << obj.obj->I8 << obj.delim;\ + s << obj.manip << obj.obj->I9 << obj.delim;\ + s << obj.manip << obj.obj->I10 << obj.delim;\ + s << obj.manip << obj.obj->I11 << obj.delim;\ + s << obj.manip << obj.obj->I12 << obj.delim;\ + s << obj.manip << obj.obj->I13; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_field_list& obj) { \ + s << obj.manip << obj.obj->names[0] << obj.delim;\ + s << obj.manip << obj.obj->names[1] << obj.delim;\ + s << obj.manip << obj.obj->names[2] << obj.delim;\ + s << obj.manip << obj.obj->names[3] << obj.delim;\ + s << obj.manip << obj.obj->names[4] << obj.delim;\ + s << obj.manip << obj.obj->names[5] << obj.delim;\ + s << obj.manip << obj.obj->names[6] << obj.delim;\ + s << obj.manip << obj.obj->names[7] << obj.delim;\ + s << obj.manip << obj.obj->names[8] << obj.delim;\ + s << obj.manip << obj.obj->names[9] << obj.delim;\ + s << obj.manip << obj.obj->names[10] << obj.delim;\ + s << obj.manip << obj.obj->names[11] << obj.delim;\ + s << obj.manip << obj.obj->names[12]; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_equal_list& obj) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6 << obj.delim;\ + s << obj.obj->names[6] << obj.comp << obj.manip << obj.obj->I7 << obj.delim;\ + s << obj.obj->names[7] << obj.comp << obj.manip << obj.obj->I8 << obj.delim;\ + s << obj.obj->names[8] << obj.comp << obj.manip << obj.obj->I9 << obj.delim;\ + s << obj.obj->names[9] << obj.comp << obj.manip << obj.obj->I10 << obj.delim;\ + s << obj.obj->names[10] << obj.comp << obj.manip << obj.obj->I11 << obj.delim;\ + s << obj.obj->names[11] << obj.comp << obj.manip << obj.obj->I12 << obj.delim;\ + s << obj.obj->names[12] << obj.comp << obj.manip << obj.obj->I13; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_value_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I6;\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I7;\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I8;\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I9;\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I10;\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I11;\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I12;\ + before = true; \ + } \ + if ((*obj.include)[12]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I13;\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_field_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->names[0];\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[1];\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[2];\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[3];\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[4];\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[5];\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[6];\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[7];\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[8];\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[9];\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[10];\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[11];\ + before = true; \ + } \ + if ((*obj.include)[12]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[12];\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_equal_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6;\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[6] << obj.comp << obj.manip << obj.obj->I7;\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[7] << obj.comp << obj.manip << obj.obj->I8;\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[8] << obj.comp << obj.manip << obj.obj->I9;\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[9] << obj.comp << obj.manip << obj.obj->I10;\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[10] << obj.comp << obj.manip << obj.obj->I11;\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[11] << obj.comp << obj.manip << obj.obj->I12;\ + before = true; \ + } \ + if ((*obj.include)[12]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[12] << obj.comp << obj.manip << obj.obj->I13;\ + } \ + return s; \ + } \ + template \ + inline NAME##_value_list NAME::value_list(const char *d, Manip m) const { \ + return NAME##_value_list (this, d, m); \ + } \ + template \ + inline NAME##_field_list NAME::field_list(const char *d, Manip m) const { \ + return NAME##_field_list (this, d, m); \ + } \ + template \ + inline NAME##_equal_list NAME::equal_list(const char *d, const char *c, Manip m) const { \ + return NAME##_equal_list (this, d, c, m); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13) const {\ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13) const { \ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13) const { \ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13) const {\ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_value_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_field_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_equal_list (this, d, c, m, i);\ + }\ + template \ + inline NAME##_cus_value_list \ + NAME::value_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, value, NUM);\ + }\ + template \ + inline NAME##_cus_field_list \ + NAME::field_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, field, NUM);\ + }\ + template \ + inline NAME##_cus_equal_list \ + NAME::equal_list(const char *d, const char *c, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_defe_##CMP(NAME, equal, NUM);\ + }\ + template \ + void populate_##NAME(NAME *s, const mysqlpp::Row &row) { \ + mysqlpp::NoExceptions ignore_schema_mismatches(row);\ + s->I1 = row[N1].conv(T1());\ + s->I2 = row[N2].conv(T2());\ + s->I3 = row[N3].conv(T3());\ + s->I4 = row[N4].conv(T4());\ + s->I5 = row[N5].conv(T5());\ + s->I6 = row[N6].conv(T6());\ + s->I7 = row[N7].conv(T7());\ + s->I8 = row[N8].conv(T8());\ + s->I9 = row[N9].conv(T9());\ + s->I10 = row[N10].conv(T10());\ + s->I11 = row[N11].conv(T11());\ + s->I12 = row[N12].conv(T12());\ + s->I13 = row[N13].conv(T13());\ + } \ + inline NAME::NAME(const mysqlpp::Row& row) :\ + table_override_(0)\ + {\ + populate_##NAME(this, row);\ + }\ + inline void NAME::set(const mysqlpp::Row& row)\ + {\ + populate_##NAME(this, row);\ + }\ + sql_COMPARE__##CMP(NAME, I1, I2, I3, I4, I5, I6, I7, I8, I9, I10, I11, I12, I13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ) + +#define sql_create_13(NAME, CMP, CONTR, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, T13, I13) \ + sql_create_complete_13(NAME, CMP, CONTR, T1, I1, #I1, T2, I2, #I2, T3, I3, #I3, T4, I4, #I4, T5, I5, #I5, T6, I6, #I6, T7, I7, #I7, T8, I8, #I8, T9, I9, #I9, T10, I10, #I10, T11, I11, #I11, T12, I12, #I12, T13, I13, #I13) \ + +// --------------------------------------------------- +// End Create 13 +// --------------------------------------------------- + +// --------------------------------------------------- +// Begin Create 14 +// --------------------------------------------------- +#define sql_create_complete_14(NAME, CMP, CONTR, T1, I1, N1, T2, I2, N2, T3, I3, N3, T4, I4, N4, T5, I5, N5, T6, I6, N6, T7, I7, N7, T8, I8, N8, T9, I9, N9, T10, I10, N10, T11, I11, N11, T12, I12, N12, T13, I13, N13, T14, I14, N14) \ + struct NAME; \ + enum NAME##_enum { \ + NAME##_##I1,\ + NAME##_##I2,\ + NAME##_##I3,\ + NAME##_##I4,\ + NAME##_##I5,\ + NAME##_##I6,\ + NAME##_##I7,\ + NAME##_##I8,\ + NAME##_##I9,\ + NAME##_##I10,\ + NAME##_##I11,\ + NAME##_##I12,\ + NAME##_##I13,\ + NAME##_##I14 \ + ,NAME##_NULL \ + }; \ + template \ + class NAME##_value_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_value_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_##field_list {\ + public: \ + const NAME *obj; \ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_field_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_equal_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public: \ + NAME##_equal_list (const NAME *o, const char *d, const char *c, Manip m) \ + : obj(o), delim(d), comp(c), manip(m) {}\ + };\ + template \ + class NAME##_cus_value_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_value_list () {if (del_vector) delete include;} \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14);\ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14); \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m ,std::vector* i)\ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_field_list { \ + public:\ + const NAME *obj; \ + std::vector *include; \ + bool del_vector; \ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_field_list () {if (del_vector) delete include;} \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_equal_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public:\ + ~NAME##_##cus_equal_list () {if (del_vector) delete include;}\ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), comp(c), manip(m) {}\ + };\ + template int sql_compare_##NAME(const NAME&, const NAME&);\ + struct NAME { \ + T1 I1;\ + T2 I2;\ + T3 I3;\ + T4 I4;\ + T5 I5;\ + T6 I6;\ + T7 I7;\ + T8 I8;\ + T9 I9;\ + T10 I10;\ + T11 I11;\ + T12 I12;\ + T13 I13;\ + T14 I14; \ + NAME() : table_override_(0) {} \ + NAME(const mysqlpp::Row& row);\ + void set(const mysqlpp::Row &row);\ + sql_compare_define_##CMP(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, T13, I13, T14, I14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + sql_construct_define_##CONTR(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, T13, I13, T14, I14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + static const char* names[];\ + static void table(const char* t) { table_ = t; }\ + const char* const table() const\ + { return table_override_ ? table_override_ : NAME::table_; }\ + void instance_table(const char* t) { table_override_ = t; }\ + NAME##_value_list value_list() const {\ + return value_list(",", mysqlpp::quote);}\ + NAME##_value_list value_list(const char *d) const {\ + return value_list(d, mysqlpp::quote);}\ + template \ + NAME##_value_list value_list(const char *d, Manip m) const; \ + NAME##_field_list field_list() const {\ + return field_list(",", mysqlpp::do_nothing);}\ + NAME##_field_list field_list(const char *d) const {\ + return field_list(d, mysqlpp::do_nothing);}\ + template \ + NAME##_field_list field_list(const char *d, Manip m) const; \ + NAME##_equal_list equal_list(const char *d = ",", \ + const char *c = " = ") const{\ + return equal_list(d, c, mysqlpp::quote);}\ + template \ + NAME##_equal_list equal_list(const char *d, const char *c, Manip m) const; \ + /* cus_data */\ + NAME##_cus_value_list value_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14);\ + }\ + NAME##_cus_value_list value_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14);\ + }\ + NAME##_cus_value_list value_list(std::vector *i) const {\ + return value_list(",", mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(mysqlpp::sql_cmp_type sc) const {\ + return value_list(",", mysqlpp::quote, sc);\ + }\ + NAME##_cus_value_list value_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14);\ + }\ + NAME##_cus_value_list value_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + std::vector *i) const {\ + return value_list(d, mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return value_list(d, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus field */\ + NAME##_cus_field_list field_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14);\ + }\ + NAME##_cus_field_list field_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14);\ + }\ + NAME##_cus_field_list field_list(std::vector *i) const {\ + return field_list(",", mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(mysqlpp::sql_cmp_type sc) const\ + {\ + return field_list(",", mysqlpp::do_nothing, sc);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14);\ + }\ + NAME##_cus_field_list field_list(const char *d,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + std::vector *i) const {\ + return field_list(d, mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return field_list(d, mysqlpp::do_nothing, sc);\ + }\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + std::vector *i) const;\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus equal */\ + NAME##_cus_equal_list equal_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14);\ + }\ + NAME##_cus_equal_list equal_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14);\ + }\ + NAME##_cus_equal_list equal_list(std::vector *i) const {\ + return equal_list(",", " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(mysqlpp::sql_cmp_type sc) const {\ + return equal_list(",", " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + std::vector *i) const {\ + return equal_list(d, " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + std::vector *i) const {\ + return equal_list(d, c, mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, c, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + private:\ + static const char* table_;\ + const char* table_override_;\ + }; \ + MYSQLPP_SSQLS_CONDITIONAL_STATICS(\ + const char *NAME::names[] = { \ + N1 ,\ + N2 ,\ + N3 ,\ + N4 ,\ + N5 ,\ + N6 ,\ + N7 ,\ + N8 ,\ + N9 ,\ + N10 ,\ + N11 ,\ + N12 ,\ + N13 ,\ + N14 \ + }; \ + const char* NAME::table_ = #NAME;\ + )\ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14) \ + { \ + delim = d;\ + manip = m;\ + del_vector = true;\ + obj = o; \ + include = new std::vector(14, false);\ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + if (i13) (*include)[12]=true;\ + if (i14) (*include)[13]=true;\ + } \ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(14, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + if (i13 == NAME##_NULL) return;\ + (*include)[i13]=true;\ + if (i14 == NAME##_NULL) return;\ + (*include)[i14]=true;\ + }\ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14) {\ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(14, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + if (i13) (*include)[12]=true;\ + if (i14) (*include)[13]=true;\ + } \ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(14, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + if (i13 == NAME##_NULL) return;\ + (*include)[i13]=true;\ + if (i14 == NAME##_NULL) return;\ + (*include)[i14]=true;\ + }\ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(14, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + if (i13) (*include)[12]=true;\ + if (i14) (*include)[13]=true;\ + } \ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(14, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + if (i13 == NAME##_NULL) return;\ + (*include)[i13]=true;\ + if (i14 == NAME##_NULL) return;\ + (*include)[i14]=true;\ + }\ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_value_list& obj) { \ + s << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.manip << obj.obj->I6 << obj.delim;\ + s << obj.manip << obj.obj->I7 << obj.delim;\ + s << obj.manip << obj.obj->I8 << obj.delim;\ + s << obj.manip << obj.obj->I9 << obj.delim;\ + s << obj.manip << obj.obj->I10 << obj.delim;\ + s << obj.manip << obj.obj->I11 << obj.delim;\ + s << obj.manip << obj.obj->I12 << obj.delim;\ + s << obj.manip << obj.obj->I13 << obj.delim;\ + s << obj.manip << obj.obj->I14; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_field_list& obj) { \ + s << obj.manip << obj.obj->names[0] << obj.delim;\ + s << obj.manip << obj.obj->names[1] << obj.delim;\ + s << obj.manip << obj.obj->names[2] << obj.delim;\ + s << obj.manip << obj.obj->names[3] << obj.delim;\ + s << obj.manip << obj.obj->names[4] << obj.delim;\ + s << obj.manip << obj.obj->names[5] << obj.delim;\ + s << obj.manip << obj.obj->names[6] << obj.delim;\ + s << obj.manip << obj.obj->names[7] << obj.delim;\ + s << obj.manip << obj.obj->names[8] << obj.delim;\ + s << obj.manip << obj.obj->names[9] << obj.delim;\ + s << obj.manip << obj.obj->names[10] << obj.delim;\ + s << obj.manip << obj.obj->names[11] << obj.delim;\ + s << obj.manip << obj.obj->names[12] << obj.delim;\ + s << obj.manip << obj.obj->names[13]; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_equal_list& obj) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6 << obj.delim;\ + s << obj.obj->names[6] << obj.comp << obj.manip << obj.obj->I7 << obj.delim;\ + s << obj.obj->names[7] << obj.comp << obj.manip << obj.obj->I8 << obj.delim;\ + s << obj.obj->names[8] << obj.comp << obj.manip << obj.obj->I9 << obj.delim;\ + s << obj.obj->names[9] << obj.comp << obj.manip << obj.obj->I10 << obj.delim;\ + s << obj.obj->names[10] << obj.comp << obj.manip << obj.obj->I11 << obj.delim;\ + s << obj.obj->names[11] << obj.comp << obj.manip << obj.obj->I12 << obj.delim;\ + s << obj.obj->names[12] << obj.comp << obj.manip << obj.obj->I13 << obj.delim;\ + s << obj.obj->names[13] << obj.comp << obj.manip << obj.obj->I14; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_value_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I6;\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I7;\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I8;\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I9;\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I10;\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I11;\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I12;\ + before = true; \ + } \ + if ((*obj.include)[12]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I13;\ + before = true; \ + } \ + if ((*obj.include)[13]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I14;\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_field_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->names[0];\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[1];\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[2];\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[3];\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[4];\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[5];\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[6];\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[7];\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[8];\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[9];\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[10];\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[11];\ + before = true; \ + } \ + if ((*obj.include)[12]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[12];\ + before = true; \ + } \ + if ((*obj.include)[13]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[13];\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_equal_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6;\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[6] << obj.comp << obj.manip << obj.obj->I7;\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[7] << obj.comp << obj.manip << obj.obj->I8;\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[8] << obj.comp << obj.manip << obj.obj->I9;\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[9] << obj.comp << obj.manip << obj.obj->I10;\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[10] << obj.comp << obj.manip << obj.obj->I11;\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[11] << obj.comp << obj.manip << obj.obj->I12;\ + before = true; \ + } \ + if ((*obj.include)[12]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[12] << obj.comp << obj.manip << obj.obj->I13;\ + before = true; \ + } \ + if ((*obj.include)[13]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[13] << obj.comp << obj.manip << obj.obj->I14;\ + } \ + return s; \ + } \ + template \ + inline NAME##_value_list NAME::value_list(const char *d, Manip m) const { \ + return NAME##_value_list (this, d, m); \ + } \ + template \ + inline NAME##_field_list NAME::field_list(const char *d, Manip m) const { \ + return NAME##_field_list (this, d, m); \ + } \ + template \ + inline NAME##_equal_list NAME::equal_list(const char *d, const char *c, Manip m) const { \ + return NAME##_equal_list (this, d, c, m); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14) const {\ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14) const { \ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14) const { \ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14) const {\ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_value_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_field_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_equal_list (this, d, c, m, i);\ + }\ + template \ + inline NAME##_cus_value_list \ + NAME::value_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, value, NUM);\ + }\ + template \ + inline NAME##_cus_field_list \ + NAME::field_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, field, NUM);\ + }\ + template \ + inline NAME##_cus_equal_list \ + NAME::equal_list(const char *d, const char *c, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_defe_##CMP(NAME, equal, NUM);\ + }\ + template \ + void populate_##NAME(NAME *s, const mysqlpp::Row &row) { \ + mysqlpp::NoExceptions ignore_schema_mismatches(row);\ + s->I1 = row[N1].conv(T1());\ + s->I2 = row[N2].conv(T2());\ + s->I3 = row[N3].conv(T3());\ + s->I4 = row[N4].conv(T4());\ + s->I5 = row[N5].conv(T5());\ + s->I6 = row[N6].conv(T6());\ + s->I7 = row[N7].conv(T7());\ + s->I8 = row[N8].conv(T8());\ + s->I9 = row[N9].conv(T9());\ + s->I10 = row[N10].conv(T10());\ + s->I11 = row[N11].conv(T11());\ + s->I12 = row[N12].conv(T12());\ + s->I13 = row[N13].conv(T13());\ + s->I14 = row[N14].conv(T14());\ + } \ + inline NAME::NAME(const mysqlpp::Row& row) :\ + table_override_(0)\ + {\ + populate_##NAME(this, row);\ + }\ + inline void NAME::set(const mysqlpp::Row& row)\ + {\ + populate_##NAME(this, row);\ + }\ + sql_COMPARE__##CMP(NAME, I1, I2, I3, I4, I5, I6, I7, I8, I9, I10, I11, I12, I13, I14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ) + +#define sql_create_14(NAME, CMP, CONTR, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, T13, I13, T14, I14) \ + sql_create_complete_14(NAME, CMP, CONTR, T1, I1, #I1, T2, I2, #I2, T3, I3, #I3, T4, I4, #I4, T5, I5, #I5, T6, I6, #I6, T7, I7, #I7, T8, I8, #I8, T9, I9, #I9, T10, I10, #I10, T11, I11, #I11, T12, I12, #I12, T13, I13, #I13, T14, I14, #I14) \ + +// --------------------------------------------------- +// End Create 14 +// --------------------------------------------------- + +// --------------------------------------------------- +// Begin Create 15 +// --------------------------------------------------- +#define sql_create_complete_15(NAME, CMP, CONTR, T1, I1, N1, T2, I2, N2, T3, I3, N3, T4, I4, N4, T5, I5, N5, T6, I6, N6, T7, I7, N7, T8, I8, N8, T9, I9, N9, T10, I10, N10, T11, I11, N11, T12, I12, N12, T13, I13, N13, T14, I14, N14, T15, I15, N15) \ + struct NAME; \ + enum NAME##_enum { \ + NAME##_##I1,\ + NAME##_##I2,\ + NAME##_##I3,\ + NAME##_##I4,\ + NAME##_##I5,\ + NAME##_##I6,\ + NAME##_##I7,\ + NAME##_##I8,\ + NAME##_##I9,\ + NAME##_##I10,\ + NAME##_##I11,\ + NAME##_##I12,\ + NAME##_##I13,\ + NAME##_##I14,\ + NAME##_##I15 \ + ,NAME##_NULL \ + }; \ + template \ + class NAME##_value_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_value_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_##field_list {\ + public: \ + const NAME *obj; \ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_field_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_equal_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public: \ + NAME##_equal_list (const NAME *o, const char *d, const char *c, Manip m) \ + : obj(o), delim(d), comp(c), manip(m) {}\ + };\ + template \ + class NAME##_cus_value_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_value_list () {if (del_vector) delete include;} \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15);\ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15); \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m ,std::vector* i)\ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_field_list { \ + public:\ + const NAME *obj; \ + std::vector *include; \ + bool del_vector; \ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_field_list () {if (del_vector) delete include;} \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_equal_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public:\ + ~NAME##_##cus_equal_list () {if (del_vector) delete include;}\ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), comp(c), manip(m) {}\ + };\ + template int sql_compare_##NAME(const NAME&, const NAME&);\ + struct NAME { \ + T1 I1;\ + T2 I2;\ + T3 I3;\ + T4 I4;\ + T5 I5;\ + T6 I6;\ + T7 I7;\ + T8 I8;\ + T9 I9;\ + T10 I10;\ + T11 I11;\ + T12 I12;\ + T13 I13;\ + T14 I14;\ + T15 I15; \ + NAME() : table_override_(0) {} \ + NAME(const mysqlpp::Row& row);\ + void set(const mysqlpp::Row &row);\ + sql_compare_define_##CMP(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, T13, I13, T14, I14, T15, I15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + sql_construct_define_##CONTR(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, T13, I13, T14, I14, T15, I15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + static const char* names[];\ + static void table(const char* t) { table_ = t; }\ + const char* const table() const\ + { return table_override_ ? table_override_ : NAME::table_; }\ + void instance_table(const char* t) { table_override_ = t; }\ + NAME##_value_list value_list() const {\ + return value_list(",", mysqlpp::quote);}\ + NAME##_value_list value_list(const char *d) const {\ + return value_list(d, mysqlpp::quote);}\ + template \ + NAME##_value_list value_list(const char *d, Manip m) const; \ + NAME##_field_list field_list() const {\ + return field_list(",", mysqlpp::do_nothing);}\ + NAME##_field_list field_list(const char *d) const {\ + return field_list(d, mysqlpp::do_nothing);}\ + template \ + NAME##_field_list field_list(const char *d, Manip m) const; \ + NAME##_equal_list equal_list(const char *d = ",", \ + const char *c = " = ") const{\ + return equal_list(d, c, mysqlpp::quote);}\ + template \ + NAME##_equal_list equal_list(const char *d, const char *c, Manip m) const; \ + /* cus_data */\ + NAME##_cus_value_list value_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15);\ + }\ + NAME##_cus_value_list value_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15);\ + }\ + NAME##_cus_value_list value_list(std::vector *i) const {\ + return value_list(",", mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(mysqlpp::sql_cmp_type sc) const {\ + return value_list(",", mysqlpp::quote, sc);\ + }\ + NAME##_cus_value_list value_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15);\ + }\ + NAME##_cus_value_list value_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + std::vector *i) const {\ + return value_list(d, mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return value_list(d, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus field */\ + NAME##_cus_field_list field_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15);\ + }\ + NAME##_cus_field_list field_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15);\ + }\ + NAME##_cus_field_list field_list(std::vector *i) const {\ + return field_list(",", mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(mysqlpp::sql_cmp_type sc) const\ + {\ + return field_list(",", mysqlpp::do_nothing, sc);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15);\ + }\ + NAME##_cus_field_list field_list(const char *d,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + std::vector *i) const {\ + return field_list(d, mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return field_list(d, mysqlpp::do_nothing, sc);\ + }\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + std::vector *i) const;\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus equal */\ + NAME##_cus_equal_list equal_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15);\ + }\ + NAME##_cus_equal_list equal_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15);\ + }\ + NAME##_cus_equal_list equal_list(std::vector *i) const {\ + return equal_list(",", " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(mysqlpp::sql_cmp_type sc) const {\ + return equal_list(",", " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + std::vector *i) const {\ + return equal_list(d, " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + std::vector *i) const {\ + return equal_list(d, c, mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, c, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + private:\ + static const char* table_;\ + const char* table_override_;\ + }; \ + MYSQLPP_SSQLS_CONDITIONAL_STATICS(\ + const char *NAME::names[] = { \ + N1 ,\ + N2 ,\ + N3 ,\ + N4 ,\ + N5 ,\ + N6 ,\ + N7 ,\ + N8 ,\ + N9 ,\ + N10 ,\ + N11 ,\ + N12 ,\ + N13 ,\ + N14 ,\ + N15 \ + }; \ + const char* NAME::table_ = #NAME;\ + )\ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15) \ + { \ + delim = d;\ + manip = m;\ + del_vector = true;\ + obj = o; \ + include = new std::vector(15, false);\ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + if (i13) (*include)[12]=true;\ + if (i14) (*include)[13]=true;\ + if (i15) (*include)[14]=true;\ + } \ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(15, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + if (i13 == NAME##_NULL) return;\ + (*include)[i13]=true;\ + if (i14 == NAME##_NULL) return;\ + (*include)[i14]=true;\ + if (i15 == NAME##_NULL) return;\ + (*include)[i15]=true;\ + }\ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15) {\ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(15, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + if (i13) (*include)[12]=true;\ + if (i14) (*include)[13]=true;\ + if (i15) (*include)[14]=true;\ + } \ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(15, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + if (i13 == NAME##_NULL) return;\ + (*include)[i13]=true;\ + if (i14 == NAME##_NULL) return;\ + (*include)[i14]=true;\ + if (i15 == NAME##_NULL) return;\ + (*include)[i15]=true;\ + }\ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(15, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + if (i13) (*include)[12]=true;\ + if (i14) (*include)[13]=true;\ + if (i15) (*include)[14]=true;\ + } \ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(15, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + if (i13 == NAME##_NULL) return;\ + (*include)[i13]=true;\ + if (i14 == NAME##_NULL) return;\ + (*include)[i14]=true;\ + if (i15 == NAME##_NULL) return;\ + (*include)[i15]=true;\ + }\ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_value_list& obj) { \ + s << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.manip << obj.obj->I6 << obj.delim;\ + s << obj.manip << obj.obj->I7 << obj.delim;\ + s << obj.manip << obj.obj->I8 << obj.delim;\ + s << obj.manip << obj.obj->I9 << obj.delim;\ + s << obj.manip << obj.obj->I10 << obj.delim;\ + s << obj.manip << obj.obj->I11 << obj.delim;\ + s << obj.manip << obj.obj->I12 << obj.delim;\ + s << obj.manip << obj.obj->I13 << obj.delim;\ + s << obj.manip << obj.obj->I14 << obj.delim;\ + s << obj.manip << obj.obj->I15; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_field_list& obj) { \ + s << obj.manip << obj.obj->names[0] << obj.delim;\ + s << obj.manip << obj.obj->names[1] << obj.delim;\ + s << obj.manip << obj.obj->names[2] << obj.delim;\ + s << obj.manip << obj.obj->names[3] << obj.delim;\ + s << obj.manip << obj.obj->names[4] << obj.delim;\ + s << obj.manip << obj.obj->names[5] << obj.delim;\ + s << obj.manip << obj.obj->names[6] << obj.delim;\ + s << obj.manip << obj.obj->names[7] << obj.delim;\ + s << obj.manip << obj.obj->names[8] << obj.delim;\ + s << obj.manip << obj.obj->names[9] << obj.delim;\ + s << obj.manip << obj.obj->names[10] << obj.delim;\ + s << obj.manip << obj.obj->names[11] << obj.delim;\ + s << obj.manip << obj.obj->names[12] << obj.delim;\ + s << obj.manip << obj.obj->names[13] << obj.delim;\ + s << obj.manip << obj.obj->names[14]; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_equal_list& obj) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6 << obj.delim;\ + s << obj.obj->names[6] << obj.comp << obj.manip << obj.obj->I7 << obj.delim;\ + s << obj.obj->names[7] << obj.comp << obj.manip << obj.obj->I8 << obj.delim;\ + s << obj.obj->names[8] << obj.comp << obj.manip << obj.obj->I9 << obj.delim;\ + s << obj.obj->names[9] << obj.comp << obj.manip << obj.obj->I10 << obj.delim;\ + s << obj.obj->names[10] << obj.comp << obj.manip << obj.obj->I11 << obj.delim;\ + s << obj.obj->names[11] << obj.comp << obj.manip << obj.obj->I12 << obj.delim;\ + s << obj.obj->names[12] << obj.comp << obj.manip << obj.obj->I13 << obj.delim;\ + s << obj.obj->names[13] << obj.comp << obj.manip << obj.obj->I14 << obj.delim;\ + s << obj.obj->names[14] << obj.comp << obj.manip << obj.obj->I15; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_value_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I6;\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I7;\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I8;\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I9;\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I10;\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I11;\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I12;\ + before = true; \ + } \ + if ((*obj.include)[12]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I13;\ + before = true; \ + } \ + if ((*obj.include)[13]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I14;\ + before = true; \ + } \ + if ((*obj.include)[14]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I15;\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_field_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->names[0];\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[1];\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[2];\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[3];\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[4];\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[5];\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[6];\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[7];\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[8];\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[9];\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[10];\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[11];\ + before = true; \ + } \ + if ((*obj.include)[12]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[12];\ + before = true; \ + } \ + if ((*obj.include)[13]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[13];\ + before = true; \ + } \ + if ((*obj.include)[14]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[14];\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_equal_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6;\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[6] << obj.comp << obj.manip << obj.obj->I7;\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[7] << obj.comp << obj.manip << obj.obj->I8;\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[8] << obj.comp << obj.manip << obj.obj->I9;\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[9] << obj.comp << obj.manip << obj.obj->I10;\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[10] << obj.comp << obj.manip << obj.obj->I11;\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[11] << obj.comp << obj.manip << obj.obj->I12;\ + before = true; \ + } \ + if ((*obj.include)[12]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[12] << obj.comp << obj.manip << obj.obj->I13;\ + before = true; \ + } \ + if ((*obj.include)[13]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[13] << obj.comp << obj.manip << obj.obj->I14;\ + before = true; \ + } \ + if ((*obj.include)[14]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[14] << obj.comp << obj.manip << obj.obj->I15;\ + } \ + return s; \ + } \ + template \ + inline NAME##_value_list NAME::value_list(const char *d, Manip m) const { \ + return NAME##_value_list (this, d, m); \ + } \ + template \ + inline NAME##_field_list NAME::field_list(const char *d, Manip m) const { \ + return NAME##_field_list (this, d, m); \ + } \ + template \ + inline NAME##_equal_list NAME::equal_list(const char *d, const char *c, Manip m) const { \ + return NAME##_equal_list (this, d, c, m); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15) const {\ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15) const { \ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15) const { \ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15) const {\ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_value_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_field_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_equal_list (this, d, c, m, i);\ + }\ + template \ + inline NAME##_cus_value_list \ + NAME::value_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, value, NUM);\ + }\ + template \ + inline NAME##_cus_field_list \ + NAME::field_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, field, NUM);\ + }\ + template \ + inline NAME##_cus_equal_list \ + NAME::equal_list(const char *d, const char *c, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_defe_##CMP(NAME, equal, NUM);\ + }\ + template \ + void populate_##NAME(NAME *s, const mysqlpp::Row &row) { \ + mysqlpp::NoExceptions ignore_schema_mismatches(row);\ + s->I1 = row[N1].conv(T1());\ + s->I2 = row[N2].conv(T2());\ + s->I3 = row[N3].conv(T3());\ + s->I4 = row[N4].conv(T4());\ + s->I5 = row[N5].conv(T5());\ + s->I6 = row[N6].conv(T6());\ + s->I7 = row[N7].conv(T7());\ + s->I8 = row[N8].conv(T8());\ + s->I9 = row[N9].conv(T9());\ + s->I10 = row[N10].conv(T10());\ + s->I11 = row[N11].conv(T11());\ + s->I12 = row[N12].conv(T12());\ + s->I13 = row[N13].conv(T13());\ + s->I14 = row[N14].conv(T14());\ + s->I15 = row[N15].conv(T15());\ + } \ + inline NAME::NAME(const mysqlpp::Row& row) :\ + table_override_(0)\ + {\ + populate_##NAME(this, row);\ + }\ + inline void NAME::set(const mysqlpp::Row& row)\ + {\ + populate_##NAME(this, row);\ + }\ + sql_COMPARE__##CMP(NAME, I1, I2, I3, I4, I5, I6, I7, I8, I9, I10, I11, I12, I13, I14, I15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ) + +#define sql_create_15(NAME, CMP, CONTR, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, T13, I13, T14, I14, T15, I15) \ + sql_create_complete_15(NAME, CMP, CONTR, T1, I1, #I1, T2, I2, #I2, T3, I3, #I3, T4, I4, #I4, T5, I5, #I5, T6, I6, #I6, T7, I7, #I7, T8, I8, #I8, T9, I9, #I9, T10, I10, #I10, T11, I11, #I11, T12, I12, #I12, T13, I13, #I13, T14, I14, #I14, T15, I15, #I15) \ + +// --------------------------------------------------- +// End Create 15 +// --------------------------------------------------- + +// --------------------------------------------------- +// Begin Create 16 +// --------------------------------------------------- +#define sql_create_complete_16(NAME, CMP, CONTR, T1, I1, N1, T2, I2, N2, T3, I3, N3, T4, I4, N4, T5, I5, N5, T6, I6, N6, T7, I7, N7, T8, I8, N8, T9, I9, N9, T10, I10, N10, T11, I11, N11, T12, I12, N12, T13, I13, N13, T14, I14, N14, T15, I15, N15, T16, I16, N16) \ + struct NAME; \ + enum NAME##_enum { \ + NAME##_##I1,\ + NAME##_##I2,\ + NAME##_##I3,\ + NAME##_##I4,\ + NAME##_##I5,\ + NAME##_##I6,\ + NAME##_##I7,\ + NAME##_##I8,\ + NAME##_##I9,\ + NAME##_##I10,\ + NAME##_##I11,\ + NAME##_##I12,\ + NAME##_##I13,\ + NAME##_##I14,\ + NAME##_##I15,\ + NAME##_##I16 \ + ,NAME##_NULL \ + }; \ + template \ + class NAME##_value_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_value_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_##field_list {\ + public: \ + const NAME *obj; \ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_field_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_equal_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public: \ + NAME##_equal_list (const NAME *o, const char *d, const char *c, Manip m) \ + : obj(o), delim(d), comp(c), manip(m) {}\ + };\ + template \ + class NAME##_cus_value_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_value_list () {if (del_vector) delete include;} \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16);\ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16); \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m ,std::vector* i)\ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_field_list { \ + public:\ + const NAME *obj; \ + std::vector *include; \ + bool del_vector; \ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_field_list () {if (del_vector) delete include;} \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_equal_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public:\ + ~NAME##_##cus_equal_list () {if (del_vector) delete include;}\ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), comp(c), manip(m) {}\ + };\ + template int sql_compare_##NAME(const NAME&, const NAME&);\ + struct NAME { \ + T1 I1;\ + T2 I2;\ + T3 I3;\ + T4 I4;\ + T5 I5;\ + T6 I6;\ + T7 I7;\ + T8 I8;\ + T9 I9;\ + T10 I10;\ + T11 I11;\ + T12 I12;\ + T13 I13;\ + T14 I14;\ + T15 I15;\ + T16 I16; \ + NAME() : table_override_(0) {} \ + NAME(const mysqlpp::Row& row);\ + void set(const mysqlpp::Row &row);\ + sql_compare_define_##CMP(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, T13, I13, T14, I14, T15, I15, T16, I16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + sql_construct_define_##CONTR(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, T13, I13, T14, I14, T15, I15, T16, I16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + static const char* names[];\ + static void table(const char* t) { table_ = t; }\ + const char* const table() const\ + { return table_override_ ? table_override_ : NAME::table_; }\ + void instance_table(const char* t) { table_override_ = t; }\ + NAME##_value_list value_list() const {\ + return value_list(",", mysqlpp::quote);}\ + NAME##_value_list value_list(const char *d) const {\ + return value_list(d, mysqlpp::quote);}\ + template \ + NAME##_value_list value_list(const char *d, Manip m) const; \ + NAME##_field_list field_list() const {\ + return field_list(",", mysqlpp::do_nothing);}\ + NAME##_field_list field_list(const char *d) const {\ + return field_list(d, mysqlpp::do_nothing);}\ + template \ + NAME##_field_list field_list(const char *d, Manip m) const; \ + NAME##_equal_list equal_list(const char *d = ",", \ + const char *c = " = ") const{\ + return equal_list(d, c, mysqlpp::quote);}\ + template \ + NAME##_equal_list equal_list(const char *d, const char *c, Manip m) const; \ + /* cus_data */\ + NAME##_cus_value_list value_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16);\ + }\ + NAME##_cus_value_list value_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16);\ + }\ + NAME##_cus_value_list value_list(std::vector *i) const {\ + return value_list(",", mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(mysqlpp::sql_cmp_type sc) const {\ + return value_list(",", mysqlpp::quote, sc);\ + }\ + NAME##_cus_value_list value_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16);\ + }\ + NAME##_cus_value_list value_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + std::vector *i) const {\ + return value_list(d, mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return value_list(d, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus field */\ + NAME##_cus_field_list field_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16);\ + }\ + NAME##_cus_field_list field_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16);\ + }\ + NAME##_cus_field_list field_list(std::vector *i) const {\ + return field_list(",", mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(mysqlpp::sql_cmp_type sc) const\ + {\ + return field_list(",", mysqlpp::do_nothing, sc);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16);\ + }\ + NAME##_cus_field_list field_list(const char *d,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + std::vector *i) const {\ + return field_list(d, mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return field_list(d, mysqlpp::do_nothing, sc);\ + }\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + std::vector *i) const;\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus equal */\ + NAME##_cus_equal_list equal_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16);\ + }\ + NAME##_cus_equal_list equal_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16);\ + }\ + NAME##_cus_equal_list equal_list(std::vector *i) const {\ + return equal_list(",", " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(mysqlpp::sql_cmp_type sc) const {\ + return equal_list(",", " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + std::vector *i) const {\ + return equal_list(d, " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + std::vector *i) const {\ + return equal_list(d, c, mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, c, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + private:\ + static const char* table_;\ + const char* table_override_;\ + }; \ + MYSQLPP_SSQLS_CONDITIONAL_STATICS(\ + const char *NAME::names[] = { \ + N1 ,\ + N2 ,\ + N3 ,\ + N4 ,\ + N5 ,\ + N6 ,\ + N7 ,\ + N8 ,\ + N9 ,\ + N10 ,\ + N11 ,\ + N12 ,\ + N13 ,\ + N14 ,\ + N15 ,\ + N16 \ + }; \ + const char* NAME::table_ = #NAME;\ + )\ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16) \ + { \ + delim = d;\ + manip = m;\ + del_vector = true;\ + obj = o; \ + include = new std::vector(16, false);\ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + if (i13) (*include)[12]=true;\ + if (i14) (*include)[13]=true;\ + if (i15) (*include)[14]=true;\ + if (i16) (*include)[15]=true;\ + } \ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(16, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + if (i13 == NAME##_NULL) return;\ + (*include)[i13]=true;\ + if (i14 == NAME##_NULL) return;\ + (*include)[i14]=true;\ + if (i15 == NAME##_NULL) return;\ + (*include)[i15]=true;\ + if (i16 == NAME##_NULL) return;\ + (*include)[i16]=true;\ + }\ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16) {\ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(16, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + if (i13) (*include)[12]=true;\ + if (i14) (*include)[13]=true;\ + if (i15) (*include)[14]=true;\ + if (i16) (*include)[15]=true;\ + } \ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(16, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + if (i13 == NAME##_NULL) return;\ + (*include)[i13]=true;\ + if (i14 == NAME##_NULL) return;\ + (*include)[i14]=true;\ + if (i15 == NAME##_NULL) return;\ + (*include)[i15]=true;\ + if (i16 == NAME##_NULL) return;\ + (*include)[i16]=true;\ + }\ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(16, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + if (i13) (*include)[12]=true;\ + if (i14) (*include)[13]=true;\ + if (i15) (*include)[14]=true;\ + if (i16) (*include)[15]=true;\ + } \ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(16, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + if (i13 == NAME##_NULL) return;\ + (*include)[i13]=true;\ + if (i14 == NAME##_NULL) return;\ + (*include)[i14]=true;\ + if (i15 == NAME##_NULL) return;\ + (*include)[i15]=true;\ + if (i16 == NAME##_NULL) return;\ + (*include)[i16]=true;\ + }\ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_value_list& obj) { \ + s << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.manip << obj.obj->I6 << obj.delim;\ + s << obj.manip << obj.obj->I7 << obj.delim;\ + s << obj.manip << obj.obj->I8 << obj.delim;\ + s << obj.manip << obj.obj->I9 << obj.delim;\ + s << obj.manip << obj.obj->I10 << obj.delim;\ + s << obj.manip << obj.obj->I11 << obj.delim;\ + s << obj.manip << obj.obj->I12 << obj.delim;\ + s << obj.manip << obj.obj->I13 << obj.delim;\ + s << obj.manip << obj.obj->I14 << obj.delim;\ + s << obj.manip << obj.obj->I15 << obj.delim;\ + s << obj.manip << obj.obj->I16; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_field_list& obj) { \ + s << obj.manip << obj.obj->names[0] << obj.delim;\ + s << obj.manip << obj.obj->names[1] << obj.delim;\ + s << obj.manip << obj.obj->names[2] << obj.delim;\ + s << obj.manip << obj.obj->names[3] << obj.delim;\ + s << obj.manip << obj.obj->names[4] << obj.delim;\ + s << obj.manip << obj.obj->names[5] << obj.delim;\ + s << obj.manip << obj.obj->names[6] << obj.delim;\ + s << obj.manip << obj.obj->names[7] << obj.delim;\ + s << obj.manip << obj.obj->names[8] << obj.delim;\ + s << obj.manip << obj.obj->names[9] << obj.delim;\ + s << obj.manip << obj.obj->names[10] << obj.delim;\ + s << obj.manip << obj.obj->names[11] << obj.delim;\ + s << obj.manip << obj.obj->names[12] << obj.delim;\ + s << obj.manip << obj.obj->names[13] << obj.delim;\ + s << obj.manip << obj.obj->names[14] << obj.delim;\ + s << obj.manip << obj.obj->names[15]; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_equal_list& obj) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6 << obj.delim;\ + s << obj.obj->names[6] << obj.comp << obj.manip << obj.obj->I7 << obj.delim;\ + s << obj.obj->names[7] << obj.comp << obj.manip << obj.obj->I8 << obj.delim;\ + s << obj.obj->names[8] << obj.comp << obj.manip << obj.obj->I9 << obj.delim;\ + s << obj.obj->names[9] << obj.comp << obj.manip << obj.obj->I10 << obj.delim;\ + s << obj.obj->names[10] << obj.comp << obj.manip << obj.obj->I11 << obj.delim;\ + s << obj.obj->names[11] << obj.comp << obj.manip << obj.obj->I12 << obj.delim;\ + s << obj.obj->names[12] << obj.comp << obj.manip << obj.obj->I13 << obj.delim;\ + s << obj.obj->names[13] << obj.comp << obj.manip << obj.obj->I14 << obj.delim;\ + s << obj.obj->names[14] << obj.comp << obj.manip << obj.obj->I15 << obj.delim;\ + s << obj.obj->names[15] << obj.comp << obj.manip << obj.obj->I16; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_value_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I6;\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I7;\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I8;\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I9;\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I10;\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I11;\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I12;\ + before = true; \ + } \ + if ((*obj.include)[12]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I13;\ + before = true; \ + } \ + if ((*obj.include)[13]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I14;\ + before = true; \ + } \ + if ((*obj.include)[14]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I15;\ + before = true; \ + } \ + if ((*obj.include)[15]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I16;\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_field_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->names[0];\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[1];\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[2];\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[3];\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[4];\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[5];\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[6];\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[7];\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[8];\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[9];\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[10];\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[11];\ + before = true; \ + } \ + if ((*obj.include)[12]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[12];\ + before = true; \ + } \ + if ((*obj.include)[13]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[13];\ + before = true; \ + } \ + if ((*obj.include)[14]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[14];\ + before = true; \ + } \ + if ((*obj.include)[15]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[15];\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_equal_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6;\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[6] << obj.comp << obj.manip << obj.obj->I7;\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[7] << obj.comp << obj.manip << obj.obj->I8;\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[8] << obj.comp << obj.manip << obj.obj->I9;\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[9] << obj.comp << obj.manip << obj.obj->I10;\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[10] << obj.comp << obj.manip << obj.obj->I11;\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[11] << obj.comp << obj.manip << obj.obj->I12;\ + before = true; \ + } \ + if ((*obj.include)[12]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[12] << obj.comp << obj.manip << obj.obj->I13;\ + before = true; \ + } \ + if ((*obj.include)[13]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[13] << obj.comp << obj.manip << obj.obj->I14;\ + before = true; \ + } \ + if ((*obj.include)[14]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[14] << obj.comp << obj.manip << obj.obj->I15;\ + before = true; \ + } \ + if ((*obj.include)[15]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[15] << obj.comp << obj.manip << obj.obj->I16;\ + } \ + return s; \ + } \ + template \ + inline NAME##_value_list NAME::value_list(const char *d, Manip m) const { \ + return NAME##_value_list (this, d, m); \ + } \ + template \ + inline NAME##_field_list NAME::field_list(const char *d, Manip m) const { \ + return NAME##_field_list (this, d, m); \ + } \ + template \ + inline NAME##_equal_list NAME::equal_list(const char *d, const char *c, Manip m) const { \ + return NAME##_equal_list (this, d, c, m); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16) const {\ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16) const { \ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16) const { \ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16) const {\ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_value_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_field_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_equal_list (this, d, c, m, i);\ + }\ + template \ + inline NAME##_cus_value_list \ + NAME::value_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, value, NUM);\ + }\ + template \ + inline NAME##_cus_field_list \ + NAME::field_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, field, NUM);\ + }\ + template \ + inline NAME##_cus_equal_list \ + NAME::equal_list(const char *d, const char *c, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_defe_##CMP(NAME, equal, NUM);\ + }\ + template \ + void populate_##NAME(NAME *s, const mysqlpp::Row &row) { \ + mysqlpp::NoExceptions ignore_schema_mismatches(row);\ + s->I1 = row[N1].conv(T1());\ + s->I2 = row[N2].conv(T2());\ + s->I3 = row[N3].conv(T3());\ + s->I4 = row[N4].conv(T4());\ + s->I5 = row[N5].conv(T5());\ + s->I6 = row[N6].conv(T6());\ + s->I7 = row[N7].conv(T7());\ + s->I8 = row[N8].conv(T8());\ + s->I9 = row[N9].conv(T9());\ + s->I10 = row[N10].conv(T10());\ + s->I11 = row[N11].conv(T11());\ + s->I12 = row[N12].conv(T12());\ + s->I13 = row[N13].conv(T13());\ + s->I14 = row[N14].conv(T14());\ + s->I15 = row[N15].conv(T15());\ + s->I16 = row[N16].conv(T16());\ + } \ + inline NAME::NAME(const mysqlpp::Row& row) :\ + table_override_(0)\ + {\ + populate_##NAME(this, row);\ + }\ + inline void NAME::set(const mysqlpp::Row& row)\ + {\ + populate_##NAME(this, row);\ + }\ + sql_COMPARE__##CMP(NAME, I1, I2, I3, I4, I5, I6, I7, I8, I9, I10, I11, I12, I13, I14, I15, I16, 0, 0, 0, 0, 0, 0, 0, 0, 0 ) + +#define sql_create_16(NAME, CMP, CONTR, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, T13, I13, T14, I14, T15, I15, T16, I16) \ + sql_create_complete_16(NAME, CMP, CONTR, T1, I1, #I1, T2, I2, #I2, T3, I3, #I3, T4, I4, #I4, T5, I5, #I5, T6, I6, #I6, T7, I7, #I7, T8, I8, #I8, T9, I9, #I9, T10, I10, #I10, T11, I11, #I11, T12, I12, #I12, T13, I13, #I13, T14, I14, #I14, T15, I15, #I15, T16, I16, #I16) \ + +// --------------------------------------------------- +// End Create 16 +// --------------------------------------------------- + +// --------------------------------------------------- +// Begin Create 17 +// --------------------------------------------------- +#define sql_create_complete_17(NAME, CMP, CONTR, T1, I1, N1, T2, I2, N2, T3, I3, N3, T4, I4, N4, T5, I5, N5, T6, I6, N6, T7, I7, N7, T8, I8, N8, T9, I9, N9, T10, I10, N10, T11, I11, N11, T12, I12, N12, T13, I13, N13, T14, I14, N14, T15, I15, N15, T16, I16, N16, T17, I17, N17) \ + struct NAME; \ + enum NAME##_enum { \ + NAME##_##I1,\ + NAME##_##I2,\ + NAME##_##I3,\ + NAME##_##I4,\ + NAME##_##I5,\ + NAME##_##I6,\ + NAME##_##I7,\ + NAME##_##I8,\ + NAME##_##I9,\ + NAME##_##I10,\ + NAME##_##I11,\ + NAME##_##I12,\ + NAME##_##I13,\ + NAME##_##I14,\ + NAME##_##I15,\ + NAME##_##I16,\ + NAME##_##I17 \ + ,NAME##_NULL \ + }; \ + template \ + class NAME##_value_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_value_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_##field_list {\ + public: \ + const NAME *obj; \ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_field_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_equal_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public: \ + NAME##_equal_list (const NAME *o, const char *d, const char *c, Manip m) \ + : obj(o), delim(d), comp(c), manip(m) {}\ + };\ + template \ + class NAME##_cus_value_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_value_list () {if (del_vector) delete include;} \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17);\ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17); \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m ,std::vector* i)\ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_field_list { \ + public:\ + const NAME *obj; \ + std::vector *include; \ + bool del_vector; \ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_field_list () {if (del_vector) delete include;} \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_equal_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public:\ + ~NAME##_##cus_equal_list () {if (del_vector) delete include;}\ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), comp(c), manip(m) {}\ + };\ + template int sql_compare_##NAME(const NAME&, const NAME&);\ + struct NAME { \ + T1 I1;\ + T2 I2;\ + T3 I3;\ + T4 I4;\ + T5 I5;\ + T6 I6;\ + T7 I7;\ + T8 I8;\ + T9 I9;\ + T10 I10;\ + T11 I11;\ + T12 I12;\ + T13 I13;\ + T14 I14;\ + T15 I15;\ + T16 I16;\ + T17 I17; \ + NAME() : table_override_(0) {} \ + NAME(const mysqlpp::Row& row);\ + void set(const mysqlpp::Row &row);\ + sql_compare_define_##CMP(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, T13, I13, T14, I14, T15, I15, T16, I16, T17, I17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + sql_construct_define_##CONTR(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, T13, I13, T14, I14, T15, I15, T16, I16, T17, I17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + static const char* names[];\ + static void table(const char* t) { table_ = t; }\ + const char* const table() const\ + { return table_override_ ? table_override_ : NAME::table_; }\ + void instance_table(const char* t) { table_override_ = t; }\ + NAME##_value_list value_list() const {\ + return value_list(",", mysqlpp::quote);}\ + NAME##_value_list value_list(const char *d) const {\ + return value_list(d, mysqlpp::quote);}\ + template \ + NAME##_value_list value_list(const char *d, Manip m) const; \ + NAME##_field_list field_list() const {\ + return field_list(",", mysqlpp::do_nothing);}\ + NAME##_field_list field_list(const char *d) const {\ + return field_list(d, mysqlpp::do_nothing);}\ + template \ + NAME##_field_list field_list(const char *d, Manip m) const; \ + NAME##_equal_list equal_list(const char *d = ",", \ + const char *c = " = ") const{\ + return equal_list(d, c, mysqlpp::quote);}\ + template \ + NAME##_equal_list equal_list(const char *d, const char *c, Manip m) const; \ + /* cus_data */\ + NAME##_cus_value_list value_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17);\ + }\ + NAME##_cus_value_list value_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17);\ + }\ + NAME##_cus_value_list value_list(std::vector *i) const {\ + return value_list(",", mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(mysqlpp::sql_cmp_type sc) const {\ + return value_list(",", mysqlpp::quote, sc);\ + }\ + NAME##_cus_value_list value_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17);\ + }\ + NAME##_cus_value_list value_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + std::vector *i) const {\ + return value_list(d, mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return value_list(d, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus field */\ + NAME##_cus_field_list field_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17);\ + }\ + NAME##_cus_field_list field_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17);\ + }\ + NAME##_cus_field_list field_list(std::vector *i) const {\ + return field_list(",", mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(mysqlpp::sql_cmp_type sc) const\ + {\ + return field_list(",", mysqlpp::do_nothing, sc);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17);\ + }\ + NAME##_cus_field_list field_list(const char *d,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + std::vector *i) const {\ + return field_list(d, mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return field_list(d, mysqlpp::do_nothing, sc);\ + }\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + std::vector *i) const;\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus equal */\ + NAME##_cus_equal_list equal_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17);\ + }\ + NAME##_cus_equal_list equal_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17);\ + }\ + NAME##_cus_equal_list equal_list(std::vector *i) const {\ + return equal_list(",", " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(mysqlpp::sql_cmp_type sc) const {\ + return equal_list(",", " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + std::vector *i) const {\ + return equal_list(d, " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + std::vector *i) const {\ + return equal_list(d, c, mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, c, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + private:\ + static const char* table_;\ + const char* table_override_;\ + }; \ + MYSQLPP_SSQLS_CONDITIONAL_STATICS(\ + const char *NAME::names[] = { \ + N1 ,\ + N2 ,\ + N3 ,\ + N4 ,\ + N5 ,\ + N6 ,\ + N7 ,\ + N8 ,\ + N9 ,\ + N10 ,\ + N11 ,\ + N12 ,\ + N13 ,\ + N14 ,\ + N15 ,\ + N16 ,\ + N17 \ + }; \ + const char* NAME::table_ = #NAME;\ + )\ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17) \ + { \ + delim = d;\ + manip = m;\ + del_vector = true;\ + obj = o; \ + include = new std::vector(17, false);\ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + if (i13) (*include)[12]=true;\ + if (i14) (*include)[13]=true;\ + if (i15) (*include)[14]=true;\ + if (i16) (*include)[15]=true;\ + if (i17) (*include)[16]=true;\ + } \ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(17, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + if (i13 == NAME##_NULL) return;\ + (*include)[i13]=true;\ + if (i14 == NAME##_NULL) return;\ + (*include)[i14]=true;\ + if (i15 == NAME##_NULL) return;\ + (*include)[i15]=true;\ + if (i16 == NAME##_NULL) return;\ + (*include)[i16]=true;\ + if (i17 == NAME##_NULL) return;\ + (*include)[i17]=true;\ + }\ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17) {\ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(17, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + if (i13) (*include)[12]=true;\ + if (i14) (*include)[13]=true;\ + if (i15) (*include)[14]=true;\ + if (i16) (*include)[15]=true;\ + if (i17) (*include)[16]=true;\ + } \ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(17, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + if (i13 == NAME##_NULL) return;\ + (*include)[i13]=true;\ + if (i14 == NAME##_NULL) return;\ + (*include)[i14]=true;\ + if (i15 == NAME##_NULL) return;\ + (*include)[i15]=true;\ + if (i16 == NAME##_NULL) return;\ + (*include)[i16]=true;\ + if (i17 == NAME##_NULL) return;\ + (*include)[i17]=true;\ + }\ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(17, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + if (i13) (*include)[12]=true;\ + if (i14) (*include)[13]=true;\ + if (i15) (*include)[14]=true;\ + if (i16) (*include)[15]=true;\ + if (i17) (*include)[16]=true;\ + } \ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(17, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + if (i13 == NAME##_NULL) return;\ + (*include)[i13]=true;\ + if (i14 == NAME##_NULL) return;\ + (*include)[i14]=true;\ + if (i15 == NAME##_NULL) return;\ + (*include)[i15]=true;\ + if (i16 == NAME##_NULL) return;\ + (*include)[i16]=true;\ + if (i17 == NAME##_NULL) return;\ + (*include)[i17]=true;\ + }\ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_value_list& obj) { \ + s << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.manip << obj.obj->I6 << obj.delim;\ + s << obj.manip << obj.obj->I7 << obj.delim;\ + s << obj.manip << obj.obj->I8 << obj.delim;\ + s << obj.manip << obj.obj->I9 << obj.delim;\ + s << obj.manip << obj.obj->I10 << obj.delim;\ + s << obj.manip << obj.obj->I11 << obj.delim;\ + s << obj.manip << obj.obj->I12 << obj.delim;\ + s << obj.manip << obj.obj->I13 << obj.delim;\ + s << obj.manip << obj.obj->I14 << obj.delim;\ + s << obj.manip << obj.obj->I15 << obj.delim;\ + s << obj.manip << obj.obj->I16 << obj.delim;\ + s << obj.manip << obj.obj->I17; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_field_list& obj) { \ + s << obj.manip << obj.obj->names[0] << obj.delim;\ + s << obj.manip << obj.obj->names[1] << obj.delim;\ + s << obj.manip << obj.obj->names[2] << obj.delim;\ + s << obj.manip << obj.obj->names[3] << obj.delim;\ + s << obj.manip << obj.obj->names[4] << obj.delim;\ + s << obj.manip << obj.obj->names[5] << obj.delim;\ + s << obj.manip << obj.obj->names[6] << obj.delim;\ + s << obj.manip << obj.obj->names[7] << obj.delim;\ + s << obj.manip << obj.obj->names[8] << obj.delim;\ + s << obj.manip << obj.obj->names[9] << obj.delim;\ + s << obj.manip << obj.obj->names[10] << obj.delim;\ + s << obj.manip << obj.obj->names[11] << obj.delim;\ + s << obj.manip << obj.obj->names[12] << obj.delim;\ + s << obj.manip << obj.obj->names[13] << obj.delim;\ + s << obj.manip << obj.obj->names[14] << obj.delim;\ + s << obj.manip << obj.obj->names[15] << obj.delim;\ + s << obj.manip << obj.obj->names[16]; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_equal_list& obj) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6 << obj.delim;\ + s << obj.obj->names[6] << obj.comp << obj.manip << obj.obj->I7 << obj.delim;\ + s << obj.obj->names[7] << obj.comp << obj.manip << obj.obj->I8 << obj.delim;\ + s << obj.obj->names[8] << obj.comp << obj.manip << obj.obj->I9 << obj.delim;\ + s << obj.obj->names[9] << obj.comp << obj.manip << obj.obj->I10 << obj.delim;\ + s << obj.obj->names[10] << obj.comp << obj.manip << obj.obj->I11 << obj.delim;\ + s << obj.obj->names[11] << obj.comp << obj.manip << obj.obj->I12 << obj.delim;\ + s << obj.obj->names[12] << obj.comp << obj.manip << obj.obj->I13 << obj.delim;\ + s << obj.obj->names[13] << obj.comp << obj.manip << obj.obj->I14 << obj.delim;\ + s << obj.obj->names[14] << obj.comp << obj.manip << obj.obj->I15 << obj.delim;\ + s << obj.obj->names[15] << obj.comp << obj.manip << obj.obj->I16 << obj.delim;\ + s << obj.obj->names[16] << obj.comp << obj.manip << obj.obj->I17; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_value_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I6;\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I7;\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I8;\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I9;\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I10;\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I11;\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I12;\ + before = true; \ + } \ + if ((*obj.include)[12]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I13;\ + before = true; \ + } \ + if ((*obj.include)[13]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I14;\ + before = true; \ + } \ + if ((*obj.include)[14]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I15;\ + before = true; \ + } \ + if ((*obj.include)[15]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I16;\ + before = true; \ + } \ + if ((*obj.include)[16]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I17;\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_field_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->names[0];\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[1];\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[2];\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[3];\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[4];\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[5];\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[6];\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[7];\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[8];\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[9];\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[10];\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[11];\ + before = true; \ + } \ + if ((*obj.include)[12]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[12];\ + before = true; \ + } \ + if ((*obj.include)[13]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[13];\ + before = true; \ + } \ + if ((*obj.include)[14]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[14];\ + before = true; \ + } \ + if ((*obj.include)[15]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[15];\ + before = true; \ + } \ + if ((*obj.include)[16]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[16];\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_equal_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6;\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[6] << obj.comp << obj.manip << obj.obj->I7;\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[7] << obj.comp << obj.manip << obj.obj->I8;\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[8] << obj.comp << obj.manip << obj.obj->I9;\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[9] << obj.comp << obj.manip << obj.obj->I10;\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[10] << obj.comp << obj.manip << obj.obj->I11;\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[11] << obj.comp << obj.manip << obj.obj->I12;\ + before = true; \ + } \ + if ((*obj.include)[12]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[12] << obj.comp << obj.manip << obj.obj->I13;\ + before = true; \ + } \ + if ((*obj.include)[13]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[13] << obj.comp << obj.manip << obj.obj->I14;\ + before = true; \ + } \ + if ((*obj.include)[14]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[14] << obj.comp << obj.manip << obj.obj->I15;\ + before = true; \ + } \ + if ((*obj.include)[15]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[15] << obj.comp << obj.manip << obj.obj->I16;\ + before = true; \ + } \ + if ((*obj.include)[16]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[16] << obj.comp << obj.manip << obj.obj->I17;\ + } \ + return s; \ + } \ + template \ + inline NAME##_value_list NAME::value_list(const char *d, Manip m) const { \ + return NAME##_value_list (this, d, m); \ + } \ + template \ + inline NAME##_field_list NAME::field_list(const char *d, Manip m) const { \ + return NAME##_field_list (this, d, m); \ + } \ + template \ + inline NAME##_equal_list NAME::equal_list(const char *d, const char *c, Manip m) const { \ + return NAME##_equal_list (this, d, c, m); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17) const {\ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17) const { \ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17) const { \ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17) const {\ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_value_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_field_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_equal_list (this, d, c, m, i);\ + }\ + template \ + inline NAME##_cus_value_list \ + NAME::value_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, value, NUM);\ + }\ + template \ + inline NAME##_cus_field_list \ + NAME::field_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, field, NUM);\ + }\ + template \ + inline NAME##_cus_equal_list \ + NAME::equal_list(const char *d, const char *c, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_defe_##CMP(NAME, equal, NUM);\ + }\ + template \ + void populate_##NAME(NAME *s, const mysqlpp::Row &row) { \ + mysqlpp::NoExceptions ignore_schema_mismatches(row);\ + s->I1 = row[N1].conv(T1());\ + s->I2 = row[N2].conv(T2());\ + s->I3 = row[N3].conv(T3());\ + s->I4 = row[N4].conv(T4());\ + s->I5 = row[N5].conv(T5());\ + s->I6 = row[N6].conv(T6());\ + s->I7 = row[N7].conv(T7());\ + s->I8 = row[N8].conv(T8());\ + s->I9 = row[N9].conv(T9());\ + s->I10 = row[N10].conv(T10());\ + s->I11 = row[N11].conv(T11());\ + s->I12 = row[N12].conv(T12());\ + s->I13 = row[N13].conv(T13());\ + s->I14 = row[N14].conv(T14());\ + s->I15 = row[N15].conv(T15());\ + s->I16 = row[N16].conv(T16());\ + s->I17 = row[N17].conv(T17());\ + } \ + inline NAME::NAME(const mysqlpp::Row& row) :\ + table_override_(0)\ + {\ + populate_##NAME(this, row);\ + }\ + inline void NAME::set(const mysqlpp::Row& row)\ + {\ + populate_##NAME(this, row);\ + }\ + sql_COMPARE__##CMP(NAME, I1, I2, I3, I4, I5, I6, I7, I8, I9, I10, I11, I12, I13, I14, I15, I16, I17, 0, 0, 0, 0, 0, 0, 0, 0 ) + +#define sql_create_17(NAME, CMP, CONTR, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, T13, I13, T14, I14, T15, I15, T16, I16, T17, I17) \ + sql_create_complete_17(NAME, CMP, CONTR, T1, I1, #I1, T2, I2, #I2, T3, I3, #I3, T4, I4, #I4, T5, I5, #I5, T6, I6, #I6, T7, I7, #I7, T8, I8, #I8, T9, I9, #I9, T10, I10, #I10, T11, I11, #I11, T12, I12, #I12, T13, I13, #I13, T14, I14, #I14, T15, I15, #I15, T16, I16, #I16, T17, I17, #I17) \ + +// --------------------------------------------------- +// End Create 17 +// --------------------------------------------------- + +// --------------------------------------------------- +// Begin Create 18 +// --------------------------------------------------- +#define sql_create_complete_18(NAME, CMP, CONTR, T1, I1, N1, T2, I2, N2, T3, I3, N3, T4, I4, N4, T5, I5, N5, T6, I6, N6, T7, I7, N7, T8, I8, N8, T9, I9, N9, T10, I10, N10, T11, I11, N11, T12, I12, N12, T13, I13, N13, T14, I14, N14, T15, I15, N15, T16, I16, N16, T17, I17, N17, T18, I18, N18) \ + struct NAME; \ + enum NAME##_enum { \ + NAME##_##I1,\ + NAME##_##I2,\ + NAME##_##I3,\ + NAME##_##I4,\ + NAME##_##I5,\ + NAME##_##I6,\ + NAME##_##I7,\ + NAME##_##I8,\ + NAME##_##I9,\ + NAME##_##I10,\ + NAME##_##I11,\ + NAME##_##I12,\ + NAME##_##I13,\ + NAME##_##I14,\ + NAME##_##I15,\ + NAME##_##I16,\ + NAME##_##I17,\ + NAME##_##I18 \ + ,NAME##_NULL \ + }; \ + template \ + class NAME##_value_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_value_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_##field_list {\ + public: \ + const NAME *obj; \ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_field_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_equal_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public: \ + NAME##_equal_list (const NAME *o, const char *d, const char *c, Manip m) \ + : obj(o), delim(d), comp(c), manip(m) {}\ + };\ + template \ + class NAME##_cus_value_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_value_list () {if (del_vector) delete include;} \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18);\ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18); \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m ,std::vector* i)\ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_field_list { \ + public:\ + const NAME *obj; \ + std::vector *include; \ + bool del_vector; \ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_field_list () {if (del_vector) delete include;} \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_equal_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public:\ + ~NAME##_##cus_equal_list () {if (del_vector) delete include;}\ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), comp(c), manip(m) {}\ + };\ + template int sql_compare_##NAME(const NAME&, const NAME&);\ + struct NAME { \ + T1 I1;\ + T2 I2;\ + T3 I3;\ + T4 I4;\ + T5 I5;\ + T6 I6;\ + T7 I7;\ + T8 I8;\ + T9 I9;\ + T10 I10;\ + T11 I11;\ + T12 I12;\ + T13 I13;\ + T14 I14;\ + T15 I15;\ + T16 I16;\ + T17 I17;\ + T18 I18; \ + NAME() : table_override_(0) {} \ + NAME(const mysqlpp::Row& row);\ + void set(const mysqlpp::Row &row);\ + sql_compare_define_##CMP(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, T13, I13, T14, I14, T15, I15, T16, I16, T17, I17, T18, I18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + sql_construct_define_##CONTR(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, T13, I13, T14, I14, T15, I15, T16, I16, T17, I17, T18, I18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + static const char* names[];\ + static void table(const char* t) { table_ = t; }\ + const char* const table() const\ + { return table_override_ ? table_override_ : NAME::table_; }\ + void instance_table(const char* t) { table_override_ = t; }\ + NAME##_value_list value_list() const {\ + return value_list(",", mysqlpp::quote);}\ + NAME##_value_list value_list(const char *d) const {\ + return value_list(d, mysqlpp::quote);}\ + template \ + NAME##_value_list value_list(const char *d, Manip m) const; \ + NAME##_field_list field_list() const {\ + return field_list(",", mysqlpp::do_nothing);}\ + NAME##_field_list field_list(const char *d) const {\ + return field_list(d, mysqlpp::do_nothing);}\ + template \ + NAME##_field_list field_list(const char *d, Manip m) const; \ + NAME##_equal_list equal_list(const char *d = ",", \ + const char *c = " = ") const{\ + return equal_list(d, c, mysqlpp::quote);}\ + template \ + NAME##_equal_list equal_list(const char *d, const char *c, Manip m) const; \ + /* cus_data */\ + NAME##_cus_value_list value_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18);\ + }\ + NAME##_cus_value_list value_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18);\ + }\ + NAME##_cus_value_list value_list(std::vector *i) const {\ + return value_list(",", mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(mysqlpp::sql_cmp_type sc) const {\ + return value_list(",", mysqlpp::quote, sc);\ + }\ + NAME##_cus_value_list value_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18);\ + }\ + NAME##_cus_value_list value_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + std::vector *i) const {\ + return value_list(d, mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return value_list(d, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus field */\ + NAME##_cus_field_list field_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18);\ + }\ + NAME##_cus_field_list field_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18);\ + }\ + NAME##_cus_field_list field_list(std::vector *i) const {\ + return field_list(",", mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(mysqlpp::sql_cmp_type sc) const\ + {\ + return field_list(",", mysqlpp::do_nothing, sc);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18);\ + }\ + NAME##_cus_field_list field_list(const char *d,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + std::vector *i) const {\ + return field_list(d, mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return field_list(d, mysqlpp::do_nothing, sc);\ + }\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + std::vector *i) const;\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus equal */\ + NAME##_cus_equal_list equal_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18);\ + }\ + NAME##_cus_equal_list equal_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18);\ + }\ + NAME##_cus_equal_list equal_list(std::vector *i) const {\ + return equal_list(",", " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(mysqlpp::sql_cmp_type sc) const {\ + return equal_list(",", " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + std::vector *i) const {\ + return equal_list(d, " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + std::vector *i) const {\ + return equal_list(d, c, mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, c, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + private:\ + static const char* table_;\ + const char* table_override_;\ + }; \ + MYSQLPP_SSQLS_CONDITIONAL_STATICS(\ + const char *NAME::names[] = { \ + N1 ,\ + N2 ,\ + N3 ,\ + N4 ,\ + N5 ,\ + N6 ,\ + N7 ,\ + N8 ,\ + N9 ,\ + N10 ,\ + N11 ,\ + N12 ,\ + N13 ,\ + N14 ,\ + N15 ,\ + N16 ,\ + N17 ,\ + N18 \ + }; \ + const char* NAME::table_ = #NAME;\ + )\ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18) \ + { \ + delim = d;\ + manip = m;\ + del_vector = true;\ + obj = o; \ + include = new std::vector(18, false);\ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + if (i13) (*include)[12]=true;\ + if (i14) (*include)[13]=true;\ + if (i15) (*include)[14]=true;\ + if (i16) (*include)[15]=true;\ + if (i17) (*include)[16]=true;\ + if (i18) (*include)[17]=true;\ + } \ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(18, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + if (i13 == NAME##_NULL) return;\ + (*include)[i13]=true;\ + if (i14 == NAME##_NULL) return;\ + (*include)[i14]=true;\ + if (i15 == NAME##_NULL) return;\ + (*include)[i15]=true;\ + if (i16 == NAME##_NULL) return;\ + (*include)[i16]=true;\ + if (i17 == NAME##_NULL) return;\ + (*include)[i17]=true;\ + if (i18 == NAME##_NULL) return;\ + (*include)[i18]=true;\ + }\ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18) {\ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(18, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + if (i13) (*include)[12]=true;\ + if (i14) (*include)[13]=true;\ + if (i15) (*include)[14]=true;\ + if (i16) (*include)[15]=true;\ + if (i17) (*include)[16]=true;\ + if (i18) (*include)[17]=true;\ + } \ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(18, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + if (i13 == NAME##_NULL) return;\ + (*include)[i13]=true;\ + if (i14 == NAME##_NULL) return;\ + (*include)[i14]=true;\ + if (i15 == NAME##_NULL) return;\ + (*include)[i15]=true;\ + if (i16 == NAME##_NULL) return;\ + (*include)[i16]=true;\ + if (i17 == NAME##_NULL) return;\ + (*include)[i17]=true;\ + if (i18 == NAME##_NULL) return;\ + (*include)[i18]=true;\ + }\ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(18, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + if (i13) (*include)[12]=true;\ + if (i14) (*include)[13]=true;\ + if (i15) (*include)[14]=true;\ + if (i16) (*include)[15]=true;\ + if (i17) (*include)[16]=true;\ + if (i18) (*include)[17]=true;\ + } \ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(18, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + if (i13 == NAME##_NULL) return;\ + (*include)[i13]=true;\ + if (i14 == NAME##_NULL) return;\ + (*include)[i14]=true;\ + if (i15 == NAME##_NULL) return;\ + (*include)[i15]=true;\ + if (i16 == NAME##_NULL) return;\ + (*include)[i16]=true;\ + if (i17 == NAME##_NULL) return;\ + (*include)[i17]=true;\ + if (i18 == NAME##_NULL) return;\ + (*include)[i18]=true;\ + }\ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_value_list& obj) { \ + s << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.manip << obj.obj->I6 << obj.delim;\ + s << obj.manip << obj.obj->I7 << obj.delim;\ + s << obj.manip << obj.obj->I8 << obj.delim;\ + s << obj.manip << obj.obj->I9 << obj.delim;\ + s << obj.manip << obj.obj->I10 << obj.delim;\ + s << obj.manip << obj.obj->I11 << obj.delim;\ + s << obj.manip << obj.obj->I12 << obj.delim;\ + s << obj.manip << obj.obj->I13 << obj.delim;\ + s << obj.manip << obj.obj->I14 << obj.delim;\ + s << obj.manip << obj.obj->I15 << obj.delim;\ + s << obj.manip << obj.obj->I16 << obj.delim;\ + s << obj.manip << obj.obj->I17 << obj.delim;\ + s << obj.manip << obj.obj->I18; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_field_list& obj) { \ + s << obj.manip << obj.obj->names[0] << obj.delim;\ + s << obj.manip << obj.obj->names[1] << obj.delim;\ + s << obj.manip << obj.obj->names[2] << obj.delim;\ + s << obj.manip << obj.obj->names[3] << obj.delim;\ + s << obj.manip << obj.obj->names[4] << obj.delim;\ + s << obj.manip << obj.obj->names[5] << obj.delim;\ + s << obj.manip << obj.obj->names[6] << obj.delim;\ + s << obj.manip << obj.obj->names[7] << obj.delim;\ + s << obj.manip << obj.obj->names[8] << obj.delim;\ + s << obj.manip << obj.obj->names[9] << obj.delim;\ + s << obj.manip << obj.obj->names[10] << obj.delim;\ + s << obj.manip << obj.obj->names[11] << obj.delim;\ + s << obj.manip << obj.obj->names[12] << obj.delim;\ + s << obj.manip << obj.obj->names[13] << obj.delim;\ + s << obj.manip << obj.obj->names[14] << obj.delim;\ + s << obj.manip << obj.obj->names[15] << obj.delim;\ + s << obj.manip << obj.obj->names[16] << obj.delim;\ + s << obj.manip << obj.obj->names[17]; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_equal_list& obj) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6 << obj.delim;\ + s << obj.obj->names[6] << obj.comp << obj.manip << obj.obj->I7 << obj.delim;\ + s << obj.obj->names[7] << obj.comp << obj.manip << obj.obj->I8 << obj.delim;\ + s << obj.obj->names[8] << obj.comp << obj.manip << obj.obj->I9 << obj.delim;\ + s << obj.obj->names[9] << obj.comp << obj.manip << obj.obj->I10 << obj.delim;\ + s << obj.obj->names[10] << obj.comp << obj.manip << obj.obj->I11 << obj.delim;\ + s << obj.obj->names[11] << obj.comp << obj.manip << obj.obj->I12 << obj.delim;\ + s << obj.obj->names[12] << obj.comp << obj.manip << obj.obj->I13 << obj.delim;\ + s << obj.obj->names[13] << obj.comp << obj.manip << obj.obj->I14 << obj.delim;\ + s << obj.obj->names[14] << obj.comp << obj.manip << obj.obj->I15 << obj.delim;\ + s << obj.obj->names[15] << obj.comp << obj.manip << obj.obj->I16 << obj.delim;\ + s << obj.obj->names[16] << obj.comp << obj.manip << obj.obj->I17 << obj.delim;\ + s << obj.obj->names[17] << obj.comp << obj.manip << obj.obj->I18; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_value_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I6;\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I7;\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I8;\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I9;\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I10;\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I11;\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I12;\ + before = true; \ + } \ + if ((*obj.include)[12]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I13;\ + before = true; \ + } \ + if ((*obj.include)[13]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I14;\ + before = true; \ + } \ + if ((*obj.include)[14]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I15;\ + before = true; \ + } \ + if ((*obj.include)[15]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I16;\ + before = true; \ + } \ + if ((*obj.include)[16]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I17;\ + before = true; \ + } \ + if ((*obj.include)[17]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I18;\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_field_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->names[0];\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[1];\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[2];\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[3];\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[4];\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[5];\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[6];\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[7];\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[8];\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[9];\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[10];\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[11];\ + before = true; \ + } \ + if ((*obj.include)[12]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[12];\ + before = true; \ + } \ + if ((*obj.include)[13]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[13];\ + before = true; \ + } \ + if ((*obj.include)[14]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[14];\ + before = true; \ + } \ + if ((*obj.include)[15]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[15];\ + before = true; \ + } \ + if ((*obj.include)[16]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[16];\ + before = true; \ + } \ + if ((*obj.include)[17]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[17];\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_equal_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6;\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[6] << obj.comp << obj.manip << obj.obj->I7;\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[7] << obj.comp << obj.manip << obj.obj->I8;\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[8] << obj.comp << obj.manip << obj.obj->I9;\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[9] << obj.comp << obj.manip << obj.obj->I10;\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[10] << obj.comp << obj.manip << obj.obj->I11;\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[11] << obj.comp << obj.manip << obj.obj->I12;\ + before = true; \ + } \ + if ((*obj.include)[12]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[12] << obj.comp << obj.manip << obj.obj->I13;\ + before = true; \ + } \ + if ((*obj.include)[13]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[13] << obj.comp << obj.manip << obj.obj->I14;\ + before = true; \ + } \ + if ((*obj.include)[14]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[14] << obj.comp << obj.manip << obj.obj->I15;\ + before = true; \ + } \ + if ((*obj.include)[15]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[15] << obj.comp << obj.manip << obj.obj->I16;\ + before = true; \ + } \ + if ((*obj.include)[16]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[16] << obj.comp << obj.manip << obj.obj->I17;\ + before = true; \ + } \ + if ((*obj.include)[17]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[17] << obj.comp << obj.manip << obj.obj->I18;\ + } \ + return s; \ + } \ + template \ + inline NAME##_value_list NAME::value_list(const char *d, Manip m) const { \ + return NAME##_value_list (this, d, m); \ + } \ + template \ + inline NAME##_field_list NAME::field_list(const char *d, Manip m) const { \ + return NAME##_field_list (this, d, m); \ + } \ + template \ + inline NAME##_equal_list NAME::equal_list(const char *d, const char *c, Manip m) const { \ + return NAME##_equal_list (this, d, c, m); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18) const {\ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18) const { \ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18) const { \ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18) const {\ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_value_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_field_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_equal_list (this, d, c, m, i);\ + }\ + template \ + inline NAME##_cus_value_list \ + NAME::value_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, value, NUM);\ + }\ + template \ + inline NAME##_cus_field_list \ + NAME::field_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, field, NUM);\ + }\ + template \ + inline NAME##_cus_equal_list \ + NAME::equal_list(const char *d, const char *c, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_defe_##CMP(NAME, equal, NUM);\ + }\ + template \ + void populate_##NAME(NAME *s, const mysqlpp::Row &row) { \ + mysqlpp::NoExceptions ignore_schema_mismatches(row);\ + s->I1 = row[N1].conv(T1());\ + s->I2 = row[N2].conv(T2());\ + s->I3 = row[N3].conv(T3());\ + s->I4 = row[N4].conv(T4());\ + s->I5 = row[N5].conv(T5());\ + s->I6 = row[N6].conv(T6());\ + s->I7 = row[N7].conv(T7());\ + s->I8 = row[N8].conv(T8());\ + s->I9 = row[N9].conv(T9());\ + s->I10 = row[N10].conv(T10());\ + s->I11 = row[N11].conv(T11());\ + s->I12 = row[N12].conv(T12());\ + s->I13 = row[N13].conv(T13());\ + s->I14 = row[N14].conv(T14());\ + s->I15 = row[N15].conv(T15());\ + s->I16 = row[N16].conv(T16());\ + s->I17 = row[N17].conv(T17());\ + s->I18 = row[N18].conv(T18());\ + } \ + inline NAME::NAME(const mysqlpp::Row& row) :\ + table_override_(0)\ + {\ + populate_##NAME(this, row);\ + }\ + inline void NAME::set(const mysqlpp::Row& row)\ + {\ + populate_##NAME(this, row);\ + }\ + sql_COMPARE__##CMP(NAME, I1, I2, I3, I4, I5, I6, I7, I8, I9, I10, I11, I12, I13, I14, I15, I16, I17, I18, 0, 0, 0, 0, 0, 0, 0 ) + +#define sql_create_18(NAME, CMP, CONTR, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, T13, I13, T14, I14, T15, I15, T16, I16, T17, I17, T18, I18) \ + sql_create_complete_18(NAME, CMP, CONTR, T1, I1, #I1, T2, I2, #I2, T3, I3, #I3, T4, I4, #I4, T5, I5, #I5, T6, I6, #I6, T7, I7, #I7, T8, I8, #I8, T9, I9, #I9, T10, I10, #I10, T11, I11, #I11, T12, I12, #I12, T13, I13, #I13, T14, I14, #I14, T15, I15, #I15, T16, I16, #I16, T17, I17, #I17, T18, I18, #I18) \ + +// --------------------------------------------------- +// End Create 18 +// --------------------------------------------------- + +// --------------------------------------------------- +// Begin Create 19 +// --------------------------------------------------- +#define sql_create_complete_19(NAME, CMP, CONTR, T1, I1, N1, T2, I2, N2, T3, I3, N3, T4, I4, N4, T5, I5, N5, T6, I6, N6, T7, I7, N7, T8, I8, N8, T9, I9, N9, T10, I10, N10, T11, I11, N11, T12, I12, N12, T13, I13, N13, T14, I14, N14, T15, I15, N15, T16, I16, N16, T17, I17, N17, T18, I18, N18, T19, I19, N19) \ + struct NAME; \ + enum NAME##_enum { \ + NAME##_##I1,\ + NAME##_##I2,\ + NAME##_##I3,\ + NAME##_##I4,\ + NAME##_##I5,\ + NAME##_##I6,\ + NAME##_##I7,\ + NAME##_##I8,\ + NAME##_##I9,\ + NAME##_##I10,\ + NAME##_##I11,\ + NAME##_##I12,\ + NAME##_##I13,\ + NAME##_##I14,\ + NAME##_##I15,\ + NAME##_##I16,\ + NAME##_##I17,\ + NAME##_##I18,\ + NAME##_##I19 \ + ,NAME##_NULL \ + }; \ + template \ + class NAME##_value_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_value_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_##field_list {\ + public: \ + const NAME *obj; \ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_field_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_equal_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public: \ + NAME##_equal_list (const NAME *o, const char *d, const char *c, Manip m) \ + : obj(o), delim(d), comp(c), manip(m) {}\ + };\ + template \ + class NAME##_cus_value_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_value_list () {if (del_vector) delete include;} \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19);\ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19); \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m ,std::vector* i)\ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_field_list { \ + public:\ + const NAME *obj; \ + std::vector *include; \ + bool del_vector; \ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_field_list () {if (del_vector) delete include;} \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_equal_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public:\ + ~NAME##_##cus_equal_list () {if (del_vector) delete include;}\ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), comp(c), manip(m) {}\ + };\ + template int sql_compare_##NAME(const NAME&, const NAME&);\ + struct NAME { \ + T1 I1;\ + T2 I2;\ + T3 I3;\ + T4 I4;\ + T5 I5;\ + T6 I6;\ + T7 I7;\ + T8 I8;\ + T9 I9;\ + T10 I10;\ + T11 I11;\ + T12 I12;\ + T13 I13;\ + T14 I14;\ + T15 I15;\ + T16 I16;\ + T17 I17;\ + T18 I18;\ + T19 I19; \ + NAME() : table_override_(0) {} \ + NAME(const mysqlpp::Row& row);\ + void set(const mysqlpp::Row &row);\ + sql_compare_define_##CMP(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, T13, I13, T14, I14, T15, I15, T16, I16, T17, I17, T18, I18, T19, I19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + sql_construct_define_##CONTR(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, T13, I13, T14, I14, T15, I15, T16, I16, T17, I17, T18, I18, T19, I19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + static const char* names[];\ + static void table(const char* t) { table_ = t; }\ + const char* const table() const\ + { return table_override_ ? table_override_ : NAME::table_; }\ + void instance_table(const char* t) { table_override_ = t; }\ + NAME##_value_list value_list() const {\ + return value_list(",", mysqlpp::quote);}\ + NAME##_value_list value_list(const char *d) const {\ + return value_list(d, mysqlpp::quote);}\ + template \ + NAME##_value_list value_list(const char *d, Manip m) const; \ + NAME##_field_list field_list() const {\ + return field_list(",", mysqlpp::do_nothing);}\ + NAME##_field_list field_list(const char *d) const {\ + return field_list(d, mysqlpp::do_nothing);}\ + template \ + NAME##_field_list field_list(const char *d, Manip m) const; \ + NAME##_equal_list equal_list(const char *d = ",", \ + const char *c = " = ") const{\ + return equal_list(d, c, mysqlpp::quote);}\ + template \ + NAME##_equal_list equal_list(const char *d, const char *c, Manip m) const; \ + /* cus_data */\ + NAME##_cus_value_list value_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19);\ + }\ + NAME##_cus_value_list value_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19);\ + }\ + NAME##_cus_value_list value_list(std::vector *i) const {\ + return value_list(",", mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(mysqlpp::sql_cmp_type sc) const {\ + return value_list(",", mysqlpp::quote, sc);\ + }\ + NAME##_cus_value_list value_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19);\ + }\ + NAME##_cus_value_list value_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + std::vector *i) const {\ + return value_list(d, mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return value_list(d, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus field */\ + NAME##_cus_field_list field_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19);\ + }\ + NAME##_cus_field_list field_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19);\ + }\ + NAME##_cus_field_list field_list(std::vector *i) const {\ + return field_list(",", mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(mysqlpp::sql_cmp_type sc) const\ + {\ + return field_list(",", mysqlpp::do_nothing, sc);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19);\ + }\ + NAME##_cus_field_list field_list(const char *d,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + std::vector *i) const {\ + return field_list(d, mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return field_list(d, mysqlpp::do_nothing, sc);\ + }\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + std::vector *i) const;\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus equal */\ + NAME##_cus_equal_list equal_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19);\ + }\ + NAME##_cus_equal_list equal_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19);\ + }\ + NAME##_cus_equal_list equal_list(std::vector *i) const {\ + return equal_list(",", " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(mysqlpp::sql_cmp_type sc) const {\ + return equal_list(",", " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + std::vector *i) const {\ + return equal_list(d, " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + std::vector *i) const {\ + return equal_list(d, c, mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, c, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + private:\ + static const char* table_;\ + const char* table_override_;\ + }; \ + MYSQLPP_SSQLS_CONDITIONAL_STATICS(\ + const char *NAME::names[] = { \ + N1 ,\ + N2 ,\ + N3 ,\ + N4 ,\ + N5 ,\ + N6 ,\ + N7 ,\ + N8 ,\ + N9 ,\ + N10 ,\ + N11 ,\ + N12 ,\ + N13 ,\ + N14 ,\ + N15 ,\ + N16 ,\ + N17 ,\ + N18 ,\ + N19 \ + }; \ + const char* NAME::table_ = #NAME;\ + )\ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19) \ + { \ + delim = d;\ + manip = m;\ + del_vector = true;\ + obj = o; \ + include = new std::vector(19, false);\ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + if (i13) (*include)[12]=true;\ + if (i14) (*include)[13]=true;\ + if (i15) (*include)[14]=true;\ + if (i16) (*include)[15]=true;\ + if (i17) (*include)[16]=true;\ + if (i18) (*include)[17]=true;\ + if (i19) (*include)[18]=true;\ + } \ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(19, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + if (i13 == NAME##_NULL) return;\ + (*include)[i13]=true;\ + if (i14 == NAME##_NULL) return;\ + (*include)[i14]=true;\ + if (i15 == NAME##_NULL) return;\ + (*include)[i15]=true;\ + if (i16 == NAME##_NULL) return;\ + (*include)[i16]=true;\ + if (i17 == NAME##_NULL) return;\ + (*include)[i17]=true;\ + if (i18 == NAME##_NULL) return;\ + (*include)[i18]=true;\ + if (i19 == NAME##_NULL) return;\ + (*include)[i19]=true;\ + }\ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19) {\ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(19, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + if (i13) (*include)[12]=true;\ + if (i14) (*include)[13]=true;\ + if (i15) (*include)[14]=true;\ + if (i16) (*include)[15]=true;\ + if (i17) (*include)[16]=true;\ + if (i18) (*include)[17]=true;\ + if (i19) (*include)[18]=true;\ + } \ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(19, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + if (i13 == NAME##_NULL) return;\ + (*include)[i13]=true;\ + if (i14 == NAME##_NULL) return;\ + (*include)[i14]=true;\ + if (i15 == NAME##_NULL) return;\ + (*include)[i15]=true;\ + if (i16 == NAME##_NULL) return;\ + (*include)[i16]=true;\ + if (i17 == NAME##_NULL) return;\ + (*include)[i17]=true;\ + if (i18 == NAME##_NULL) return;\ + (*include)[i18]=true;\ + if (i19 == NAME##_NULL) return;\ + (*include)[i19]=true;\ + }\ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(19, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + if (i13) (*include)[12]=true;\ + if (i14) (*include)[13]=true;\ + if (i15) (*include)[14]=true;\ + if (i16) (*include)[15]=true;\ + if (i17) (*include)[16]=true;\ + if (i18) (*include)[17]=true;\ + if (i19) (*include)[18]=true;\ + } \ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(19, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + if (i13 == NAME##_NULL) return;\ + (*include)[i13]=true;\ + if (i14 == NAME##_NULL) return;\ + (*include)[i14]=true;\ + if (i15 == NAME##_NULL) return;\ + (*include)[i15]=true;\ + if (i16 == NAME##_NULL) return;\ + (*include)[i16]=true;\ + if (i17 == NAME##_NULL) return;\ + (*include)[i17]=true;\ + if (i18 == NAME##_NULL) return;\ + (*include)[i18]=true;\ + if (i19 == NAME##_NULL) return;\ + (*include)[i19]=true;\ + }\ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_value_list& obj) { \ + s << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.manip << obj.obj->I6 << obj.delim;\ + s << obj.manip << obj.obj->I7 << obj.delim;\ + s << obj.manip << obj.obj->I8 << obj.delim;\ + s << obj.manip << obj.obj->I9 << obj.delim;\ + s << obj.manip << obj.obj->I10 << obj.delim;\ + s << obj.manip << obj.obj->I11 << obj.delim;\ + s << obj.manip << obj.obj->I12 << obj.delim;\ + s << obj.manip << obj.obj->I13 << obj.delim;\ + s << obj.manip << obj.obj->I14 << obj.delim;\ + s << obj.manip << obj.obj->I15 << obj.delim;\ + s << obj.manip << obj.obj->I16 << obj.delim;\ + s << obj.manip << obj.obj->I17 << obj.delim;\ + s << obj.manip << obj.obj->I18 << obj.delim;\ + s << obj.manip << obj.obj->I19; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_field_list& obj) { \ + s << obj.manip << obj.obj->names[0] << obj.delim;\ + s << obj.manip << obj.obj->names[1] << obj.delim;\ + s << obj.manip << obj.obj->names[2] << obj.delim;\ + s << obj.manip << obj.obj->names[3] << obj.delim;\ + s << obj.manip << obj.obj->names[4] << obj.delim;\ + s << obj.manip << obj.obj->names[5] << obj.delim;\ + s << obj.manip << obj.obj->names[6] << obj.delim;\ + s << obj.manip << obj.obj->names[7] << obj.delim;\ + s << obj.manip << obj.obj->names[8] << obj.delim;\ + s << obj.manip << obj.obj->names[9] << obj.delim;\ + s << obj.manip << obj.obj->names[10] << obj.delim;\ + s << obj.manip << obj.obj->names[11] << obj.delim;\ + s << obj.manip << obj.obj->names[12] << obj.delim;\ + s << obj.manip << obj.obj->names[13] << obj.delim;\ + s << obj.manip << obj.obj->names[14] << obj.delim;\ + s << obj.manip << obj.obj->names[15] << obj.delim;\ + s << obj.manip << obj.obj->names[16] << obj.delim;\ + s << obj.manip << obj.obj->names[17] << obj.delim;\ + s << obj.manip << obj.obj->names[18]; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_equal_list& obj) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6 << obj.delim;\ + s << obj.obj->names[6] << obj.comp << obj.manip << obj.obj->I7 << obj.delim;\ + s << obj.obj->names[7] << obj.comp << obj.manip << obj.obj->I8 << obj.delim;\ + s << obj.obj->names[8] << obj.comp << obj.manip << obj.obj->I9 << obj.delim;\ + s << obj.obj->names[9] << obj.comp << obj.manip << obj.obj->I10 << obj.delim;\ + s << obj.obj->names[10] << obj.comp << obj.manip << obj.obj->I11 << obj.delim;\ + s << obj.obj->names[11] << obj.comp << obj.manip << obj.obj->I12 << obj.delim;\ + s << obj.obj->names[12] << obj.comp << obj.manip << obj.obj->I13 << obj.delim;\ + s << obj.obj->names[13] << obj.comp << obj.manip << obj.obj->I14 << obj.delim;\ + s << obj.obj->names[14] << obj.comp << obj.manip << obj.obj->I15 << obj.delim;\ + s << obj.obj->names[15] << obj.comp << obj.manip << obj.obj->I16 << obj.delim;\ + s << obj.obj->names[16] << obj.comp << obj.manip << obj.obj->I17 << obj.delim;\ + s << obj.obj->names[17] << obj.comp << obj.manip << obj.obj->I18 << obj.delim;\ + s << obj.obj->names[18] << obj.comp << obj.manip << obj.obj->I19; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_value_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I6;\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I7;\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I8;\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I9;\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I10;\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I11;\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I12;\ + before = true; \ + } \ + if ((*obj.include)[12]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I13;\ + before = true; \ + } \ + if ((*obj.include)[13]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I14;\ + before = true; \ + } \ + if ((*obj.include)[14]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I15;\ + before = true; \ + } \ + if ((*obj.include)[15]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I16;\ + before = true; \ + } \ + if ((*obj.include)[16]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I17;\ + before = true; \ + } \ + if ((*obj.include)[17]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I18;\ + before = true; \ + } \ + if ((*obj.include)[18]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I19;\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_field_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->names[0];\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[1];\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[2];\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[3];\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[4];\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[5];\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[6];\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[7];\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[8];\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[9];\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[10];\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[11];\ + before = true; \ + } \ + if ((*obj.include)[12]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[12];\ + before = true; \ + } \ + if ((*obj.include)[13]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[13];\ + before = true; \ + } \ + if ((*obj.include)[14]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[14];\ + before = true; \ + } \ + if ((*obj.include)[15]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[15];\ + before = true; \ + } \ + if ((*obj.include)[16]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[16];\ + before = true; \ + } \ + if ((*obj.include)[17]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[17];\ + before = true; \ + } \ + if ((*obj.include)[18]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[18];\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_equal_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6;\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[6] << obj.comp << obj.manip << obj.obj->I7;\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[7] << obj.comp << obj.manip << obj.obj->I8;\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[8] << obj.comp << obj.manip << obj.obj->I9;\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[9] << obj.comp << obj.manip << obj.obj->I10;\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[10] << obj.comp << obj.manip << obj.obj->I11;\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[11] << obj.comp << obj.manip << obj.obj->I12;\ + before = true; \ + } \ + if ((*obj.include)[12]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[12] << obj.comp << obj.manip << obj.obj->I13;\ + before = true; \ + } \ + if ((*obj.include)[13]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[13] << obj.comp << obj.manip << obj.obj->I14;\ + before = true; \ + } \ + if ((*obj.include)[14]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[14] << obj.comp << obj.manip << obj.obj->I15;\ + before = true; \ + } \ + if ((*obj.include)[15]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[15] << obj.comp << obj.manip << obj.obj->I16;\ + before = true; \ + } \ + if ((*obj.include)[16]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[16] << obj.comp << obj.manip << obj.obj->I17;\ + before = true; \ + } \ + if ((*obj.include)[17]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[17] << obj.comp << obj.manip << obj.obj->I18;\ + before = true; \ + } \ + if ((*obj.include)[18]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[18] << obj.comp << obj.manip << obj.obj->I19;\ + } \ + return s; \ + } \ + template \ + inline NAME##_value_list NAME::value_list(const char *d, Manip m) const { \ + return NAME##_value_list (this, d, m); \ + } \ + template \ + inline NAME##_field_list NAME::field_list(const char *d, Manip m) const { \ + return NAME##_field_list (this, d, m); \ + } \ + template \ + inline NAME##_equal_list NAME::equal_list(const char *d, const char *c, Manip m) const { \ + return NAME##_equal_list (this, d, c, m); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19) const {\ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19) const { \ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19) const { \ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19) const {\ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_value_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_field_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_equal_list (this, d, c, m, i);\ + }\ + template \ + inline NAME##_cus_value_list \ + NAME::value_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, value, NUM);\ + }\ + template \ + inline NAME##_cus_field_list \ + NAME::field_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, field, NUM);\ + }\ + template \ + inline NAME##_cus_equal_list \ + NAME::equal_list(const char *d, const char *c, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_defe_##CMP(NAME, equal, NUM);\ + }\ + template \ + void populate_##NAME(NAME *s, const mysqlpp::Row &row) { \ + mysqlpp::NoExceptions ignore_schema_mismatches(row);\ + s->I1 = row[N1].conv(T1());\ + s->I2 = row[N2].conv(T2());\ + s->I3 = row[N3].conv(T3());\ + s->I4 = row[N4].conv(T4());\ + s->I5 = row[N5].conv(T5());\ + s->I6 = row[N6].conv(T6());\ + s->I7 = row[N7].conv(T7());\ + s->I8 = row[N8].conv(T8());\ + s->I9 = row[N9].conv(T9());\ + s->I10 = row[N10].conv(T10());\ + s->I11 = row[N11].conv(T11());\ + s->I12 = row[N12].conv(T12());\ + s->I13 = row[N13].conv(T13());\ + s->I14 = row[N14].conv(T14());\ + s->I15 = row[N15].conv(T15());\ + s->I16 = row[N16].conv(T16());\ + s->I17 = row[N17].conv(T17());\ + s->I18 = row[N18].conv(T18());\ + s->I19 = row[N19].conv(T19());\ + } \ + inline NAME::NAME(const mysqlpp::Row& row) :\ + table_override_(0)\ + {\ + populate_##NAME(this, row);\ + }\ + inline void NAME::set(const mysqlpp::Row& row)\ + {\ + populate_##NAME(this, row);\ + }\ + sql_COMPARE__##CMP(NAME, I1, I2, I3, I4, I5, I6, I7, I8, I9, I10, I11, I12, I13, I14, I15, I16, I17, I18, I19, 0, 0, 0, 0, 0, 0 ) + +#define sql_create_19(NAME, CMP, CONTR, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, T13, I13, T14, I14, T15, I15, T16, I16, T17, I17, T18, I18, T19, I19) \ + sql_create_complete_19(NAME, CMP, CONTR, T1, I1, #I1, T2, I2, #I2, T3, I3, #I3, T4, I4, #I4, T5, I5, #I5, T6, I6, #I6, T7, I7, #I7, T8, I8, #I8, T9, I9, #I9, T10, I10, #I10, T11, I11, #I11, T12, I12, #I12, T13, I13, #I13, T14, I14, #I14, T15, I15, #I15, T16, I16, #I16, T17, I17, #I17, T18, I18, #I18, T19, I19, #I19) \ + +// --------------------------------------------------- +// End Create 19 +// --------------------------------------------------- + +// --------------------------------------------------- +// Begin Create 20 +// --------------------------------------------------- +#define sql_create_complete_20(NAME, CMP, CONTR, T1, I1, N1, T2, I2, N2, T3, I3, N3, T4, I4, N4, T5, I5, N5, T6, I6, N6, T7, I7, N7, T8, I8, N8, T9, I9, N9, T10, I10, N10, T11, I11, N11, T12, I12, N12, T13, I13, N13, T14, I14, N14, T15, I15, N15, T16, I16, N16, T17, I17, N17, T18, I18, N18, T19, I19, N19, T20, I20, N20) \ + struct NAME; \ + enum NAME##_enum { \ + NAME##_##I1,\ + NAME##_##I2,\ + NAME##_##I3,\ + NAME##_##I4,\ + NAME##_##I5,\ + NAME##_##I6,\ + NAME##_##I7,\ + NAME##_##I8,\ + NAME##_##I9,\ + NAME##_##I10,\ + NAME##_##I11,\ + NAME##_##I12,\ + NAME##_##I13,\ + NAME##_##I14,\ + NAME##_##I15,\ + NAME##_##I16,\ + NAME##_##I17,\ + NAME##_##I18,\ + NAME##_##I19,\ + NAME##_##I20 \ + ,NAME##_NULL \ + }; \ + template \ + class NAME##_value_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_value_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_##field_list {\ + public: \ + const NAME *obj; \ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_field_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_equal_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public: \ + NAME##_equal_list (const NAME *o, const char *d, const char *c, Manip m) \ + : obj(o), delim(d), comp(c), manip(m) {}\ + };\ + template \ + class NAME##_cus_value_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_value_list () {if (del_vector) delete include;} \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20);\ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20); \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m ,std::vector* i)\ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_field_list { \ + public:\ + const NAME *obj; \ + std::vector *include; \ + bool del_vector; \ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_field_list () {if (del_vector) delete include;} \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_equal_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public:\ + ~NAME##_##cus_equal_list () {if (del_vector) delete include;}\ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), comp(c), manip(m) {}\ + };\ + template int sql_compare_##NAME(const NAME&, const NAME&);\ + struct NAME { \ + T1 I1;\ + T2 I2;\ + T3 I3;\ + T4 I4;\ + T5 I5;\ + T6 I6;\ + T7 I7;\ + T8 I8;\ + T9 I9;\ + T10 I10;\ + T11 I11;\ + T12 I12;\ + T13 I13;\ + T14 I14;\ + T15 I15;\ + T16 I16;\ + T17 I17;\ + T18 I18;\ + T19 I19;\ + T20 I20; \ + NAME() : table_override_(0) {} \ + NAME(const mysqlpp::Row& row);\ + void set(const mysqlpp::Row &row);\ + sql_compare_define_##CMP(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, T13, I13, T14, I14, T15, I15, T16, I16, T17, I17, T18, I18, T19, I19, T20, I20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + sql_construct_define_##CONTR(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, T13, I13, T14, I14, T15, I15, T16, I16, T17, I17, T18, I18, T19, I19, T20, I20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)\ + static const char* names[];\ + static void table(const char* t) { table_ = t; }\ + const char* const table() const\ + { return table_override_ ? table_override_ : NAME::table_; }\ + void instance_table(const char* t) { table_override_ = t; }\ + NAME##_value_list value_list() const {\ + return value_list(",", mysqlpp::quote);}\ + NAME##_value_list value_list(const char *d) const {\ + return value_list(d, mysqlpp::quote);}\ + template \ + NAME##_value_list value_list(const char *d, Manip m) const; \ + NAME##_field_list field_list() const {\ + return field_list(",", mysqlpp::do_nothing);}\ + NAME##_field_list field_list(const char *d) const {\ + return field_list(d, mysqlpp::do_nothing);}\ + template \ + NAME##_field_list field_list(const char *d, Manip m) const; \ + NAME##_equal_list equal_list(const char *d = ",", \ + const char *c = " = ") const{\ + return equal_list(d, c, mysqlpp::quote);}\ + template \ + NAME##_equal_list equal_list(const char *d, const char *c, Manip m) const; \ + /* cus_data */\ + NAME##_cus_value_list value_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20);\ + }\ + NAME##_cus_value_list value_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20);\ + }\ + NAME##_cus_value_list value_list(std::vector *i) const {\ + return value_list(",", mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(mysqlpp::sql_cmp_type sc) const {\ + return value_list(",", mysqlpp::quote, sc);\ + }\ + NAME##_cus_value_list value_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20);\ + }\ + NAME##_cus_value_list value_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + std::vector *i) const {\ + return value_list(d, mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return value_list(d, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus field */\ + NAME##_cus_field_list field_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20);\ + }\ + NAME##_cus_field_list field_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20);\ + }\ + NAME##_cus_field_list field_list(std::vector *i) const {\ + return field_list(",", mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(mysqlpp::sql_cmp_type sc) const\ + {\ + return field_list(",", mysqlpp::do_nothing, sc);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20);\ + }\ + NAME##_cus_field_list field_list(const char *d,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + std::vector *i) const {\ + return field_list(d, mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return field_list(d, mysqlpp::do_nothing, sc);\ + }\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + std::vector *i) const;\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus equal */\ + NAME##_cus_equal_list equal_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20);\ + }\ + NAME##_cus_equal_list equal_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20);\ + }\ + NAME##_cus_equal_list equal_list(std::vector *i) const {\ + return equal_list(",", " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(mysqlpp::sql_cmp_type sc) const {\ + return equal_list(",", " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + std::vector *i) const {\ + return equal_list(d, " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + std::vector *i) const {\ + return equal_list(d, c, mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, c, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + private:\ + static const char* table_;\ + const char* table_override_;\ + }; \ + MYSQLPP_SSQLS_CONDITIONAL_STATICS(\ + const char *NAME::names[] = { \ + N1 ,\ + N2 ,\ + N3 ,\ + N4 ,\ + N5 ,\ + N6 ,\ + N7 ,\ + N8 ,\ + N9 ,\ + N10 ,\ + N11 ,\ + N12 ,\ + N13 ,\ + N14 ,\ + N15 ,\ + N16 ,\ + N17 ,\ + N18 ,\ + N19 ,\ + N20 \ + }; \ + const char* NAME::table_ = #NAME;\ + )\ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20) \ + { \ + delim = d;\ + manip = m;\ + del_vector = true;\ + obj = o; \ + include = new std::vector(20, false);\ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + if (i13) (*include)[12]=true;\ + if (i14) (*include)[13]=true;\ + if (i15) (*include)[14]=true;\ + if (i16) (*include)[15]=true;\ + if (i17) (*include)[16]=true;\ + if (i18) (*include)[17]=true;\ + if (i19) (*include)[18]=true;\ + if (i20) (*include)[19]=true;\ + } \ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(20, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + if (i13 == NAME##_NULL) return;\ + (*include)[i13]=true;\ + if (i14 == NAME##_NULL) return;\ + (*include)[i14]=true;\ + if (i15 == NAME##_NULL) return;\ + (*include)[i15]=true;\ + if (i16 == NAME##_NULL) return;\ + (*include)[i16]=true;\ + if (i17 == NAME##_NULL) return;\ + (*include)[i17]=true;\ + if (i18 == NAME##_NULL) return;\ + (*include)[i18]=true;\ + if (i19 == NAME##_NULL) return;\ + (*include)[i19]=true;\ + if (i20 == NAME##_NULL) return;\ + (*include)[i20]=true;\ + }\ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20) {\ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(20, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + if (i13) (*include)[12]=true;\ + if (i14) (*include)[13]=true;\ + if (i15) (*include)[14]=true;\ + if (i16) (*include)[15]=true;\ + if (i17) (*include)[16]=true;\ + if (i18) (*include)[17]=true;\ + if (i19) (*include)[18]=true;\ + if (i20) (*include)[19]=true;\ + } \ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(20, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + if (i13 == NAME##_NULL) return;\ + (*include)[i13]=true;\ + if (i14 == NAME##_NULL) return;\ + (*include)[i14]=true;\ + if (i15 == NAME##_NULL) return;\ + (*include)[i15]=true;\ + if (i16 == NAME##_NULL) return;\ + (*include)[i16]=true;\ + if (i17 == NAME##_NULL) return;\ + (*include)[i17]=true;\ + if (i18 == NAME##_NULL) return;\ + (*include)[i18]=true;\ + if (i19 == NAME##_NULL) return;\ + (*include)[i19]=true;\ + if (i20 == NAME##_NULL) return;\ + (*include)[i20]=true;\ + }\ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(20, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + if (i13) (*include)[12]=true;\ + if (i14) (*include)[13]=true;\ + if (i15) (*include)[14]=true;\ + if (i16) (*include)[15]=true;\ + if (i17) (*include)[16]=true;\ + if (i18) (*include)[17]=true;\ + if (i19) (*include)[18]=true;\ + if (i20) (*include)[19]=true;\ + } \ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(20, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + if (i13 == NAME##_NULL) return;\ + (*include)[i13]=true;\ + if (i14 == NAME##_NULL) return;\ + (*include)[i14]=true;\ + if (i15 == NAME##_NULL) return;\ + (*include)[i15]=true;\ + if (i16 == NAME##_NULL) return;\ + (*include)[i16]=true;\ + if (i17 == NAME##_NULL) return;\ + (*include)[i17]=true;\ + if (i18 == NAME##_NULL) return;\ + (*include)[i18]=true;\ + if (i19 == NAME##_NULL) return;\ + (*include)[i19]=true;\ + if (i20 == NAME##_NULL) return;\ + (*include)[i20]=true;\ + }\ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_value_list& obj) { \ + s << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.manip << obj.obj->I6 << obj.delim;\ + s << obj.manip << obj.obj->I7 << obj.delim;\ + s << obj.manip << obj.obj->I8 << obj.delim;\ + s << obj.manip << obj.obj->I9 << obj.delim;\ + s << obj.manip << obj.obj->I10 << obj.delim;\ + s << obj.manip << obj.obj->I11 << obj.delim;\ + s << obj.manip << obj.obj->I12 << obj.delim;\ + s << obj.manip << obj.obj->I13 << obj.delim;\ + s << obj.manip << obj.obj->I14 << obj.delim;\ + s << obj.manip << obj.obj->I15 << obj.delim;\ + s << obj.manip << obj.obj->I16 << obj.delim;\ + s << obj.manip << obj.obj->I17 << obj.delim;\ + s << obj.manip << obj.obj->I18 << obj.delim;\ + s << obj.manip << obj.obj->I19 << obj.delim;\ + s << obj.manip << obj.obj->I20; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_field_list& obj) { \ + s << obj.manip << obj.obj->names[0] << obj.delim;\ + s << obj.manip << obj.obj->names[1] << obj.delim;\ + s << obj.manip << obj.obj->names[2] << obj.delim;\ + s << obj.manip << obj.obj->names[3] << obj.delim;\ + s << obj.manip << obj.obj->names[4] << obj.delim;\ + s << obj.manip << obj.obj->names[5] << obj.delim;\ + s << obj.manip << obj.obj->names[6] << obj.delim;\ + s << obj.manip << obj.obj->names[7] << obj.delim;\ + s << obj.manip << obj.obj->names[8] << obj.delim;\ + s << obj.manip << obj.obj->names[9] << obj.delim;\ + s << obj.manip << obj.obj->names[10] << obj.delim;\ + s << obj.manip << obj.obj->names[11] << obj.delim;\ + s << obj.manip << obj.obj->names[12] << obj.delim;\ + s << obj.manip << obj.obj->names[13] << obj.delim;\ + s << obj.manip << obj.obj->names[14] << obj.delim;\ + s << obj.manip << obj.obj->names[15] << obj.delim;\ + s << obj.manip << obj.obj->names[16] << obj.delim;\ + s << obj.manip << obj.obj->names[17] << obj.delim;\ + s << obj.manip << obj.obj->names[18] << obj.delim;\ + s << obj.manip << obj.obj->names[19]; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_equal_list& obj) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6 << obj.delim;\ + s << obj.obj->names[6] << obj.comp << obj.manip << obj.obj->I7 << obj.delim;\ + s << obj.obj->names[7] << obj.comp << obj.manip << obj.obj->I8 << obj.delim;\ + s << obj.obj->names[8] << obj.comp << obj.manip << obj.obj->I9 << obj.delim;\ + s << obj.obj->names[9] << obj.comp << obj.manip << obj.obj->I10 << obj.delim;\ + s << obj.obj->names[10] << obj.comp << obj.manip << obj.obj->I11 << obj.delim;\ + s << obj.obj->names[11] << obj.comp << obj.manip << obj.obj->I12 << obj.delim;\ + s << obj.obj->names[12] << obj.comp << obj.manip << obj.obj->I13 << obj.delim;\ + s << obj.obj->names[13] << obj.comp << obj.manip << obj.obj->I14 << obj.delim;\ + s << obj.obj->names[14] << obj.comp << obj.manip << obj.obj->I15 << obj.delim;\ + s << obj.obj->names[15] << obj.comp << obj.manip << obj.obj->I16 << obj.delim;\ + s << obj.obj->names[16] << obj.comp << obj.manip << obj.obj->I17 << obj.delim;\ + s << obj.obj->names[17] << obj.comp << obj.manip << obj.obj->I18 << obj.delim;\ + s << obj.obj->names[18] << obj.comp << obj.manip << obj.obj->I19 << obj.delim;\ + s << obj.obj->names[19] << obj.comp << obj.manip << obj.obj->I20; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_value_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I6;\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I7;\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I8;\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I9;\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I10;\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I11;\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I12;\ + before = true; \ + } \ + if ((*obj.include)[12]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I13;\ + before = true; \ + } \ + if ((*obj.include)[13]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I14;\ + before = true; \ + } \ + if ((*obj.include)[14]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I15;\ + before = true; \ + } \ + if ((*obj.include)[15]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I16;\ + before = true; \ + } \ + if ((*obj.include)[16]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I17;\ + before = true; \ + } \ + if ((*obj.include)[17]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I18;\ + before = true; \ + } \ + if ((*obj.include)[18]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I19;\ + before = true; \ + } \ + if ((*obj.include)[19]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I20;\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_field_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->names[0];\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[1];\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[2];\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[3];\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[4];\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[5];\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[6];\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[7];\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[8];\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[9];\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[10];\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[11];\ + before = true; \ + } \ + if ((*obj.include)[12]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[12];\ + before = true; \ + } \ + if ((*obj.include)[13]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[13];\ + before = true; \ + } \ + if ((*obj.include)[14]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[14];\ + before = true; \ + } \ + if ((*obj.include)[15]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[15];\ + before = true; \ + } \ + if ((*obj.include)[16]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[16];\ + before = true; \ + } \ + if ((*obj.include)[17]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[17];\ + before = true; \ + } \ + if ((*obj.include)[18]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[18];\ + before = true; \ + } \ + if ((*obj.include)[19]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[19];\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_equal_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6;\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[6] << obj.comp << obj.manip << obj.obj->I7;\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[7] << obj.comp << obj.manip << obj.obj->I8;\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[8] << obj.comp << obj.manip << obj.obj->I9;\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[9] << obj.comp << obj.manip << obj.obj->I10;\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[10] << obj.comp << obj.manip << obj.obj->I11;\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[11] << obj.comp << obj.manip << obj.obj->I12;\ + before = true; \ + } \ + if ((*obj.include)[12]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[12] << obj.comp << obj.manip << obj.obj->I13;\ + before = true; \ + } \ + if ((*obj.include)[13]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[13] << obj.comp << obj.manip << obj.obj->I14;\ + before = true; \ + } \ + if ((*obj.include)[14]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[14] << obj.comp << obj.manip << obj.obj->I15;\ + before = true; \ + } \ + if ((*obj.include)[15]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[15] << obj.comp << obj.manip << obj.obj->I16;\ + before = true; \ + } \ + if ((*obj.include)[16]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[16] << obj.comp << obj.manip << obj.obj->I17;\ + before = true; \ + } \ + if ((*obj.include)[17]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[17] << obj.comp << obj.manip << obj.obj->I18;\ + before = true; \ + } \ + if ((*obj.include)[18]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[18] << obj.comp << obj.manip << obj.obj->I19;\ + before = true; \ + } \ + if ((*obj.include)[19]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[19] << obj.comp << obj.manip << obj.obj->I20;\ + } \ + return s; \ + } \ + template \ + inline NAME##_value_list NAME::value_list(const char *d, Manip m) const { \ + return NAME##_value_list (this, d, m); \ + } \ + template \ + inline NAME##_field_list NAME::field_list(const char *d, Manip m) const { \ + return NAME##_field_list (this, d, m); \ + } \ + template \ + inline NAME##_equal_list NAME::equal_list(const char *d, const char *c, Manip m) const { \ + return NAME##_equal_list (this, d, c, m); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20) const {\ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20) const { \ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20) const { \ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20) const {\ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_value_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_field_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_equal_list (this, d, c, m, i);\ + }\ + template \ + inline NAME##_cus_value_list \ + NAME::value_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, value, NUM);\ + }\ + template \ + inline NAME##_cus_field_list \ + NAME::field_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, field, NUM);\ + }\ + template \ + inline NAME##_cus_equal_list \ + NAME::equal_list(const char *d, const char *c, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_defe_##CMP(NAME, equal, NUM);\ + }\ + template \ + void populate_##NAME(NAME *s, const mysqlpp::Row &row) { \ + mysqlpp::NoExceptions ignore_schema_mismatches(row);\ + s->I1 = row[N1].conv(T1());\ + s->I2 = row[N2].conv(T2());\ + s->I3 = row[N3].conv(T3());\ + s->I4 = row[N4].conv(T4());\ + s->I5 = row[N5].conv(T5());\ + s->I6 = row[N6].conv(T6());\ + s->I7 = row[N7].conv(T7());\ + s->I8 = row[N8].conv(T8());\ + s->I9 = row[N9].conv(T9());\ + s->I10 = row[N10].conv(T10());\ + s->I11 = row[N11].conv(T11());\ + s->I12 = row[N12].conv(T12());\ + s->I13 = row[N13].conv(T13());\ + s->I14 = row[N14].conv(T14());\ + s->I15 = row[N15].conv(T15());\ + s->I16 = row[N16].conv(T16());\ + s->I17 = row[N17].conv(T17());\ + s->I18 = row[N18].conv(T18());\ + s->I19 = row[N19].conv(T19());\ + s->I20 = row[N20].conv(T20());\ + } \ + inline NAME::NAME(const mysqlpp::Row& row) :\ + table_override_(0)\ + {\ + populate_##NAME(this, row);\ + }\ + inline void NAME::set(const mysqlpp::Row& row)\ + {\ + populate_##NAME(this, row);\ + }\ + sql_COMPARE__##CMP(NAME, I1, I2, I3, I4, I5, I6, I7, I8, I9, I10, I11, I12, I13, I14, I15, I16, I17, I18, I19, I20, 0, 0, 0, 0, 0 ) + +#define sql_create_20(NAME, CMP, CONTR, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, T13, I13, T14, I14, T15, I15, T16, I16, T17, I17, T18, I18, T19, I19, T20, I20) \ + sql_create_complete_20(NAME, CMP, CONTR, T1, I1, #I1, T2, I2, #I2, T3, I3, #I3, T4, I4, #I4, T5, I5, #I5, T6, I6, #I6, T7, I7, #I7, T8, I8, #I8, T9, I9, #I9, T10, I10, #I10, T11, I11, #I11, T12, I12, #I12, T13, I13, #I13, T14, I14, #I14, T15, I15, #I15, T16, I16, #I16, T17, I17, #I17, T18, I18, #I18, T19, I19, #I19, T20, I20, #I20) \ + +// --------------------------------------------------- +// End Create 20 +// --------------------------------------------------- + +// --------------------------------------------------- +// Begin Create 21 +// --------------------------------------------------- +#define sql_create_complete_21(NAME, CMP, CONTR, T1, I1, N1, T2, I2, N2, T3, I3, N3, T4, I4, N4, T5, I5, N5, T6, I6, N6, T7, I7, N7, T8, I8, N8, T9, I9, N9, T10, I10, N10, T11, I11, N11, T12, I12, N12, T13, I13, N13, T14, I14, N14, T15, I15, N15, T16, I16, N16, T17, I17, N17, T18, I18, N18, T19, I19, N19, T20, I20, N20, T21, I21, N21) \ + struct NAME; \ + enum NAME##_enum { \ + NAME##_##I1,\ + NAME##_##I2,\ + NAME##_##I3,\ + NAME##_##I4,\ + NAME##_##I5,\ + NAME##_##I6,\ + NAME##_##I7,\ + NAME##_##I8,\ + NAME##_##I9,\ + NAME##_##I10,\ + NAME##_##I11,\ + NAME##_##I12,\ + NAME##_##I13,\ + NAME##_##I14,\ + NAME##_##I15,\ + NAME##_##I16,\ + NAME##_##I17,\ + NAME##_##I18,\ + NAME##_##I19,\ + NAME##_##I20,\ + NAME##_##I21 \ + ,NAME##_NULL \ + }; \ + template \ + class NAME##_value_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_value_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_##field_list {\ + public: \ + const NAME *obj; \ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_field_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_equal_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public: \ + NAME##_equal_list (const NAME *o, const char *d, const char *c, Manip m) \ + : obj(o), delim(d), comp(c), manip(m) {}\ + };\ + template \ + class NAME##_cus_value_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_value_list () {if (del_vector) delete include;} \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21);\ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21); \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m ,std::vector* i)\ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_field_list { \ + public:\ + const NAME *obj; \ + std::vector *include; \ + bool del_vector; \ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_field_list () {if (del_vector) delete include;} \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_equal_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public:\ + ~NAME##_##cus_equal_list () {if (del_vector) delete include;}\ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), comp(c), manip(m) {}\ + };\ + template int sql_compare_##NAME(const NAME&, const NAME&);\ + struct NAME { \ + T1 I1;\ + T2 I2;\ + T3 I3;\ + T4 I4;\ + T5 I5;\ + T6 I6;\ + T7 I7;\ + T8 I8;\ + T9 I9;\ + T10 I10;\ + T11 I11;\ + T12 I12;\ + T13 I13;\ + T14 I14;\ + T15 I15;\ + T16 I16;\ + T17 I17;\ + T18 I18;\ + T19 I19;\ + T20 I20;\ + T21 I21; \ + NAME() : table_override_(0) {} \ + NAME(const mysqlpp::Row& row);\ + void set(const mysqlpp::Row &row);\ + sql_compare_define_##CMP(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, T13, I13, T14, I14, T15, I15, T16, I16, T17, I17, T18, I18, T19, I19, T20, I20, T21, I21, 0, 0, 0, 0, 0, 0, 0, 0)\ + sql_construct_define_##CONTR(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, T13, I13, T14, I14, T15, I15, T16, I16, T17, I17, T18, I18, T19, I19, T20, I20, T21, I21, 0, 0, 0, 0, 0, 0, 0, 0)\ + static const char* names[];\ + static void table(const char* t) { table_ = t; }\ + const char* const table() const\ + { return table_override_ ? table_override_ : NAME::table_; }\ + void instance_table(const char* t) { table_override_ = t; }\ + NAME##_value_list value_list() const {\ + return value_list(",", mysqlpp::quote);}\ + NAME##_value_list value_list(const char *d) const {\ + return value_list(d, mysqlpp::quote);}\ + template \ + NAME##_value_list value_list(const char *d, Manip m) const; \ + NAME##_field_list field_list() const {\ + return field_list(",", mysqlpp::do_nothing);}\ + NAME##_field_list field_list(const char *d) const {\ + return field_list(d, mysqlpp::do_nothing);}\ + template \ + NAME##_field_list field_list(const char *d, Manip m) const; \ + NAME##_equal_list equal_list(const char *d = ",", \ + const char *c = " = ") const{\ + return equal_list(d, c, mysqlpp::quote);}\ + template \ + NAME##_equal_list equal_list(const char *d, const char *c, Manip m) const; \ + /* cus_data */\ + NAME##_cus_value_list value_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21);\ + }\ + NAME##_cus_value_list value_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21);\ + }\ + NAME##_cus_value_list value_list(std::vector *i) const {\ + return value_list(",", mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(mysqlpp::sql_cmp_type sc) const {\ + return value_list(",", mysqlpp::quote, sc);\ + }\ + NAME##_cus_value_list value_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21);\ + }\ + NAME##_cus_value_list value_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + std::vector *i) const {\ + return value_list(d, mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return value_list(d, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus field */\ + NAME##_cus_field_list field_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21);\ + }\ + NAME##_cus_field_list field_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21);\ + }\ + NAME##_cus_field_list field_list(std::vector *i) const {\ + return field_list(",", mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(mysqlpp::sql_cmp_type sc) const\ + {\ + return field_list(",", mysqlpp::do_nothing, sc);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21);\ + }\ + NAME##_cus_field_list field_list(const char *d,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + std::vector *i) const {\ + return field_list(d, mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return field_list(d, mysqlpp::do_nothing, sc);\ + }\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + std::vector *i) const;\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus equal */\ + NAME##_cus_equal_list equal_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21);\ + }\ + NAME##_cus_equal_list equal_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21);\ + }\ + NAME##_cus_equal_list equal_list(std::vector *i) const {\ + return equal_list(",", " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(mysqlpp::sql_cmp_type sc) const {\ + return equal_list(",", " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + std::vector *i) const {\ + return equal_list(d, " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + std::vector *i) const {\ + return equal_list(d, c, mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, c, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + private:\ + static const char* table_;\ + const char* table_override_;\ + }; \ + MYSQLPP_SSQLS_CONDITIONAL_STATICS(\ + const char *NAME::names[] = { \ + N1 ,\ + N2 ,\ + N3 ,\ + N4 ,\ + N5 ,\ + N6 ,\ + N7 ,\ + N8 ,\ + N9 ,\ + N10 ,\ + N11 ,\ + N12 ,\ + N13 ,\ + N14 ,\ + N15 ,\ + N16 ,\ + N17 ,\ + N18 ,\ + N19 ,\ + N20 ,\ + N21 \ + }; \ + const char* NAME::table_ = #NAME;\ + )\ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21) \ + { \ + delim = d;\ + manip = m;\ + del_vector = true;\ + obj = o; \ + include = new std::vector(21, false);\ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + if (i13) (*include)[12]=true;\ + if (i14) (*include)[13]=true;\ + if (i15) (*include)[14]=true;\ + if (i16) (*include)[15]=true;\ + if (i17) (*include)[16]=true;\ + if (i18) (*include)[17]=true;\ + if (i19) (*include)[18]=true;\ + if (i20) (*include)[19]=true;\ + if (i21) (*include)[20]=true;\ + } \ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(21, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + if (i13 == NAME##_NULL) return;\ + (*include)[i13]=true;\ + if (i14 == NAME##_NULL) return;\ + (*include)[i14]=true;\ + if (i15 == NAME##_NULL) return;\ + (*include)[i15]=true;\ + if (i16 == NAME##_NULL) return;\ + (*include)[i16]=true;\ + if (i17 == NAME##_NULL) return;\ + (*include)[i17]=true;\ + if (i18 == NAME##_NULL) return;\ + (*include)[i18]=true;\ + if (i19 == NAME##_NULL) return;\ + (*include)[i19]=true;\ + if (i20 == NAME##_NULL) return;\ + (*include)[i20]=true;\ + if (i21 == NAME##_NULL) return;\ + (*include)[i21]=true;\ + }\ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21) {\ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(21, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + if (i13) (*include)[12]=true;\ + if (i14) (*include)[13]=true;\ + if (i15) (*include)[14]=true;\ + if (i16) (*include)[15]=true;\ + if (i17) (*include)[16]=true;\ + if (i18) (*include)[17]=true;\ + if (i19) (*include)[18]=true;\ + if (i20) (*include)[19]=true;\ + if (i21) (*include)[20]=true;\ + } \ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(21, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + if (i13 == NAME##_NULL) return;\ + (*include)[i13]=true;\ + if (i14 == NAME##_NULL) return;\ + (*include)[i14]=true;\ + if (i15 == NAME##_NULL) return;\ + (*include)[i15]=true;\ + if (i16 == NAME##_NULL) return;\ + (*include)[i16]=true;\ + if (i17 == NAME##_NULL) return;\ + (*include)[i17]=true;\ + if (i18 == NAME##_NULL) return;\ + (*include)[i18]=true;\ + if (i19 == NAME##_NULL) return;\ + (*include)[i19]=true;\ + if (i20 == NAME##_NULL) return;\ + (*include)[i20]=true;\ + if (i21 == NAME##_NULL) return;\ + (*include)[i21]=true;\ + }\ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(21, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + if (i13) (*include)[12]=true;\ + if (i14) (*include)[13]=true;\ + if (i15) (*include)[14]=true;\ + if (i16) (*include)[15]=true;\ + if (i17) (*include)[16]=true;\ + if (i18) (*include)[17]=true;\ + if (i19) (*include)[18]=true;\ + if (i20) (*include)[19]=true;\ + if (i21) (*include)[20]=true;\ + } \ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(21, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + if (i13 == NAME##_NULL) return;\ + (*include)[i13]=true;\ + if (i14 == NAME##_NULL) return;\ + (*include)[i14]=true;\ + if (i15 == NAME##_NULL) return;\ + (*include)[i15]=true;\ + if (i16 == NAME##_NULL) return;\ + (*include)[i16]=true;\ + if (i17 == NAME##_NULL) return;\ + (*include)[i17]=true;\ + if (i18 == NAME##_NULL) return;\ + (*include)[i18]=true;\ + if (i19 == NAME##_NULL) return;\ + (*include)[i19]=true;\ + if (i20 == NAME##_NULL) return;\ + (*include)[i20]=true;\ + if (i21 == NAME##_NULL) return;\ + (*include)[i21]=true;\ + }\ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_value_list& obj) { \ + s << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.manip << obj.obj->I6 << obj.delim;\ + s << obj.manip << obj.obj->I7 << obj.delim;\ + s << obj.manip << obj.obj->I8 << obj.delim;\ + s << obj.manip << obj.obj->I9 << obj.delim;\ + s << obj.manip << obj.obj->I10 << obj.delim;\ + s << obj.manip << obj.obj->I11 << obj.delim;\ + s << obj.manip << obj.obj->I12 << obj.delim;\ + s << obj.manip << obj.obj->I13 << obj.delim;\ + s << obj.manip << obj.obj->I14 << obj.delim;\ + s << obj.manip << obj.obj->I15 << obj.delim;\ + s << obj.manip << obj.obj->I16 << obj.delim;\ + s << obj.manip << obj.obj->I17 << obj.delim;\ + s << obj.manip << obj.obj->I18 << obj.delim;\ + s << obj.manip << obj.obj->I19 << obj.delim;\ + s << obj.manip << obj.obj->I20 << obj.delim;\ + s << obj.manip << obj.obj->I21; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_field_list& obj) { \ + s << obj.manip << obj.obj->names[0] << obj.delim;\ + s << obj.manip << obj.obj->names[1] << obj.delim;\ + s << obj.manip << obj.obj->names[2] << obj.delim;\ + s << obj.manip << obj.obj->names[3] << obj.delim;\ + s << obj.manip << obj.obj->names[4] << obj.delim;\ + s << obj.manip << obj.obj->names[5] << obj.delim;\ + s << obj.manip << obj.obj->names[6] << obj.delim;\ + s << obj.manip << obj.obj->names[7] << obj.delim;\ + s << obj.manip << obj.obj->names[8] << obj.delim;\ + s << obj.manip << obj.obj->names[9] << obj.delim;\ + s << obj.manip << obj.obj->names[10] << obj.delim;\ + s << obj.manip << obj.obj->names[11] << obj.delim;\ + s << obj.manip << obj.obj->names[12] << obj.delim;\ + s << obj.manip << obj.obj->names[13] << obj.delim;\ + s << obj.manip << obj.obj->names[14] << obj.delim;\ + s << obj.manip << obj.obj->names[15] << obj.delim;\ + s << obj.manip << obj.obj->names[16] << obj.delim;\ + s << obj.manip << obj.obj->names[17] << obj.delim;\ + s << obj.manip << obj.obj->names[18] << obj.delim;\ + s << obj.manip << obj.obj->names[19] << obj.delim;\ + s << obj.manip << obj.obj->names[20]; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_equal_list& obj) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6 << obj.delim;\ + s << obj.obj->names[6] << obj.comp << obj.manip << obj.obj->I7 << obj.delim;\ + s << obj.obj->names[7] << obj.comp << obj.manip << obj.obj->I8 << obj.delim;\ + s << obj.obj->names[8] << obj.comp << obj.manip << obj.obj->I9 << obj.delim;\ + s << obj.obj->names[9] << obj.comp << obj.manip << obj.obj->I10 << obj.delim;\ + s << obj.obj->names[10] << obj.comp << obj.manip << obj.obj->I11 << obj.delim;\ + s << obj.obj->names[11] << obj.comp << obj.manip << obj.obj->I12 << obj.delim;\ + s << obj.obj->names[12] << obj.comp << obj.manip << obj.obj->I13 << obj.delim;\ + s << obj.obj->names[13] << obj.comp << obj.manip << obj.obj->I14 << obj.delim;\ + s << obj.obj->names[14] << obj.comp << obj.manip << obj.obj->I15 << obj.delim;\ + s << obj.obj->names[15] << obj.comp << obj.manip << obj.obj->I16 << obj.delim;\ + s << obj.obj->names[16] << obj.comp << obj.manip << obj.obj->I17 << obj.delim;\ + s << obj.obj->names[17] << obj.comp << obj.manip << obj.obj->I18 << obj.delim;\ + s << obj.obj->names[18] << obj.comp << obj.manip << obj.obj->I19 << obj.delim;\ + s << obj.obj->names[19] << obj.comp << obj.manip << obj.obj->I20 << obj.delim;\ + s << obj.obj->names[20] << obj.comp << obj.manip << obj.obj->I21; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_value_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I6;\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I7;\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I8;\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I9;\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I10;\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I11;\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I12;\ + before = true; \ + } \ + if ((*obj.include)[12]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I13;\ + before = true; \ + } \ + if ((*obj.include)[13]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I14;\ + before = true; \ + } \ + if ((*obj.include)[14]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I15;\ + before = true; \ + } \ + if ((*obj.include)[15]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I16;\ + before = true; \ + } \ + if ((*obj.include)[16]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I17;\ + before = true; \ + } \ + if ((*obj.include)[17]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I18;\ + before = true; \ + } \ + if ((*obj.include)[18]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I19;\ + before = true; \ + } \ + if ((*obj.include)[19]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I20;\ + before = true; \ + } \ + if ((*obj.include)[20]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I21;\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_field_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->names[0];\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[1];\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[2];\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[3];\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[4];\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[5];\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[6];\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[7];\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[8];\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[9];\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[10];\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[11];\ + before = true; \ + } \ + if ((*obj.include)[12]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[12];\ + before = true; \ + } \ + if ((*obj.include)[13]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[13];\ + before = true; \ + } \ + if ((*obj.include)[14]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[14];\ + before = true; \ + } \ + if ((*obj.include)[15]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[15];\ + before = true; \ + } \ + if ((*obj.include)[16]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[16];\ + before = true; \ + } \ + if ((*obj.include)[17]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[17];\ + before = true; \ + } \ + if ((*obj.include)[18]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[18];\ + before = true; \ + } \ + if ((*obj.include)[19]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[19];\ + before = true; \ + } \ + if ((*obj.include)[20]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[20];\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_equal_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6;\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[6] << obj.comp << obj.manip << obj.obj->I7;\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[7] << obj.comp << obj.manip << obj.obj->I8;\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[8] << obj.comp << obj.manip << obj.obj->I9;\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[9] << obj.comp << obj.manip << obj.obj->I10;\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[10] << obj.comp << obj.manip << obj.obj->I11;\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[11] << obj.comp << obj.manip << obj.obj->I12;\ + before = true; \ + } \ + if ((*obj.include)[12]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[12] << obj.comp << obj.manip << obj.obj->I13;\ + before = true; \ + } \ + if ((*obj.include)[13]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[13] << obj.comp << obj.manip << obj.obj->I14;\ + before = true; \ + } \ + if ((*obj.include)[14]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[14] << obj.comp << obj.manip << obj.obj->I15;\ + before = true; \ + } \ + if ((*obj.include)[15]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[15] << obj.comp << obj.manip << obj.obj->I16;\ + before = true; \ + } \ + if ((*obj.include)[16]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[16] << obj.comp << obj.manip << obj.obj->I17;\ + before = true; \ + } \ + if ((*obj.include)[17]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[17] << obj.comp << obj.manip << obj.obj->I18;\ + before = true; \ + } \ + if ((*obj.include)[18]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[18] << obj.comp << obj.manip << obj.obj->I19;\ + before = true; \ + } \ + if ((*obj.include)[19]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[19] << obj.comp << obj.manip << obj.obj->I20;\ + before = true; \ + } \ + if ((*obj.include)[20]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[20] << obj.comp << obj.manip << obj.obj->I21;\ + } \ + return s; \ + } \ + template \ + inline NAME##_value_list NAME::value_list(const char *d, Manip m) const { \ + return NAME##_value_list (this, d, m); \ + } \ + template \ + inline NAME##_field_list NAME::field_list(const char *d, Manip m) const { \ + return NAME##_field_list (this, d, m); \ + } \ + template \ + inline NAME##_equal_list NAME::equal_list(const char *d, const char *c, Manip m) const { \ + return NAME##_equal_list (this, d, c, m); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21) const {\ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21) const { \ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21) const { \ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21) const {\ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_value_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_field_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_equal_list (this, d, c, m, i);\ + }\ + template \ + inline NAME##_cus_value_list \ + NAME::value_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, value, NUM);\ + }\ + template \ + inline NAME##_cus_field_list \ + NAME::field_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, field, NUM);\ + }\ + template \ + inline NAME##_cus_equal_list \ + NAME::equal_list(const char *d, const char *c, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_defe_##CMP(NAME, equal, NUM);\ + }\ + template \ + void populate_##NAME(NAME *s, const mysqlpp::Row &row) { \ + mysqlpp::NoExceptions ignore_schema_mismatches(row);\ + s->I1 = row[N1].conv(T1());\ + s->I2 = row[N2].conv(T2());\ + s->I3 = row[N3].conv(T3());\ + s->I4 = row[N4].conv(T4());\ + s->I5 = row[N5].conv(T5());\ + s->I6 = row[N6].conv(T6());\ + s->I7 = row[N7].conv(T7());\ + s->I8 = row[N8].conv(T8());\ + s->I9 = row[N9].conv(T9());\ + s->I10 = row[N10].conv(T10());\ + s->I11 = row[N11].conv(T11());\ + s->I12 = row[N12].conv(T12());\ + s->I13 = row[N13].conv(T13());\ + s->I14 = row[N14].conv(T14());\ + s->I15 = row[N15].conv(T15());\ + s->I16 = row[N16].conv(T16());\ + s->I17 = row[N17].conv(T17());\ + s->I18 = row[N18].conv(T18());\ + s->I19 = row[N19].conv(T19());\ + s->I20 = row[N20].conv(T20());\ + s->I21 = row[N21].conv(T21());\ + } \ + inline NAME::NAME(const mysqlpp::Row& row) :\ + table_override_(0)\ + {\ + populate_##NAME(this, row);\ + }\ + inline void NAME::set(const mysqlpp::Row& row)\ + {\ + populate_##NAME(this, row);\ + }\ + sql_COMPARE__##CMP(NAME, I1, I2, I3, I4, I5, I6, I7, I8, I9, I10, I11, I12, I13, I14, I15, I16, I17, I18, I19, I20, I21, 0, 0, 0, 0 ) + +#define sql_create_21(NAME, CMP, CONTR, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, T13, I13, T14, I14, T15, I15, T16, I16, T17, I17, T18, I18, T19, I19, T20, I20, T21, I21) \ + sql_create_complete_21(NAME, CMP, CONTR, T1, I1, #I1, T2, I2, #I2, T3, I3, #I3, T4, I4, #I4, T5, I5, #I5, T6, I6, #I6, T7, I7, #I7, T8, I8, #I8, T9, I9, #I9, T10, I10, #I10, T11, I11, #I11, T12, I12, #I12, T13, I13, #I13, T14, I14, #I14, T15, I15, #I15, T16, I16, #I16, T17, I17, #I17, T18, I18, #I18, T19, I19, #I19, T20, I20, #I20, T21, I21, #I21) \ + +// --------------------------------------------------- +// End Create 21 +// --------------------------------------------------- + +// --------------------------------------------------- +// Begin Create 22 +// --------------------------------------------------- +#define sql_create_complete_22(NAME, CMP, CONTR, T1, I1, N1, T2, I2, N2, T3, I3, N3, T4, I4, N4, T5, I5, N5, T6, I6, N6, T7, I7, N7, T8, I8, N8, T9, I9, N9, T10, I10, N10, T11, I11, N11, T12, I12, N12, T13, I13, N13, T14, I14, N14, T15, I15, N15, T16, I16, N16, T17, I17, N17, T18, I18, N18, T19, I19, N19, T20, I20, N20, T21, I21, N21, T22, I22, N22) \ + struct NAME; \ + enum NAME##_enum { \ + NAME##_##I1,\ + NAME##_##I2,\ + NAME##_##I3,\ + NAME##_##I4,\ + NAME##_##I5,\ + NAME##_##I6,\ + NAME##_##I7,\ + NAME##_##I8,\ + NAME##_##I9,\ + NAME##_##I10,\ + NAME##_##I11,\ + NAME##_##I12,\ + NAME##_##I13,\ + NAME##_##I14,\ + NAME##_##I15,\ + NAME##_##I16,\ + NAME##_##I17,\ + NAME##_##I18,\ + NAME##_##I19,\ + NAME##_##I20,\ + NAME##_##I21,\ + NAME##_##I22 \ + ,NAME##_NULL \ + }; \ + template \ + class NAME##_value_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_value_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_##field_list {\ + public: \ + const NAME *obj; \ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_field_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_equal_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public: \ + NAME##_equal_list (const NAME *o, const char *d, const char *c, Manip m) \ + : obj(o), delim(d), comp(c), manip(m) {}\ + };\ + template \ + class NAME##_cus_value_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_value_list () {if (del_vector) delete include;} \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21, bool i22);\ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21, NAME##_enum i22); \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m ,std::vector* i)\ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_field_list { \ + public:\ + const NAME *obj; \ + std::vector *include; \ + bool del_vector; \ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_field_list () {if (del_vector) delete include;} \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21, bool i22); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21, NAME##_enum i22); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_equal_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public:\ + ~NAME##_##cus_equal_list () {if (del_vector) delete include;}\ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21, bool i22); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21, NAME##_enum i22); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), comp(c), manip(m) {}\ + };\ + template int sql_compare_##NAME(const NAME&, const NAME&);\ + struct NAME { \ + T1 I1;\ + T2 I2;\ + T3 I3;\ + T4 I4;\ + T5 I5;\ + T6 I6;\ + T7 I7;\ + T8 I8;\ + T9 I9;\ + T10 I10;\ + T11 I11;\ + T12 I12;\ + T13 I13;\ + T14 I14;\ + T15 I15;\ + T16 I16;\ + T17 I17;\ + T18 I18;\ + T19 I19;\ + T20 I20;\ + T21 I21;\ + T22 I22; \ + NAME() : table_override_(0) {} \ + NAME(const mysqlpp::Row& row);\ + void set(const mysqlpp::Row &row);\ + sql_compare_define_##CMP(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, T13, I13, T14, I14, T15, I15, T16, I16, T17, I17, T18, I18, T19, I19, T20, I20, T21, I21, T22, I22, 0, 0, 0, 0, 0, 0)\ + sql_construct_define_##CONTR(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, T13, I13, T14, I14, T15, I15, T16, I16, T17, I17, T18, I18, T19, I19, T20, I20, T21, I21, T22, I22, 0, 0, 0, 0, 0, 0)\ + static const char* names[];\ + static void table(const char* t) { table_ = t; }\ + const char* const table() const\ + { return table_override_ ? table_override_ : NAME::table_; }\ + void instance_table(const char* t) { table_override_ = t; }\ + NAME##_value_list value_list() const {\ + return value_list(",", mysqlpp::quote);}\ + NAME##_value_list value_list(const char *d) const {\ + return value_list(d, mysqlpp::quote);}\ + template \ + NAME##_value_list value_list(const char *d, Manip m) const; \ + NAME##_field_list field_list() const {\ + return field_list(",", mysqlpp::do_nothing);}\ + NAME##_field_list field_list(const char *d) const {\ + return field_list(d, mysqlpp::do_nothing);}\ + template \ + NAME##_field_list field_list(const char *d, Manip m) const; \ + NAME##_equal_list equal_list(const char *d = ",", \ + const char *c = " = ") const{\ + return equal_list(d, c, mysqlpp::quote);}\ + template \ + NAME##_equal_list equal_list(const char *d, const char *c, Manip m) const; \ + /* cus_data */\ + NAME##_cus_value_list value_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22);\ + }\ + NAME##_cus_value_list value_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22);\ + }\ + NAME##_cus_value_list value_list(std::vector *i) const {\ + return value_list(",", mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(mysqlpp::sql_cmp_type sc) const {\ + return value_list(",", mysqlpp::quote, sc);\ + }\ + NAME##_cus_value_list value_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22);\ + }\ + NAME##_cus_value_list value_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + std::vector *i) const {\ + return value_list(d, mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return value_list(d, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus field */\ + NAME##_cus_field_list field_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22);\ + }\ + NAME##_cus_field_list field_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22);\ + }\ + NAME##_cus_field_list field_list(std::vector *i) const {\ + return field_list(",", mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(mysqlpp::sql_cmp_type sc) const\ + {\ + return field_list(",", mysqlpp::do_nothing, sc);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22);\ + }\ + NAME##_cus_field_list field_list(const char *d,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + std::vector *i) const {\ + return field_list(d, mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return field_list(d, mysqlpp::do_nothing, sc);\ + }\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + std::vector *i) const;\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus equal */\ + NAME##_cus_equal_list equal_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22);\ + }\ + NAME##_cus_equal_list equal_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22);\ + }\ + NAME##_cus_equal_list equal_list(std::vector *i) const {\ + return equal_list(",", " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(mysqlpp::sql_cmp_type sc) const {\ + return equal_list(",", " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + std::vector *i) const {\ + return equal_list(d, " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + std::vector *i) const {\ + return equal_list(d, c, mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, c, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + private:\ + static const char* table_;\ + const char* table_override_;\ + }; \ + MYSQLPP_SSQLS_CONDITIONAL_STATICS(\ + const char *NAME::names[] = { \ + N1 ,\ + N2 ,\ + N3 ,\ + N4 ,\ + N5 ,\ + N6 ,\ + N7 ,\ + N8 ,\ + N9 ,\ + N10 ,\ + N11 ,\ + N12 ,\ + N13 ,\ + N14 ,\ + N15 ,\ + N16 ,\ + N17 ,\ + N18 ,\ + N19 ,\ + N20 ,\ + N21 ,\ + N22 \ + }; \ + const char* NAME::table_ = #NAME;\ + )\ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21, bool i22) \ + { \ + delim = d;\ + manip = m;\ + del_vector = true;\ + obj = o; \ + include = new std::vector(22, false);\ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + if (i13) (*include)[12]=true;\ + if (i14) (*include)[13]=true;\ + if (i15) (*include)[14]=true;\ + if (i16) (*include)[15]=true;\ + if (i17) (*include)[16]=true;\ + if (i18) (*include)[17]=true;\ + if (i19) (*include)[18]=true;\ + if (i20) (*include)[19]=true;\ + if (i21) (*include)[20]=true;\ + if (i22) (*include)[21]=true;\ + } \ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21, NAME##_enum i22) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(22, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + if (i13 == NAME##_NULL) return;\ + (*include)[i13]=true;\ + if (i14 == NAME##_NULL) return;\ + (*include)[i14]=true;\ + if (i15 == NAME##_NULL) return;\ + (*include)[i15]=true;\ + if (i16 == NAME##_NULL) return;\ + (*include)[i16]=true;\ + if (i17 == NAME##_NULL) return;\ + (*include)[i17]=true;\ + if (i18 == NAME##_NULL) return;\ + (*include)[i18]=true;\ + if (i19 == NAME##_NULL) return;\ + (*include)[i19]=true;\ + if (i20 == NAME##_NULL) return;\ + (*include)[i20]=true;\ + if (i21 == NAME##_NULL) return;\ + (*include)[i21]=true;\ + if (i22 == NAME##_NULL) return;\ + (*include)[i22]=true;\ + }\ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21, bool i22) {\ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(22, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + if (i13) (*include)[12]=true;\ + if (i14) (*include)[13]=true;\ + if (i15) (*include)[14]=true;\ + if (i16) (*include)[15]=true;\ + if (i17) (*include)[16]=true;\ + if (i18) (*include)[17]=true;\ + if (i19) (*include)[18]=true;\ + if (i20) (*include)[19]=true;\ + if (i21) (*include)[20]=true;\ + if (i22) (*include)[21]=true;\ + } \ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21, NAME##_enum i22) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(22, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + if (i13 == NAME##_NULL) return;\ + (*include)[i13]=true;\ + if (i14 == NAME##_NULL) return;\ + (*include)[i14]=true;\ + if (i15 == NAME##_NULL) return;\ + (*include)[i15]=true;\ + if (i16 == NAME##_NULL) return;\ + (*include)[i16]=true;\ + if (i17 == NAME##_NULL) return;\ + (*include)[i17]=true;\ + if (i18 == NAME##_NULL) return;\ + (*include)[i18]=true;\ + if (i19 == NAME##_NULL) return;\ + (*include)[i19]=true;\ + if (i20 == NAME##_NULL) return;\ + (*include)[i20]=true;\ + if (i21 == NAME##_NULL) return;\ + (*include)[i21]=true;\ + if (i22 == NAME##_NULL) return;\ + (*include)[i22]=true;\ + }\ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21, bool i22) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(22, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + if (i13) (*include)[12]=true;\ + if (i14) (*include)[13]=true;\ + if (i15) (*include)[14]=true;\ + if (i16) (*include)[15]=true;\ + if (i17) (*include)[16]=true;\ + if (i18) (*include)[17]=true;\ + if (i19) (*include)[18]=true;\ + if (i20) (*include)[19]=true;\ + if (i21) (*include)[20]=true;\ + if (i22) (*include)[21]=true;\ + } \ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21, NAME##_enum i22) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(22, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + if (i13 == NAME##_NULL) return;\ + (*include)[i13]=true;\ + if (i14 == NAME##_NULL) return;\ + (*include)[i14]=true;\ + if (i15 == NAME##_NULL) return;\ + (*include)[i15]=true;\ + if (i16 == NAME##_NULL) return;\ + (*include)[i16]=true;\ + if (i17 == NAME##_NULL) return;\ + (*include)[i17]=true;\ + if (i18 == NAME##_NULL) return;\ + (*include)[i18]=true;\ + if (i19 == NAME##_NULL) return;\ + (*include)[i19]=true;\ + if (i20 == NAME##_NULL) return;\ + (*include)[i20]=true;\ + if (i21 == NAME##_NULL) return;\ + (*include)[i21]=true;\ + if (i22 == NAME##_NULL) return;\ + (*include)[i22]=true;\ + }\ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_value_list& obj) { \ + s << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.manip << obj.obj->I6 << obj.delim;\ + s << obj.manip << obj.obj->I7 << obj.delim;\ + s << obj.manip << obj.obj->I8 << obj.delim;\ + s << obj.manip << obj.obj->I9 << obj.delim;\ + s << obj.manip << obj.obj->I10 << obj.delim;\ + s << obj.manip << obj.obj->I11 << obj.delim;\ + s << obj.manip << obj.obj->I12 << obj.delim;\ + s << obj.manip << obj.obj->I13 << obj.delim;\ + s << obj.manip << obj.obj->I14 << obj.delim;\ + s << obj.manip << obj.obj->I15 << obj.delim;\ + s << obj.manip << obj.obj->I16 << obj.delim;\ + s << obj.manip << obj.obj->I17 << obj.delim;\ + s << obj.manip << obj.obj->I18 << obj.delim;\ + s << obj.manip << obj.obj->I19 << obj.delim;\ + s << obj.manip << obj.obj->I20 << obj.delim;\ + s << obj.manip << obj.obj->I21 << obj.delim;\ + s << obj.manip << obj.obj->I22; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_field_list& obj) { \ + s << obj.manip << obj.obj->names[0] << obj.delim;\ + s << obj.manip << obj.obj->names[1] << obj.delim;\ + s << obj.manip << obj.obj->names[2] << obj.delim;\ + s << obj.manip << obj.obj->names[3] << obj.delim;\ + s << obj.manip << obj.obj->names[4] << obj.delim;\ + s << obj.manip << obj.obj->names[5] << obj.delim;\ + s << obj.manip << obj.obj->names[6] << obj.delim;\ + s << obj.manip << obj.obj->names[7] << obj.delim;\ + s << obj.manip << obj.obj->names[8] << obj.delim;\ + s << obj.manip << obj.obj->names[9] << obj.delim;\ + s << obj.manip << obj.obj->names[10] << obj.delim;\ + s << obj.manip << obj.obj->names[11] << obj.delim;\ + s << obj.manip << obj.obj->names[12] << obj.delim;\ + s << obj.manip << obj.obj->names[13] << obj.delim;\ + s << obj.manip << obj.obj->names[14] << obj.delim;\ + s << obj.manip << obj.obj->names[15] << obj.delim;\ + s << obj.manip << obj.obj->names[16] << obj.delim;\ + s << obj.manip << obj.obj->names[17] << obj.delim;\ + s << obj.manip << obj.obj->names[18] << obj.delim;\ + s << obj.manip << obj.obj->names[19] << obj.delim;\ + s << obj.manip << obj.obj->names[20] << obj.delim;\ + s << obj.manip << obj.obj->names[21]; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_equal_list& obj) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6 << obj.delim;\ + s << obj.obj->names[6] << obj.comp << obj.manip << obj.obj->I7 << obj.delim;\ + s << obj.obj->names[7] << obj.comp << obj.manip << obj.obj->I8 << obj.delim;\ + s << obj.obj->names[8] << obj.comp << obj.manip << obj.obj->I9 << obj.delim;\ + s << obj.obj->names[9] << obj.comp << obj.manip << obj.obj->I10 << obj.delim;\ + s << obj.obj->names[10] << obj.comp << obj.manip << obj.obj->I11 << obj.delim;\ + s << obj.obj->names[11] << obj.comp << obj.manip << obj.obj->I12 << obj.delim;\ + s << obj.obj->names[12] << obj.comp << obj.manip << obj.obj->I13 << obj.delim;\ + s << obj.obj->names[13] << obj.comp << obj.manip << obj.obj->I14 << obj.delim;\ + s << obj.obj->names[14] << obj.comp << obj.manip << obj.obj->I15 << obj.delim;\ + s << obj.obj->names[15] << obj.comp << obj.manip << obj.obj->I16 << obj.delim;\ + s << obj.obj->names[16] << obj.comp << obj.manip << obj.obj->I17 << obj.delim;\ + s << obj.obj->names[17] << obj.comp << obj.manip << obj.obj->I18 << obj.delim;\ + s << obj.obj->names[18] << obj.comp << obj.manip << obj.obj->I19 << obj.delim;\ + s << obj.obj->names[19] << obj.comp << obj.manip << obj.obj->I20 << obj.delim;\ + s << obj.obj->names[20] << obj.comp << obj.manip << obj.obj->I21 << obj.delim;\ + s << obj.obj->names[21] << obj.comp << obj.manip << obj.obj->I22; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_value_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I6;\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I7;\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I8;\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I9;\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I10;\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I11;\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I12;\ + before = true; \ + } \ + if ((*obj.include)[12]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I13;\ + before = true; \ + } \ + if ((*obj.include)[13]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I14;\ + before = true; \ + } \ + if ((*obj.include)[14]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I15;\ + before = true; \ + } \ + if ((*obj.include)[15]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I16;\ + before = true; \ + } \ + if ((*obj.include)[16]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I17;\ + before = true; \ + } \ + if ((*obj.include)[17]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I18;\ + before = true; \ + } \ + if ((*obj.include)[18]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I19;\ + before = true; \ + } \ + if ((*obj.include)[19]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I20;\ + before = true; \ + } \ + if ((*obj.include)[20]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I21;\ + before = true; \ + } \ + if ((*obj.include)[21]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I22;\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_field_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->names[0];\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[1];\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[2];\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[3];\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[4];\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[5];\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[6];\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[7];\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[8];\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[9];\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[10];\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[11];\ + before = true; \ + } \ + if ((*obj.include)[12]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[12];\ + before = true; \ + } \ + if ((*obj.include)[13]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[13];\ + before = true; \ + } \ + if ((*obj.include)[14]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[14];\ + before = true; \ + } \ + if ((*obj.include)[15]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[15];\ + before = true; \ + } \ + if ((*obj.include)[16]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[16];\ + before = true; \ + } \ + if ((*obj.include)[17]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[17];\ + before = true; \ + } \ + if ((*obj.include)[18]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[18];\ + before = true; \ + } \ + if ((*obj.include)[19]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[19];\ + before = true; \ + } \ + if ((*obj.include)[20]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[20];\ + before = true; \ + } \ + if ((*obj.include)[21]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[21];\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_equal_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6;\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[6] << obj.comp << obj.manip << obj.obj->I7;\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[7] << obj.comp << obj.manip << obj.obj->I8;\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[8] << obj.comp << obj.manip << obj.obj->I9;\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[9] << obj.comp << obj.manip << obj.obj->I10;\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[10] << obj.comp << obj.manip << obj.obj->I11;\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[11] << obj.comp << obj.manip << obj.obj->I12;\ + before = true; \ + } \ + if ((*obj.include)[12]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[12] << obj.comp << obj.manip << obj.obj->I13;\ + before = true; \ + } \ + if ((*obj.include)[13]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[13] << obj.comp << obj.manip << obj.obj->I14;\ + before = true; \ + } \ + if ((*obj.include)[14]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[14] << obj.comp << obj.manip << obj.obj->I15;\ + before = true; \ + } \ + if ((*obj.include)[15]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[15] << obj.comp << obj.manip << obj.obj->I16;\ + before = true; \ + } \ + if ((*obj.include)[16]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[16] << obj.comp << obj.manip << obj.obj->I17;\ + before = true; \ + } \ + if ((*obj.include)[17]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[17] << obj.comp << obj.manip << obj.obj->I18;\ + before = true; \ + } \ + if ((*obj.include)[18]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[18] << obj.comp << obj.manip << obj.obj->I19;\ + before = true; \ + } \ + if ((*obj.include)[19]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[19] << obj.comp << obj.manip << obj.obj->I20;\ + before = true; \ + } \ + if ((*obj.include)[20]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[20] << obj.comp << obj.manip << obj.obj->I21;\ + before = true; \ + } \ + if ((*obj.include)[21]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[21] << obj.comp << obj.manip << obj.obj->I22;\ + } \ + return s; \ + } \ + template \ + inline NAME##_value_list NAME::value_list(const char *d, Manip m) const { \ + return NAME##_value_list (this, d, m); \ + } \ + template \ + inline NAME##_field_list NAME::field_list(const char *d, Manip m) const { \ + return NAME##_field_list (this, d, m); \ + } \ + template \ + inline NAME##_equal_list NAME::equal_list(const char *d, const char *c, Manip m) const { \ + return NAME##_equal_list (this, d, c, m); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21, bool i22) const {\ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21, bool i22) const { \ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21, bool i22) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21, NAME##_enum i22) const { \ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21, NAME##_enum i22) const {\ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21, NAME##_enum i22) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_value_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_field_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_equal_list (this, d, c, m, i);\ + }\ + template \ + inline NAME##_cus_value_list \ + NAME::value_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, value, NUM);\ + }\ + template \ + inline NAME##_cus_field_list \ + NAME::field_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, field, NUM);\ + }\ + template \ + inline NAME##_cus_equal_list \ + NAME::equal_list(const char *d, const char *c, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_defe_##CMP(NAME, equal, NUM);\ + }\ + template \ + void populate_##NAME(NAME *s, const mysqlpp::Row &row) { \ + mysqlpp::NoExceptions ignore_schema_mismatches(row);\ + s->I1 = row[N1].conv(T1());\ + s->I2 = row[N2].conv(T2());\ + s->I3 = row[N3].conv(T3());\ + s->I4 = row[N4].conv(T4());\ + s->I5 = row[N5].conv(T5());\ + s->I6 = row[N6].conv(T6());\ + s->I7 = row[N7].conv(T7());\ + s->I8 = row[N8].conv(T8());\ + s->I9 = row[N9].conv(T9());\ + s->I10 = row[N10].conv(T10());\ + s->I11 = row[N11].conv(T11());\ + s->I12 = row[N12].conv(T12());\ + s->I13 = row[N13].conv(T13());\ + s->I14 = row[N14].conv(T14());\ + s->I15 = row[N15].conv(T15());\ + s->I16 = row[N16].conv(T16());\ + s->I17 = row[N17].conv(T17());\ + s->I18 = row[N18].conv(T18());\ + s->I19 = row[N19].conv(T19());\ + s->I20 = row[N20].conv(T20());\ + s->I21 = row[N21].conv(T21());\ + s->I22 = row[N22].conv(T22());\ + } \ + inline NAME::NAME(const mysqlpp::Row& row) :\ + table_override_(0)\ + {\ + populate_##NAME(this, row);\ + }\ + inline void NAME::set(const mysqlpp::Row& row)\ + {\ + populate_##NAME(this, row);\ + }\ + sql_COMPARE__##CMP(NAME, I1, I2, I3, I4, I5, I6, I7, I8, I9, I10, I11, I12, I13, I14, I15, I16, I17, I18, I19, I20, I21, I22, 0, 0, 0 ) + +#define sql_create_22(NAME, CMP, CONTR, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, T13, I13, T14, I14, T15, I15, T16, I16, T17, I17, T18, I18, T19, I19, T20, I20, T21, I21, T22, I22) \ + sql_create_complete_22(NAME, CMP, CONTR, T1, I1, #I1, T2, I2, #I2, T3, I3, #I3, T4, I4, #I4, T5, I5, #I5, T6, I6, #I6, T7, I7, #I7, T8, I8, #I8, T9, I9, #I9, T10, I10, #I10, T11, I11, #I11, T12, I12, #I12, T13, I13, #I13, T14, I14, #I14, T15, I15, #I15, T16, I16, #I16, T17, I17, #I17, T18, I18, #I18, T19, I19, #I19, T20, I20, #I20, T21, I21, #I21, T22, I22, #I22) \ + +// --------------------------------------------------- +// End Create 22 +// --------------------------------------------------- + +// --------------------------------------------------- +// Begin Create 23 +// --------------------------------------------------- +#define sql_create_complete_23(NAME, CMP, CONTR, T1, I1, N1, T2, I2, N2, T3, I3, N3, T4, I4, N4, T5, I5, N5, T6, I6, N6, T7, I7, N7, T8, I8, N8, T9, I9, N9, T10, I10, N10, T11, I11, N11, T12, I12, N12, T13, I13, N13, T14, I14, N14, T15, I15, N15, T16, I16, N16, T17, I17, N17, T18, I18, N18, T19, I19, N19, T20, I20, N20, T21, I21, N21, T22, I22, N22, T23, I23, N23) \ + struct NAME; \ + enum NAME##_enum { \ + NAME##_##I1,\ + NAME##_##I2,\ + NAME##_##I3,\ + NAME##_##I4,\ + NAME##_##I5,\ + NAME##_##I6,\ + NAME##_##I7,\ + NAME##_##I8,\ + NAME##_##I9,\ + NAME##_##I10,\ + NAME##_##I11,\ + NAME##_##I12,\ + NAME##_##I13,\ + NAME##_##I14,\ + NAME##_##I15,\ + NAME##_##I16,\ + NAME##_##I17,\ + NAME##_##I18,\ + NAME##_##I19,\ + NAME##_##I20,\ + NAME##_##I21,\ + NAME##_##I22,\ + NAME##_##I23 \ + ,NAME##_NULL \ + }; \ + template \ + class NAME##_value_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_value_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_##field_list {\ + public: \ + const NAME *obj; \ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_field_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_equal_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public: \ + NAME##_equal_list (const NAME *o, const char *d, const char *c, Manip m) \ + : obj(o), delim(d), comp(c), manip(m) {}\ + };\ + template \ + class NAME##_cus_value_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_value_list () {if (del_vector) delete include;} \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21, bool i22, bool i23);\ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21, NAME##_enum i22, NAME##_enum i23); \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m ,std::vector* i)\ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_field_list { \ + public:\ + const NAME *obj; \ + std::vector *include; \ + bool del_vector; \ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_field_list () {if (del_vector) delete include;} \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21, bool i22, bool i23); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21, NAME##_enum i22, NAME##_enum i23); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_equal_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public:\ + ~NAME##_##cus_equal_list () {if (del_vector) delete include;}\ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21, bool i22, bool i23); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21, NAME##_enum i22, NAME##_enum i23); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), comp(c), manip(m) {}\ + };\ + template int sql_compare_##NAME(const NAME&, const NAME&);\ + struct NAME { \ + T1 I1;\ + T2 I2;\ + T3 I3;\ + T4 I4;\ + T5 I5;\ + T6 I6;\ + T7 I7;\ + T8 I8;\ + T9 I9;\ + T10 I10;\ + T11 I11;\ + T12 I12;\ + T13 I13;\ + T14 I14;\ + T15 I15;\ + T16 I16;\ + T17 I17;\ + T18 I18;\ + T19 I19;\ + T20 I20;\ + T21 I21;\ + T22 I22;\ + T23 I23; \ + NAME() : table_override_(0) {} \ + NAME(const mysqlpp::Row& row);\ + void set(const mysqlpp::Row &row);\ + sql_compare_define_##CMP(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, T13, I13, T14, I14, T15, I15, T16, I16, T17, I17, T18, I18, T19, I19, T20, I20, T21, I21, T22, I22, T23, I23, 0, 0, 0, 0)\ + sql_construct_define_##CONTR(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, T13, I13, T14, I14, T15, I15, T16, I16, T17, I17, T18, I18, T19, I19, T20, I20, T21, I21, T22, I22, T23, I23, 0, 0, 0, 0)\ + static const char* names[];\ + static void table(const char* t) { table_ = t; }\ + const char* const table() const\ + { return table_override_ ? table_override_ : NAME::table_; }\ + void instance_table(const char* t) { table_override_ = t; }\ + NAME##_value_list value_list() const {\ + return value_list(",", mysqlpp::quote);}\ + NAME##_value_list value_list(const char *d) const {\ + return value_list(d, mysqlpp::quote);}\ + template \ + NAME##_value_list value_list(const char *d, Manip m) const; \ + NAME##_field_list field_list() const {\ + return field_list(",", mysqlpp::do_nothing);}\ + NAME##_field_list field_list(const char *d) const {\ + return field_list(d, mysqlpp::do_nothing);}\ + template \ + NAME##_field_list field_list(const char *d, Manip m) const; \ + NAME##_equal_list equal_list(const char *d = ",", \ + const char *c = " = ") const{\ + return equal_list(d, c, mysqlpp::quote);}\ + template \ + NAME##_equal_list equal_list(const char *d, const char *c, Manip m) const; \ + /* cus_data */\ + NAME##_cus_value_list value_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false, bool i23 = false) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23);\ + }\ + NAME##_cus_value_list value_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL, NAME##_enum i23 = NAME##_NULL) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23);\ + }\ + NAME##_cus_value_list value_list(std::vector *i) const {\ + return value_list(",", mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(mysqlpp::sql_cmp_type sc) const {\ + return value_list(",", mysqlpp::quote, sc);\ + }\ + NAME##_cus_value_list value_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false, bool i23 = false) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23);\ + }\ + NAME##_cus_value_list value_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL, NAME##_enum i23 = NAME##_NULL) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + std::vector *i) const {\ + return value_list(d, mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return value_list(d, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false, bool i23 = false) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL, NAME##_enum i23 = NAME##_NULL) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus field */\ + NAME##_cus_field_list field_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false, bool i23 = false) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23);\ + }\ + NAME##_cus_field_list field_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL, NAME##_enum i23 = NAME##_NULL) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23);\ + }\ + NAME##_cus_field_list field_list(std::vector *i) const {\ + return field_list(",", mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(mysqlpp::sql_cmp_type sc) const\ + {\ + return field_list(",", mysqlpp::do_nothing, sc);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false, bool i23 = false) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23);\ + }\ + NAME##_cus_field_list field_list(const char *d,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL, NAME##_enum i23 = NAME##_NULL) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + std::vector *i) const {\ + return field_list(d, mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return field_list(d, mysqlpp::do_nothing, sc);\ + }\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false, bool i23 = false) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL, NAME##_enum i23 = NAME##_NULL) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + std::vector *i) const;\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus equal */\ + NAME##_cus_equal_list equal_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false, bool i23 = false) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23);\ + }\ + NAME##_cus_equal_list equal_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL, NAME##_enum i23 = NAME##_NULL) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23);\ + }\ + NAME##_cus_equal_list equal_list(std::vector *i) const {\ + return equal_list(",", " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(mysqlpp::sql_cmp_type sc) const {\ + return equal_list(",", " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false, bool i23 = false) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL, NAME##_enum i23 = NAME##_NULL) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + std::vector *i) const {\ + return equal_list(d, " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false, bool i23 = false) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL, NAME##_enum i23 = NAME##_NULL) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + std::vector *i) const {\ + return equal_list(d, c, mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, c, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false, bool i23 = false) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL, NAME##_enum i23 = NAME##_NULL) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + private:\ + static const char* table_;\ + const char* table_override_;\ + }; \ + MYSQLPP_SSQLS_CONDITIONAL_STATICS(\ + const char *NAME::names[] = { \ + N1 ,\ + N2 ,\ + N3 ,\ + N4 ,\ + N5 ,\ + N6 ,\ + N7 ,\ + N8 ,\ + N9 ,\ + N10 ,\ + N11 ,\ + N12 ,\ + N13 ,\ + N14 ,\ + N15 ,\ + N16 ,\ + N17 ,\ + N18 ,\ + N19 ,\ + N20 ,\ + N21 ,\ + N22 ,\ + N23 \ + }; \ + const char* NAME::table_ = #NAME;\ + )\ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21, bool i22, bool i23) \ + { \ + delim = d;\ + manip = m;\ + del_vector = true;\ + obj = o; \ + include = new std::vector(23, false);\ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + if (i13) (*include)[12]=true;\ + if (i14) (*include)[13]=true;\ + if (i15) (*include)[14]=true;\ + if (i16) (*include)[15]=true;\ + if (i17) (*include)[16]=true;\ + if (i18) (*include)[17]=true;\ + if (i19) (*include)[18]=true;\ + if (i20) (*include)[19]=true;\ + if (i21) (*include)[20]=true;\ + if (i22) (*include)[21]=true;\ + if (i23) (*include)[22]=true;\ + } \ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21, NAME##_enum i22, NAME##_enum i23) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(23, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + if (i13 == NAME##_NULL) return;\ + (*include)[i13]=true;\ + if (i14 == NAME##_NULL) return;\ + (*include)[i14]=true;\ + if (i15 == NAME##_NULL) return;\ + (*include)[i15]=true;\ + if (i16 == NAME##_NULL) return;\ + (*include)[i16]=true;\ + if (i17 == NAME##_NULL) return;\ + (*include)[i17]=true;\ + if (i18 == NAME##_NULL) return;\ + (*include)[i18]=true;\ + if (i19 == NAME##_NULL) return;\ + (*include)[i19]=true;\ + if (i20 == NAME##_NULL) return;\ + (*include)[i20]=true;\ + if (i21 == NAME##_NULL) return;\ + (*include)[i21]=true;\ + if (i22 == NAME##_NULL) return;\ + (*include)[i22]=true;\ + if (i23 == NAME##_NULL) return;\ + (*include)[i23]=true;\ + }\ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21, bool i22, bool i23) {\ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(23, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + if (i13) (*include)[12]=true;\ + if (i14) (*include)[13]=true;\ + if (i15) (*include)[14]=true;\ + if (i16) (*include)[15]=true;\ + if (i17) (*include)[16]=true;\ + if (i18) (*include)[17]=true;\ + if (i19) (*include)[18]=true;\ + if (i20) (*include)[19]=true;\ + if (i21) (*include)[20]=true;\ + if (i22) (*include)[21]=true;\ + if (i23) (*include)[22]=true;\ + } \ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21, NAME##_enum i22, NAME##_enum i23) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(23, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + if (i13 == NAME##_NULL) return;\ + (*include)[i13]=true;\ + if (i14 == NAME##_NULL) return;\ + (*include)[i14]=true;\ + if (i15 == NAME##_NULL) return;\ + (*include)[i15]=true;\ + if (i16 == NAME##_NULL) return;\ + (*include)[i16]=true;\ + if (i17 == NAME##_NULL) return;\ + (*include)[i17]=true;\ + if (i18 == NAME##_NULL) return;\ + (*include)[i18]=true;\ + if (i19 == NAME##_NULL) return;\ + (*include)[i19]=true;\ + if (i20 == NAME##_NULL) return;\ + (*include)[i20]=true;\ + if (i21 == NAME##_NULL) return;\ + (*include)[i21]=true;\ + if (i22 == NAME##_NULL) return;\ + (*include)[i22]=true;\ + if (i23 == NAME##_NULL) return;\ + (*include)[i23]=true;\ + }\ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21, bool i22, bool i23) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(23, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + if (i13) (*include)[12]=true;\ + if (i14) (*include)[13]=true;\ + if (i15) (*include)[14]=true;\ + if (i16) (*include)[15]=true;\ + if (i17) (*include)[16]=true;\ + if (i18) (*include)[17]=true;\ + if (i19) (*include)[18]=true;\ + if (i20) (*include)[19]=true;\ + if (i21) (*include)[20]=true;\ + if (i22) (*include)[21]=true;\ + if (i23) (*include)[22]=true;\ + } \ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21, NAME##_enum i22, NAME##_enum i23) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(23, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + if (i13 == NAME##_NULL) return;\ + (*include)[i13]=true;\ + if (i14 == NAME##_NULL) return;\ + (*include)[i14]=true;\ + if (i15 == NAME##_NULL) return;\ + (*include)[i15]=true;\ + if (i16 == NAME##_NULL) return;\ + (*include)[i16]=true;\ + if (i17 == NAME##_NULL) return;\ + (*include)[i17]=true;\ + if (i18 == NAME##_NULL) return;\ + (*include)[i18]=true;\ + if (i19 == NAME##_NULL) return;\ + (*include)[i19]=true;\ + if (i20 == NAME##_NULL) return;\ + (*include)[i20]=true;\ + if (i21 == NAME##_NULL) return;\ + (*include)[i21]=true;\ + if (i22 == NAME##_NULL) return;\ + (*include)[i22]=true;\ + if (i23 == NAME##_NULL) return;\ + (*include)[i23]=true;\ + }\ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_value_list& obj) { \ + s << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.manip << obj.obj->I6 << obj.delim;\ + s << obj.manip << obj.obj->I7 << obj.delim;\ + s << obj.manip << obj.obj->I8 << obj.delim;\ + s << obj.manip << obj.obj->I9 << obj.delim;\ + s << obj.manip << obj.obj->I10 << obj.delim;\ + s << obj.manip << obj.obj->I11 << obj.delim;\ + s << obj.manip << obj.obj->I12 << obj.delim;\ + s << obj.manip << obj.obj->I13 << obj.delim;\ + s << obj.manip << obj.obj->I14 << obj.delim;\ + s << obj.manip << obj.obj->I15 << obj.delim;\ + s << obj.manip << obj.obj->I16 << obj.delim;\ + s << obj.manip << obj.obj->I17 << obj.delim;\ + s << obj.manip << obj.obj->I18 << obj.delim;\ + s << obj.manip << obj.obj->I19 << obj.delim;\ + s << obj.manip << obj.obj->I20 << obj.delim;\ + s << obj.manip << obj.obj->I21 << obj.delim;\ + s << obj.manip << obj.obj->I22 << obj.delim;\ + s << obj.manip << obj.obj->I23; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_field_list& obj) { \ + s << obj.manip << obj.obj->names[0] << obj.delim;\ + s << obj.manip << obj.obj->names[1] << obj.delim;\ + s << obj.manip << obj.obj->names[2] << obj.delim;\ + s << obj.manip << obj.obj->names[3] << obj.delim;\ + s << obj.manip << obj.obj->names[4] << obj.delim;\ + s << obj.manip << obj.obj->names[5] << obj.delim;\ + s << obj.manip << obj.obj->names[6] << obj.delim;\ + s << obj.manip << obj.obj->names[7] << obj.delim;\ + s << obj.manip << obj.obj->names[8] << obj.delim;\ + s << obj.manip << obj.obj->names[9] << obj.delim;\ + s << obj.manip << obj.obj->names[10] << obj.delim;\ + s << obj.manip << obj.obj->names[11] << obj.delim;\ + s << obj.manip << obj.obj->names[12] << obj.delim;\ + s << obj.manip << obj.obj->names[13] << obj.delim;\ + s << obj.manip << obj.obj->names[14] << obj.delim;\ + s << obj.manip << obj.obj->names[15] << obj.delim;\ + s << obj.manip << obj.obj->names[16] << obj.delim;\ + s << obj.manip << obj.obj->names[17] << obj.delim;\ + s << obj.manip << obj.obj->names[18] << obj.delim;\ + s << obj.manip << obj.obj->names[19] << obj.delim;\ + s << obj.manip << obj.obj->names[20] << obj.delim;\ + s << obj.manip << obj.obj->names[21] << obj.delim;\ + s << obj.manip << obj.obj->names[22]; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_equal_list& obj) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6 << obj.delim;\ + s << obj.obj->names[6] << obj.comp << obj.manip << obj.obj->I7 << obj.delim;\ + s << obj.obj->names[7] << obj.comp << obj.manip << obj.obj->I8 << obj.delim;\ + s << obj.obj->names[8] << obj.comp << obj.manip << obj.obj->I9 << obj.delim;\ + s << obj.obj->names[9] << obj.comp << obj.manip << obj.obj->I10 << obj.delim;\ + s << obj.obj->names[10] << obj.comp << obj.manip << obj.obj->I11 << obj.delim;\ + s << obj.obj->names[11] << obj.comp << obj.manip << obj.obj->I12 << obj.delim;\ + s << obj.obj->names[12] << obj.comp << obj.manip << obj.obj->I13 << obj.delim;\ + s << obj.obj->names[13] << obj.comp << obj.manip << obj.obj->I14 << obj.delim;\ + s << obj.obj->names[14] << obj.comp << obj.manip << obj.obj->I15 << obj.delim;\ + s << obj.obj->names[15] << obj.comp << obj.manip << obj.obj->I16 << obj.delim;\ + s << obj.obj->names[16] << obj.comp << obj.manip << obj.obj->I17 << obj.delim;\ + s << obj.obj->names[17] << obj.comp << obj.manip << obj.obj->I18 << obj.delim;\ + s << obj.obj->names[18] << obj.comp << obj.manip << obj.obj->I19 << obj.delim;\ + s << obj.obj->names[19] << obj.comp << obj.manip << obj.obj->I20 << obj.delim;\ + s << obj.obj->names[20] << obj.comp << obj.manip << obj.obj->I21 << obj.delim;\ + s << obj.obj->names[21] << obj.comp << obj.manip << obj.obj->I22 << obj.delim;\ + s << obj.obj->names[22] << obj.comp << obj.manip << obj.obj->I23; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_value_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I6;\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I7;\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I8;\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I9;\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I10;\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I11;\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I12;\ + before = true; \ + } \ + if ((*obj.include)[12]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I13;\ + before = true; \ + } \ + if ((*obj.include)[13]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I14;\ + before = true; \ + } \ + if ((*obj.include)[14]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I15;\ + before = true; \ + } \ + if ((*obj.include)[15]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I16;\ + before = true; \ + } \ + if ((*obj.include)[16]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I17;\ + before = true; \ + } \ + if ((*obj.include)[17]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I18;\ + before = true; \ + } \ + if ((*obj.include)[18]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I19;\ + before = true; \ + } \ + if ((*obj.include)[19]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I20;\ + before = true; \ + } \ + if ((*obj.include)[20]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I21;\ + before = true; \ + } \ + if ((*obj.include)[21]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I22;\ + before = true; \ + } \ + if ((*obj.include)[22]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I23;\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_field_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->names[0];\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[1];\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[2];\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[3];\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[4];\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[5];\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[6];\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[7];\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[8];\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[9];\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[10];\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[11];\ + before = true; \ + } \ + if ((*obj.include)[12]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[12];\ + before = true; \ + } \ + if ((*obj.include)[13]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[13];\ + before = true; \ + } \ + if ((*obj.include)[14]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[14];\ + before = true; \ + } \ + if ((*obj.include)[15]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[15];\ + before = true; \ + } \ + if ((*obj.include)[16]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[16];\ + before = true; \ + } \ + if ((*obj.include)[17]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[17];\ + before = true; \ + } \ + if ((*obj.include)[18]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[18];\ + before = true; \ + } \ + if ((*obj.include)[19]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[19];\ + before = true; \ + } \ + if ((*obj.include)[20]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[20];\ + before = true; \ + } \ + if ((*obj.include)[21]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[21];\ + before = true; \ + } \ + if ((*obj.include)[22]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[22];\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_equal_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6;\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[6] << obj.comp << obj.manip << obj.obj->I7;\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[7] << obj.comp << obj.manip << obj.obj->I8;\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[8] << obj.comp << obj.manip << obj.obj->I9;\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[9] << obj.comp << obj.manip << obj.obj->I10;\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[10] << obj.comp << obj.manip << obj.obj->I11;\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[11] << obj.comp << obj.manip << obj.obj->I12;\ + before = true; \ + } \ + if ((*obj.include)[12]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[12] << obj.comp << obj.manip << obj.obj->I13;\ + before = true; \ + } \ + if ((*obj.include)[13]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[13] << obj.comp << obj.manip << obj.obj->I14;\ + before = true; \ + } \ + if ((*obj.include)[14]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[14] << obj.comp << obj.manip << obj.obj->I15;\ + before = true; \ + } \ + if ((*obj.include)[15]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[15] << obj.comp << obj.manip << obj.obj->I16;\ + before = true; \ + } \ + if ((*obj.include)[16]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[16] << obj.comp << obj.manip << obj.obj->I17;\ + before = true; \ + } \ + if ((*obj.include)[17]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[17] << obj.comp << obj.manip << obj.obj->I18;\ + before = true; \ + } \ + if ((*obj.include)[18]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[18] << obj.comp << obj.manip << obj.obj->I19;\ + before = true; \ + } \ + if ((*obj.include)[19]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[19] << obj.comp << obj.manip << obj.obj->I20;\ + before = true; \ + } \ + if ((*obj.include)[20]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[20] << obj.comp << obj.manip << obj.obj->I21;\ + before = true; \ + } \ + if ((*obj.include)[21]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[21] << obj.comp << obj.manip << obj.obj->I22;\ + before = true; \ + } \ + if ((*obj.include)[22]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[22] << obj.comp << obj.manip << obj.obj->I23;\ + } \ + return s; \ + } \ + template \ + inline NAME##_value_list NAME::value_list(const char *d, Manip m) const { \ + return NAME##_value_list (this, d, m); \ + } \ + template \ + inline NAME##_field_list NAME::field_list(const char *d, Manip m) const { \ + return NAME##_field_list (this, d, m); \ + } \ + template \ + inline NAME##_equal_list NAME::equal_list(const char *d, const char *c, Manip m) const { \ + return NAME##_equal_list (this, d, c, m); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21, bool i22, bool i23) const {\ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21, bool i22, bool i23) const { \ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21, bool i22, bool i23) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21, NAME##_enum i22, NAME##_enum i23) const { \ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21, NAME##_enum i22, NAME##_enum i23) const {\ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21, NAME##_enum i22, NAME##_enum i23) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_value_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_field_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_equal_list (this, d, c, m, i);\ + }\ + template \ + inline NAME##_cus_value_list \ + NAME::value_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, value, NUM);\ + }\ + template \ + inline NAME##_cus_field_list \ + NAME::field_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, field, NUM);\ + }\ + template \ + inline NAME##_cus_equal_list \ + NAME::equal_list(const char *d, const char *c, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_defe_##CMP(NAME, equal, NUM);\ + }\ + template \ + void populate_##NAME(NAME *s, const mysqlpp::Row &row) { \ + mysqlpp::NoExceptions ignore_schema_mismatches(row);\ + s->I1 = row[N1].conv(T1());\ + s->I2 = row[N2].conv(T2());\ + s->I3 = row[N3].conv(T3());\ + s->I4 = row[N4].conv(T4());\ + s->I5 = row[N5].conv(T5());\ + s->I6 = row[N6].conv(T6());\ + s->I7 = row[N7].conv(T7());\ + s->I8 = row[N8].conv(T8());\ + s->I9 = row[N9].conv(T9());\ + s->I10 = row[N10].conv(T10());\ + s->I11 = row[N11].conv(T11());\ + s->I12 = row[N12].conv(T12());\ + s->I13 = row[N13].conv(T13());\ + s->I14 = row[N14].conv(T14());\ + s->I15 = row[N15].conv(T15());\ + s->I16 = row[N16].conv(T16());\ + s->I17 = row[N17].conv(T17());\ + s->I18 = row[N18].conv(T18());\ + s->I19 = row[N19].conv(T19());\ + s->I20 = row[N20].conv(T20());\ + s->I21 = row[N21].conv(T21());\ + s->I22 = row[N22].conv(T22());\ + s->I23 = row[N23].conv(T23());\ + } \ + inline NAME::NAME(const mysqlpp::Row& row) :\ + table_override_(0)\ + {\ + populate_##NAME(this, row);\ + }\ + inline void NAME::set(const mysqlpp::Row& row)\ + {\ + populate_##NAME(this, row);\ + }\ + sql_COMPARE__##CMP(NAME, I1, I2, I3, I4, I5, I6, I7, I8, I9, I10, I11, I12, I13, I14, I15, I16, I17, I18, I19, I20, I21, I22, I23, 0, 0 ) + +#define sql_create_23(NAME, CMP, CONTR, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, T13, I13, T14, I14, T15, I15, T16, I16, T17, I17, T18, I18, T19, I19, T20, I20, T21, I21, T22, I22, T23, I23) \ + sql_create_complete_23(NAME, CMP, CONTR, T1, I1, #I1, T2, I2, #I2, T3, I3, #I3, T4, I4, #I4, T5, I5, #I5, T6, I6, #I6, T7, I7, #I7, T8, I8, #I8, T9, I9, #I9, T10, I10, #I10, T11, I11, #I11, T12, I12, #I12, T13, I13, #I13, T14, I14, #I14, T15, I15, #I15, T16, I16, #I16, T17, I17, #I17, T18, I18, #I18, T19, I19, #I19, T20, I20, #I20, T21, I21, #I21, T22, I22, #I22, T23, I23, #I23) \ + +// --------------------------------------------------- +// End Create 23 +// --------------------------------------------------- + +// --------------------------------------------------- +// Begin Create 24 +// --------------------------------------------------- +#define sql_create_complete_24(NAME, CMP, CONTR, T1, I1, N1, T2, I2, N2, T3, I3, N3, T4, I4, N4, T5, I5, N5, T6, I6, N6, T7, I7, N7, T8, I8, N8, T9, I9, N9, T10, I10, N10, T11, I11, N11, T12, I12, N12, T13, I13, N13, T14, I14, N14, T15, I15, N15, T16, I16, N16, T17, I17, N17, T18, I18, N18, T19, I19, N19, T20, I20, N20, T21, I21, N21, T22, I22, N22, T23, I23, N23, T24, I24, N24) \ + struct NAME; \ + enum NAME##_enum { \ + NAME##_##I1,\ + NAME##_##I2,\ + NAME##_##I3,\ + NAME##_##I4,\ + NAME##_##I5,\ + NAME##_##I6,\ + NAME##_##I7,\ + NAME##_##I8,\ + NAME##_##I9,\ + NAME##_##I10,\ + NAME##_##I11,\ + NAME##_##I12,\ + NAME##_##I13,\ + NAME##_##I14,\ + NAME##_##I15,\ + NAME##_##I16,\ + NAME##_##I17,\ + NAME##_##I18,\ + NAME##_##I19,\ + NAME##_##I20,\ + NAME##_##I21,\ + NAME##_##I22,\ + NAME##_##I23,\ + NAME##_##I24 \ + ,NAME##_NULL \ + }; \ + template \ + class NAME##_value_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_value_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_##field_list {\ + public: \ + const NAME *obj; \ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_field_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_equal_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public: \ + NAME##_equal_list (const NAME *o, const char *d, const char *c, Manip m) \ + : obj(o), delim(d), comp(c), manip(m) {}\ + };\ + template \ + class NAME##_cus_value_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_value_list () {if (del_vector) delete include;} \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21, bool i22, bool i23, bool i24);\ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21, NAME##_enum i22, NAME##_enum i23, NAME##_enum i24); \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m ,std::vector* i)\ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_field_list { \ + public:\ + const NAME *obj; \ + std::vector *include; \ + bool del_vector; \ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_field_list () {if (del_vector) delete include;} \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21, bool i22, bool i23, bool i24); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21, NAME##_enum i22, NAME##_enum i23, NAME##_enum i24); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_equal_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public:\ + ~NAME##_##cus_equal_list () {if (del_vector) delete include;}\ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21, bool i22, bool i23, bool i24); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21, NAME##_enum i22, NAME##_enum i23, NAME##_enum i24); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), comp(c), manip(m) {}\ + };\ + template int sql_compare_##NAME(const NAME&, const NAME&);\ + struct NAME { \ + T1 I1;\ + T2 I2;\ + T3 I3;\ + T4 I4;\ + T5 I5;\ + T6 I6;\ + T7 I7;\ + T8 I8;\ + T9 I9;\ + T10 I10;\ + T11 I11;\ + T12 I12;\ + T13 I13;\ + T14 I14;\ + T15 I15;\ + T16 I16;\ + T17 I17;\ + T18 I18;\ + T19 I19;\ + T20 I20;\ + T21 I21;\ + T22 I22;\ + T23 I23;\ + T24 I24; \ + NAME() : table_override_(0) {} \ + NAME(const mysqlpp::Row& row);\ + void set(const mysqlpp::Row &row);\ + sql_compare_define_##CMP(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, T13, I13, T14, I14, T15, I15, T16, I16, T17, I17, T18, I18, T19, I19, T20, I20, T21, I21, T22, I22, T23, I23, T24, I24, 0, 0)\ + sql_construct_define_##CONTR(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, T13, I13, T14, I14, T15, I15, T16, I16, T17, I17, T18, I18, T19, I19, T20, I20, T21, I21, T22, I22, T23, I23, T24, I24, 0, 0)\ + static const char* names[];\ + static void table(const char* t) { table_ = t; }\ + const char* const table() const\ + { return table_override_ ? table_override_ : NAME::table_; }\ + void instance_table(const char* t) { table_override_ = t; }\ + NAME##_value_list value_list() const {\ + return value_list(",", mysqlpp::quote);}\ + NAME##_value_list value_list(const char *d) const {\ + return value_list(d, mysqlpp::quote);}\ + template \ + NAME##_value_list value_list(const char *d, Manip m) const; \ + NAME##_field_list field_list() const {\ + return field_list(",", mysqlpp::do_nothing);}\ + NAME##_field_list field_list(const char *d) const {\ + return field_list(d, mysqlpp::do_nothing);}\ + template \ + NAME##_field_list field_list(const char *d, Manip m) const; \ + NAME##_equal_list equal_list(const char *d = ",", \ + const char *c = " = ") const{\ + return equal_list(d, c, mysqlpp::quote);}\ + template \ + NAME##_equal_list equal_list(const char *d, const char *c, Manip m) const; \ + /* cus_data */\ + NAME##_cus_value_list value_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false, bool i23 = false, bool i24 = false) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24);\ + }\ + NAME##_cus_value_list value_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL, NAME##_enum i23 = NAME##_NULL, NAME##_enum i24 = NAME##_NULL) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24);\ + }\ + NAME##_cus_value_list value_list(std::vector *i) const {\ + return value_list(",", mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(mysqlpp::sql_cmp_type sc) const {\ + return value_list(",", mysqlpp::quote, sc);\ + }\ + NAME##_cus_value_list value_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false, bool i23 = false, bool i24 = false) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24);\ + }\ + NAME##_cus_value_list value_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL, NAME##_enum i23 = NAME##_NULL, NAME##_enum i24 = NAME##_NULL) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + std::vector *i) const {\ + return value_list(d, mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return value_list(d, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false, bool i23 = false, bool i24 = false) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL, NAME##_enum i23 = NAME##_NULL, NAME##_enum i24 = NAME##_NULL) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus field */\ + NAME##_cus_field_list field_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false, bool i23 = false, bool i24 = false) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24);\ + }\ + NAME##_cus_field_list field_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL, NAME##_enum i23 = NAME##_NULL, NAME##_enum i24 = NAME##_NULL) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24);\ + }\ + NAME##_cus_field_list field_list(std::vector *i) const {\ + return field_list(",", mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(mysqlpp::sql_cmp_type sc) const\ + {\ + return field_list(",", mysqlpp::do_nothing, sc);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false, bool i23 = false, bool i24 = false) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24);\ + }\ + NAME##_cus_field_list field_list(const char *d,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL, NAME##_enum i23 = NAME##_NULL, NAME##_enum i24 = NAME##_NULL) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + std::vector *i) const {\ + return field_list(d, mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return field_list(d, mysqlpp::do_nothing, sc);\ + }\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false, bool i23 = false, bool i24 = false) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL, NAME##_enum i23 = NAME##_NULL, NAME##_enum i24 = NAME##_NULL) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + std::vector *i) const;\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus equal */\ + NAME##_cus_equal_list equal_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false, bool i23 = false, bool i24 = false) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24);\ + }\ + NAME##_cus_equal_list equal_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL, NAME##_enum i23 = NAME##_NULL, NAME##_enum i24 = NAME##_NULL) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24);\ + }\ + NAME##_cus_equal_list equal_list(std::vector *i) const {\ + return equal_list(",", " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(mysqlpp::sql_cmp_type sc) const {\ + return equal_list(",", " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false, bool i23 = false, bool i24 = false) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL, NAME##_enum i23 = NAME##_NULL, NAME##_enum i24 = NAME##_NULL) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + std::vector *i) const {\ + return equal_list(d, " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false, bool i23 = false, bool i24 = false) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL, NAME##_enum i23 = NAME##_NULL, NAME##_enum i24 = NAME##_NULL) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + std::vector *i) const {\ + return equal_list(d, c, mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, c, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false, bool i23 = false, bool i24 = false) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL, NAME##_enum i23 = NAME##_NULL, NAME##_enum i24 = NAME##_NULL) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + private:\ + static const char* table_;\ + const char* table_override_;\ + }; \ + MYSQLPP_SSQLS_CONDITIONAL_STATICS(\ + const char *NAME::names[] = { \ + N1 ,\ + N2 ,\ + N3 ,\ + N4 ,\ + N5 ,\ + N6 ,\ + N7 ,\ + N8 ,\ + N9 ,\ + N10 ,\ + N11 ,\ + N12 ,\ + N13 ,\ + N14 ,\ + N15 ,\ + N16 ,\ + N17 ,\ + N18 ,\ + N19 ,\ + N20 ,\ + N21 ,\ + N22 ,\ + N23 ,\ + N24 \ + }; \ + const char* NAME::table_ = #NAME;\ + )\ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21, bool i22, bool i23, bool i24) \ + { \ + delim = d;\ + manip = m;\ + del_vector = true;\ + obj = o; \ + include = new std::vector(24, false);\ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + if (i13) (*include)[12]=true;\ + if (i14) (*include)[13]=true;\ + if (i15) (*include)[14]=true;\ + if (i16) (*include)[15]=true;\ + if (i17) (*include)[16]=true;\ + if (i18) (*include)[17]=true;\ + if (i19) (*include)[18]=true;\ + if (i20) (*include)[19]=true;\ + if (i21) (*include)[20]=true;\ + if (i22) (*include)[21]=true;\ + if (i23) (*include)[22]=true;\ + if (i24) (*include)[23]=true;\ + } \ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21, NAME##_enum i22, NAME##_enum i23, NAME##_enum i24) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(24, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + if (i13 == NAME##_NULL) return;\ + (*include)[i13]=true;\ + if (i14 == NAME##_NULL) return;\ + (*include)[i14]=true;\ + if (i15 == NAME##_NULL) return;\ + (*include)[i15]=true;\ + if (i16 == NAME##_NULL) return;\ + (*include)[i16]=true;\ + if (i17 == NAME##_NULL) return;\ + (*include)[i17]=true;\ + if (i18 == NAME##_NULL) return;\ + (*include)[i18]=true;\ + if (i19 == NAME##_NULL) return;\ + (*include)[i19]=true;\ + if (i20 == NAME##_NULL) return;\ + (*include)[i20]=true;\ + if (i21 == NAME##_NULL) return;\ + (*include)[i21]=true;\ + if (i22 == NAME##_NULL) return;\ + (*include)[i22]=true;\ + if (i23 == NAME##_NULL) return;\ + (*include)[i23]=true;\ + if (i24 == NAME##_NULL) return;\ + (*include)[i24]=true;\ + }\ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21, bool i22, bool i23, bool i24) {\ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(24, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + if (i13) (*include)[12]=true;\ + if (i14) (*include)[13]=true;\ + if (i15) (*include)[14]=true;\ + if (i16) (*include)[15]=true;\ + if (i17) (*include)[16]=true;\ + if (i18) (*include)[17]=true;\ + if (i19) (*include)[18]=true;\ + if (i20) (*include)[19]=true;\ + if (i21) (*include)[20]=true;\ + if (i22) (*include)[21]=true;\ + if (i23) (*include)[22]=true;\ + if (i24) (*include)[23]=true;\ + } \ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21, NAME##_enum i22, NAME##_enum i23, NAME##_enum i24) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(24, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + if (i13 == NAME##_NULL) return;\ + (*include)[i13]=true;\ + if (i14 == NAME##_NULL) return;\ + (*include)[i14]=true;\ + if (i15 == NAME##_NULL) return;\ + (*include)[i15]=true;\ + if (i16 == NAME##_NULL) return;\ + (*include)[i16]=true;\ + if (i17 == NAME##_NULL) return;\ + (*include)[i17]=true;\ + if (i18 == NAME##_NULL) return;\ + (*include)[i18]=true;\ + if (i19 == NAME##_NULL) return;\ + (*include)[i19]=true;\ + if (i20 == NAME##_NULL) return;\ + (*include)[i20]=true;\ + if (i21 == NAME##_NULL) return;\ + (*include)[i21]=true;\ + if (i22 == NAME##_NULL) return;\ + (*include)[i22]=true;\ + if (i23 == NAME##_NULL) return;\ + (*include)[i23]=true;\ + if (i24 == NAME##_NULL) return;\ + (*include)[i24]=true;\ + }\ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21, bool i22, bool i23, bool i24) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(24, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + if (i13) (*include)[12]=true;\ + if (i14) (*include)[13]=true;\ + if (i15) (*include)[14]=true;\ + if (i16) (*include)[15]=true;\ + if (i17) (*include)[16]=true;\ + if (i18) (*include)[17]=true;\ + if (i19) (*include)[18]=true;\ + if (i20) (*include)[19]=true;\ + if (i21) (*include)[20]=true;\ + if (i22) (*include)[21]=true;\ + if (i23) (*include)[22]=true;\ + if (i24) (*include)[23]=true;\ + } \ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21, NAME##_enum i22, NAME##_enum i23, NAME##_enum i24) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(24, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + if (i13 == NAME##_NULL) return;\ + (*include)[i13]=true;\ + if (i14 == NAME##_NULL) return;\ + (*include)[i14]=true;\ + if (i15 == NAME##_NULL) return;\ + (*include)[i15]=true;\ + if (i16 == NAME##_NULL) return;\ + (*include)[i16]=true;\ + if (i17 == NAME##_NULL) return;\ + (*include)[i17]=true;\ + if (i18 == NAME##_NULL) return;\ + (*include)[i18]=true;\ + if (i19 == NAME##_NULL) return;\ + (*include)[i19]=true;\ + if (i20 == NAME##_NULL) return;\ + (*include)[i20]=true;\ + if (i21 == NAME##_NULL) return;\ + (*include)[i21]=true;\ + if (i22 == NAME##_NULL) return;\ + (*include)[i22]=true;\ + if (i23 == NAME##_NULL) return;\ + (*include)[i23]=true;\ + if (i24 == NAME##_NULL) return;\ + (*include)[i24]=true;\ + }\ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_value_list& obj) { \ + s << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.manip << obj.obj->I6 << obj.delim;\ + s << obj.manip << obj.obj->I7 << obj.delim;\ + s << obj.manip << obj.obj->I8 << obj.delim;\ + s << obj.manip << obj.obj->I9 << obj.delim;\ + s << obj.manip << obj.obj->I10 << obj.delim;\ + s << obj.manip << obj.obj->I11 << obj.delim;\ + s << obj.manip << obj.obj->I12 << obj.delim;\ + s << obj.manip << obj.obj->I13 << obj.delim;\ + s << obj.manip << obj.obj->I14 << obj.delim;\ + s << obj.manip << obj.obj->I15 << obj.delim;\ + s << obj.manip << obj.obj->I16 << obj.delim;\ + s << obj.manip << obj.obj->I17 << obj.delim;\ + s << obj.manip << obj.obj->I18 << obj.delim;\ + s << obj.manip << obj.obj->I19 << obj.delim;\ + s << obj.manip << obj.obj->I20 << obj.delim;\ + s << obj.manip << obj.obj->I21 << obj.delim;\ + s << obj.manip << obj.obj->I22 << obj.delim;\ + s << obj.manip << obj.obj->I23 << obj.delim;\ + s << obj.manip << obj.obj->I24; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_field_list& obj) { \ + s << obj.manip << obj.obj->names[0] << obj.delim;\ + s << obj.manip << obj.obj->names[1] << obj.delim;\ + s << obj.manip << obj.obj->names[2] << obj.delim;\ + s << obj.manip << obj.obj->names[3] << obj.delim;\ + s << obj.manip << obj.obj->names[4] << obj.delim;\ + s << obj.manip << obj.obj->names[5] << obj.delim;\ + s << obj.manip << obj.obj->names[6] << obj.delim;\ + s << obj.manip << obj.obj->names[7] << obj.delim;\ + s << obj.manip << obj.obj->names[8] << obj.delim;\ + s << obj.manip << obj.obj->names[9] << obj.delim;\ + s << obj.manip << obj.obj->names[10] << obj.delim;\ + s << obj.manip << obj.obj->names[11] << obj.delim;\ + s << obj.manip << obj.obj->names[12] << obj.delim;\ + s << obj.manip << obj.obj->names[13] << obj.delim;\ + s << obj.manip << obj.obj->names[14] << obj.delim;\ + s << obj.manip << obj.obj->names[15] << obj.delim;\ + s << obj.manip << obj.obj->names[16] << obj.delim;\ + s << obj.manip << obj.obj->names[17] << obj.delim;\ + s << obj.manip << obj.obj->names[18] << obj.delim;\ + s << obj.manip << obj.obj->names[19] << obj.delim;\ + s << obj.manip << obj.obj->names[20] << obj.delim;\ + s << obj.manip << obj.obj->names[21] << obj.delim;\ + s << obj.manip << obj.obj->names[22] << obj.delim;\ + s << obj.manip << obj.obj->names[23]; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_equal_list& obj) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6 << obj.delim;\ + s << obj.obj->names[6] << obj.comp << obj.manip << obj.obj->I7 << obj.delim;\ + s << obj.obj->names[7] << obj.comp << obj.manip << obj.obj->I8 << obj.delim;\ + s << obj.obj->names[8] << obj.comp << obj.manip << obj.obj->I9 << obj.delim;\ + s << obj.obj->names[9] << obj.comp << obj.manip << obj.obj->I10 << obj.delim;\ + s << obj.obj->names[10] << obj.comp << obj.manip << obj.obj->I11 << obj.delim;\ + s << obj.obj->names[11] << obj.comp << obj.manip << obj.obj->I12 << obj.delim;\ + s << obj.obj->names[12] << obj.comp << obj.manip << obj.obj->I13 << obj.delim;\ + s << obj.obj->names[13] << obj.comp << obj.manip << obj.obj->I14 << obj.delim;\ + s << obj.obj->names[14] << obj.comp << obj.manip << obj.obj->I15 << obj.delim;\ + s << obj.obj->names[15] << obj.comp << obj.manip << obj.obj->I16 << obj.delim;\ + s << obj.obj->names[16] << obj.comp << obj.manip << obj.obj->I17 << obj.delim;\ + s << obj.obj->names[17] << obj.comp << obj.manip << obj.obj->I18 << obj.delim;\ + s << obj.obj->names[18] << obj.comp << obj.manip << obj.obj->I19 << obj.delim;\ + s << obj.obj->names[19] << obj.comp << obj.manip << obj.obj->I20 << obj.delim;\ + s << obj.obj->names[20] << obj.comp << obj.manip << obj.obj->I21 << obj.delim;\ + s << obj.obj->names[21] << obj.comp << obj.manip << obj.obj->I22 << obj.delim;\ + s << obj.obj->names[22] << obj.comp << obj.manip << obj.obj->I23 << obj.delim;\ + s << obj.obj->names[23] << obj.comp << obj.manip << obj.obj->I24; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_value_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I6;\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I7;\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I8;\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I9;\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I10;\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I11;\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I12;\ + before = true; \ + } \ + if ((*obj.include)[12]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I13;\ + before = true; \ + } \ + if ((*obj.include)[13]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I14;\ + before = true; \ + } \ + if ((*obj.include)[14]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I15;\ + before = true; \ + } \ + if ((*obj.include)[15]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I16;\ + before = true; \ + } \ + if ((*obj.include)[16]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I17;\ + before = true; \ + } \ + if ((*obj.include)[17]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I18;\ + before = true; \ + } \ + if ((*obj.include)[18]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I19;\ + before = true; \ + } \ + if ((*obj.include)[19]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I20;\ + before = true; \ + } \ + if ((*obj.include)[20]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I21;\ + before = true; \ + } \ + if ((*obj.include)[21]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I22;\ + before = true; \ + } \ + if ((*obj.include)[22]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I23;\ + before = true; \ + } \ + if ((*obj.include)[23]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I24;\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_field_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->names[0];\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[1];\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[2];\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[3];\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[4];\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[5];\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[6];\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[7];\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[8];\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[9];\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[10];\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[11];\ + before = true; \ + } \ + if ((*obj.include)[12]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[12];\ + before = true; \ + } \ + if ((*obj.include)[13]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[13];\ + before = true; \ + } \ + if ((*obj.include)[14]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[14];\ + before = true; \ + } \ + if ((*obj.include)[15]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[15];\ + before = true; \ + } \ + if ((*obj.include)[16]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[16];\ + before = true; \ + } \ + if ((*obj.include)[17]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[17];\ + before = true; \ + } \ + if ((*obj.include)[18]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[18];\ + before = true; \ + } \ + if ((*obj.include)[19]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[19];\ + before = true; \ + } \ + if ((*obj.include)[20]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[20];\ + before = true; \ + } \ + if ((*obj.include)[21]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[21];\ + before = true; \ + } \ + if ((*obj.include)[22]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[22];\ + before = true; \ + } \ + if ((*obj.include)[23]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[23];\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_equal_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6;\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[6] << obj.comp << obj.manip << obj.obj->I7;\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[7] << obj.comp << obj.manip << obj.obj->I8;\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[8] << obj.comp << obj.manip << obj.obj->I9;\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[9] << obj.comp << obj.manip << obj.obj->I10;\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[10] << obj.comp << obj.manip << obj.obj->I11;\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[11] << obj.comp << obj.manip << obj.obj->I12;\ + before = true; \ + } \ + if ((*obj.include)[12]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[12] << obj.comp << obj.manip << obj.obj->I13;\ + before = true; \ + } \ + if ((*obj.include)[13]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[13] << obj.comp << obj.manip << obj.obj->I14;\ + before = true; \ + } \ + if ((*obj.include)[14]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[14] << obj.comp << obj.manip << obj.obj->I15;\ + before = true; \ + } \ + if ((*obj.include)[15]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[15] << obj.comp << obj.manip << obj.obj->I16;\ + before = true; \ + } \ + if ((*obj.include)[16]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[16] << obj.comp << obj.manip << obj.obj->I17;\ + before = true; \ + } \ + if ((*obj.include)[17]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[17] << obj.comp << obj.manip << obj.obj->I18;\ + before = true; \ + } \ + if ((*obj.include)[18]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[18] << obj.comp << obj.manip << obj.obj->I19;\ + before = true; \ + } \ + if ((*obj.include)[19]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[19] << obj.comp << obj.manip << obj.obj->I20;\ + before = true; \ + } \ + if ((*obj.include)[20]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[20] << obj.comp << obj.manip << obj.obj->I21;\ + before = true; \ + } \ + if ((*obj.include)[21]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[21] << obj.comp << obj.manip << obj.obj->I22;\ + before = true; \ + } \ + if ((*obj.include)[22]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[22] << obj.comp << obj.manip << obj.obj->I23;\ + before = true; \ + } \ + if ((*obj.include)[23]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[23] << obj.comp << obj.manip << obj.obj->I24;\ + } \ + return s; \ + } \ + template \ + inline NAME##_value_list NAME::value_list(const char *d, Manip m) const { \ + return NAME##_value_list (this, d, m); \ + } \ + template \ + inline NAME##_field_list NAME::field_list(const char *d, Manip m) const { \ + return NAME##_field_list (this, d, m); \ + } \ + template \ + inline NAME##_equal_list NAME::equal_list(const char *d, const char *c, Manip m) const { \ + return NAME##_equal_list (this, d, c, m); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21, bool i22, bool i23, bool i24) const {\ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21, bool i22, bool i23, bool i24) const { \ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21, bool i22, bool i23, bool i24) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21, NAME##_enum i22, NAME##_enum i23, NAME##_enum i24) const { \ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21, NAME##_enum i22, NAME##_enum i23, NAME##_enum i24) const {\ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21, NAME##_enum i22, NAME##_enum i23, NAME##_enum i24) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_value_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_field_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_equal_list (this, d, c, m, i);\ + }\ + template \ + inline NAME##_cus_value_list \ + NAME::value_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, value, NUM);\ + }\ + template \ + inline NAME##_cus_field_list \ + NAME::field_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, field, NUM);\ + }\ + template \ + inline NAME##_cus_equal_list \ + NAME::equal_list(const char *d, const char *c, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_defe_##CMP(NAME, equal, NUM);\ + }\ + template \ + void populate_##NAME(NAME *s, const mysqlpp::Row &row) { \ + mysqlpp::NoExceptions ignore_schema_mismatches(row);\ + s->I1 = row[N1].conv(T1());\ + s->I2 = row[N2].conv(T2());\ + s->I3 = row[N3].conv(T3());\ + s->I4 = row[N4].conv(T4());\ + s->I5 = row[N5].conv(T5());\ + s->I6 = row[N6].conv(T6());\ + s->I7 = row[N7].conv(T7());\ + s->I8 = row[N8].conv(T8());\ + s->I9 = row[N9].conv(T9());\ + s->I10 = row[N10].conv(T10());\ + s->I11 = row[N11].conv(T11());\ + s->I12 = row[N12].conv(T12());\ + s->I13 = row[N13].conv(T13());\ + s->I14 = row[N14].conv(T14());\ + s->I15 = row[N15].conv(T15());\ + s->I16 = row[N16].conv(T16());\ + s->I17 = row[N17].conv(T17());\ + s->I18 = row[N18].conv(T18());\ + s->I19 = row[N19].conv(T19());\ + s->I20 = row[N20].conv(T20());\ + s->I21 = row[N21].conv(T21());\ + s->I22 = row[N22].conv(T22());\ + s->I23 = row[N23].conv(T23());\ + s->I24 = row[N24].conv(T24());\ + } \ + inline NAME::NAME(const mysqlpp::Row& row) :\ + table_override_(0)\ + {\ + populate_##NAME(this, row);\ + }\ + inline void NAME::set(const mysqlpp::Row& row)\ + {\ + populate_##NAME(this, row);\ + }\ + sql_COMPARE__##CMP(NAME, I1, I2, I3, I4, I5, I6, I7, I8, I9, I10, I11, I12, I13, I14, I15, I16, I17, I18, I19, I20, I21, I22, I23, I24, 0 ) + +#define sql_create_24(NAME, CMP, CONTR, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, T13, I13, T14, I14, T15, I15, T16, I16, T17, I17, T18, I18, T19, I19, T20, I20, T21, I21, T22, I22, T23, I23, T24, I24) \ + sql_create_complete_24(NAME, CMP, CONTR, T1, I1, #I1, T2, I2, #I2, T3, I3, #I3, T4, I4, #I4, T5, I5, #I5, T6, I6, #I6, T7, I7, #I7, T8, I8, #I8, T9, I9, #I9, T10, I10, #I10, T11, I11, #I11, T12, I12, #I12, T13, I13, #I13, T14, I14, #I14, T15, I15, #I15, T16, I16, #I16, T17, I17, #I17, T18, I18, #I18, T19, I19, #I19, T20, I20, #I20, T21, I21, #I21, T22, I22, #I22, T23, I23, #I23, T24, I24, #I24) \ + +// --------------------------------------------------- +// End Create 24 +// --------------------------------------------------- + +// --------------------------------------------------- +// Begin Create 25 +// --------------------------------------------------- +#define sql_create_complete_25(NAME, CMP, CONTR, T1, I1, N1, T2, I2, N2, T3, I3, N3, T4, I4, N4, T5, I5, N5, T6, I6, N6, T7, I7, N7, T8, I8, N8, T9, I9, N9, T10, I10, N10, T11, I11, N11, T12, I12, N12, T13, I13, N13, T14, I14, N14, T15, I15, N15, T16, I16, N16, T17, I17, N17, T18, I18, N18, T19, I19, N19, T20, I20, N20, T21, I21, N21, T22, I22, N22, T23, I23, N23, T24, I24, N24, T25, I25, N25) \ + struct NAME; \ + enum NAME##_enum { \ + NAME##_##I1,\ + NAME##_##I2,\ + NAME##_##I3,\ + NAME##_##I4,\ + NAME##_##I5,\ + NAME##_##I6,\ + NAME##_##I7,\ + NAME##_##I8,\ + NAME##_##I9,\ + NAME##_##I10,\ + NAME##_##I11,\ + NAME##_##I12,\ + NAME##_##I13,\ + NAME##_##I14,\ + NAME##_##I15,\ + NAME##_##I16,\ + NAME##_##I17,\ + NAME##_##I18,\ + NAME##_##I19,\ + NAME##_##I20,\ + NAME##_##I21,\ + NAME##_##I22,\ + NAME##_##I23,\ + NAME##_##I24,\ + NAME##_##I25 \ + ,NAME##_NULL \ + }; \ + template \ + class NAME##_value_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_value_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_##field_list {\ + public: \ + const NAME *obj; \ + const char *delim;\ + Manip manip;\ + public: \ + NAME##_field_list (const NAME *o, const char *d, Manip m) \ + : obj(o), delim(d), manip(m) {} \ + };\ + template \ + class NAME##_equal_list { \ + public: \ + const NAME *obj;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public: \ + NAME##_equal_list (const NAME *o, const char *d, const char *c, Manip m) \ + : obj(o), delim(d), comp(c), manip(m) {}\ + };\ + template \ + class NAME##_cus_value_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_value_list () {if (del_vector) delete include;} \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21, bool i22, bool i23, bool i24, bool i25);\ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21, NAME##_enum i22, NAME##_enum i23, NAME##_enum i24, NAME##_enum i25); \ + NAME##_cus_value_list (const NAME *o, const char *d, Manip m ,std::vector* i)\ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_field_list { \ + public:\ + const NAME *obj; \ + std::vector *include; \ + bool del_vector; \ + const char *delim;\ + Manip manip;\ + public: \ + ~NAME##_cus_field_list () {if (del_vector) delete include;} \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21, bool i22, bool i23, bool i24, bool i25); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21, NAME##_enum i22, NAME##_enum i23, NAME##_enum i24, NAME##_enum i25); \ + NAME##_cus_field_list (const NAME *o, const char *d, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), manip(m) {}\ + };\ + template \ + class NAME##_cus_equal_list {\ + public:\ + const NAME *obj;\ + std::vector *include;\ + bool del_vector;\ + const char *delim;\ + const char *comp;\ + Manip manip;\ + public:\ + ~NAME##_##cus_equal_list () {if (del_vector) delete include;}\ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21, bool i22, bool i23, bool i24, bool i25); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21, NAME##_enum i22, NAME##_enum i23, NAME##_enum i24, NAME##_enum i25); \ + NAME##_##cus_equal_list (const NAME *o, const char *d, const char *c, Manip m, std::vector *i) \ + : obj(o), include(i), del_vector(false), delim(d), comp(c), manip(m) {}\ + };\ + template int sql_compare_##NAME(const NAME&, const NAME&);\ + struct NAME { \ + T1 I1;\ + T2 I2;\ + T3 I3;\ + T4 I4;\ + T5 I5;\ + T6 I6;\ + T7 I7;\ + T8 I8;\ + T9 I9;\ + T10 I10;\ + T11 I11;\ + T12 I12;\ + T13 I13;\ + T14 I14;\ + T15 I15;\ + T16 I16;\ + T17 I17;\ + T18 I18;\ + T19 I19;\ + T20 I20;\ + T21 I21;\ + T22 I22;\ + T23 I23;\ + T24 I24;\ + T25 I25; \ + NAME() : table_override_(0) {} \ + NAME(const mysqlpp::Row& row);\ + void set(const mysqlpp::Row &row);\ + sql_compare_define_##CMP(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, T13, I13, T14, I14, T15, I15, T16, I16, T17, I17, T18, I18, T19, I19, T20, I20, T21, I21, T22, I22, T23, I23, T24, I24, T25, I25)\ + sql_construct_define_##CONTR(NAME, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, T13, I13, T14, I14, T15, I15, T16, I16, T17, I17, T18, I18, T19, I19, T20, I20, T21, I21, T22, I22, T23, I23, T24, I24, T25, I25)\ + static const char* names[];\ + static void table(const char* t) { table_ = t; }\ + const char* const table() const\ + { return table_override_ ? table_override_ : NAME::table_; }\ + void instance_table(const char* t) { table_override_ = t; }\ + NAME##_value_list value_list() const {\ + return value_list(",", mysqlpp::quote);}\ + NAME##_value_list value_list(const char *d) const {\ + return value_list(d, mysqlpp::quote);}\ + template \ + NAME##_value_list value_list(const char *d, Manip m) const; \ + NAME##_field_list field_list() const {\ + return field_list(",", mysqlpp::do_nothing);}\ + NAME##_field_list field_list(const char *d) const {\ + return field_list(d, mysqlpp::do_nothing);}\ + template \ + NAME##_field_list field_list(const char *d, Manip m) const; \ + NAME##_equal_list equal_list(const char *d = ",", \ + const char *c = " = ") const{\ + return equal_list(d, c, mysqlpp::quote);}\ + template \ + NAME##_equal_list equal_list(const char *d, const char *c, Manip m) const; \ + /* cus_data */\ + NAME##_cus_value_list value_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false, bool i23 = false, bool i24 = false, bool i25 = false) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25);\ + }\ + NAME##_cus_value_list value_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL, NAME##_enum i23 = NAME##_NULL, NAME##_enum i24 = NAME##_NULL, NAME##_enum i25 = NAME##_NULL) const {\ + return value_list(",", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25);\ + }\ + NAME##_cus_value_list value_list(std::vector *i) const {\ + return value_list(",", mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(mysqlpp::sql_cmp_type sc) const {\ + return value_list(",", mysqlpp::quote, sc);\ + }\ + NAME##_cus_value_list value_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false, bool i23 = false, bool i24 = false, bool i25 = false) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25);\ + }\ + NAME##_cus_value_list value_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL, NAME##_enum i23 = NAME##_NULL, NAME##_enum i24 = NAME##_NULL, NAME##_enum i25 = NAME##_NULL) const {\ + return value_list(d, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + std::vector *i) const {\ + return value_list(d, mysqlpp::quote, i);\ + }\ + NAME##_cus_value_list value_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return value_list(d, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false, bool i23 = false, bool i24 = false, bool i25 = false) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL, NAME##_enum i23 = NAME##_NULL, NAME##_enum i24 = NAME##_NULL, NAME##_enum i25 = NAME##_NULL) const; \ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_value_list value_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus field */\ + NAME##_cus_field_list field_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false, bool i23 = false, bool i24 = false, bool i25 = false) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25);\ + }\ + NAME##_cus_field_list field_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL, NAME##_enum i23 = NAME##_NULL, NAME##_enum i24 = NAME##_NULL, NAME##_enum i25 = NAME##_NULL) const {\ + return field_list(",", mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25);\ + }\ + NAME##_cus_field_list field_list(std::vector *i) const {\ + return field_list(",", mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(mysqlpp::sql_cmp_type sc) const\ + {\ + return field_list(",", mysqlpp::do_nothing, sc);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false, bool i23 = false, bool i24 = false, bool i25 = false) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25);\ + }\ + NAME##_cus_field_list field_list(const char *d,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL, NAME##_enum i23 = NAME##_NULL, NAME##_enum i24 = NAME##_NULL, NAME##_enum i25 = NAME##_NULL) const {\ + return field_list(d, mysqlpp::do_nothing, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + std::vector *i) const {\ + return field_list(d, mysqlpp::do_nothing, i);\ + }\ + NAME##_cus_field_list field_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return field_list(d, mysqlpp::do_nothing, sc);\ + }\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false, bool i23 = false, bool i24 = false, bool i25 = false) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL, NAME##_enum i23 = NAME##_NULL, NAME##_enum i24 = NAME##_NULL, NAME##_enum i25 = NAME##_NULL) const; \ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m,\ + std::vector *i) const;\ + template \ + NAME##_cus_field_list field_list(const char *d, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + /* cus equal */\ + NAME##_cus_equal_list equal_list(bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false, bool i23 = false, bool i24 = false, bool i25 = false) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25);\ + }\ + NAME##_cus_equal_list equal_list(NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL, NAME##_enum i23 = NAME##_NULL, NAME##_enum i24 = NAME##_NULL, NAME##_enum i25 = NAME##_NULL) const {\ + return equal_list(",", " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25);\ + }\ + NAME##_cus_equal_list equal_list(std::vector *i) const {\ + return equal_list(",", " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(mysqlpp::sql_cmp_type sc) const {\ + return equal_list(",", " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false, bool i23 = false, bool i24 = false, bool i25 = false) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL, NAME##_enum i23 = NAME##_NULL, NAME##_enum i24 = NAME##_NULL, NAME##_enum i25 = NAME##_NULL) const {\ + return equal_list(d, " = ", mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + std::vector *i) const {\ + return equal_list(d, " = ", mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, \ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, " = ", mysqlpp::quote, sc);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false, bool i23 = false, bool i24 = false, bool i25 = false) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL, NAME##_enum i23 = NAME##_NULL, NAME##_enum i24 = NAME##_NULL, NAME##_enum i25 = NAME##_NULL) const {\ + return equal_list(d, c, mysqlpp::quote, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + std::vector *i) const {\ + return equal_list(d, c, mysqlpp::quote, i);\ + }\ + NAME##_cus_equal_list equal_list(const char *d, const char *c,\ + mysqlpp::sql_cmp_type sc) const {\ + return equal_list(d, c, mysqlpp::quote, sc);\ + }\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + bool i1, bool i2 = false, bool i3 = false, bool i4 = false, bool i5 = false, bool i6 = false, bool i7 = false, bool i8 = false, bool i9 = false, bool i10 = false, bool i11 = false, bool i12 = false, bool i13 = false, bool i14 = false, bool i15 = false, bool i16 = false, bool i17 = false, bool i18 = false, bool i19 = false, bool i20 = false, bool i21 = false, bool i22 = false, bool i23 = false, bool i24 = false, bool i25 = false) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2 = NAME##_NULL, NAME##_enum i3 = NAME##_NULL, NAME##_enum i4 = NAME##_NULL, NAME##_enum i5 = NAME##_NULL, NAME##_enum i6 = NAME##_NULL, NAME##_enum i7 = NAME##_NULL, NAME##_enum i8 = NAME##_NULL, NAME##_enum i9 = NAME##_NULL, NAME##_enum i10 = NAME##_NULL, NAME##_enum i11 = NAME##_NULL, NAME##_enum i12 = NAME##_NULL, NAME##_enum i13 = NAME##_NULL, NAME##_enum i14 = NAME##_NULL, NAME##_enum i15 = NAME##_NULL, NAME##_enum i16 = NAME##_NULL, NAME##_enum i17 = NAME##_NULL, NAME##_enum i18 = NAME##_NULL, NAME##_enum i19 = NAME##_NULL, NAME##_enum i20 = NAME##_NULL, NAME##_enum i21 = NAME##_NULL, NAME##_enum i22 = NAME##_NULL, NAME##_enum i23 = NAME##_NULL, NAME##_enum i24 = NAME##_NULL, NAME##_enum i25 = NAME##_NULL) const; \ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + std::vector *i) const;\ + template \ + NAME##_cus_equal_list equal_list(const char *d, const char *c, Manip m, \ + mysqlpp::sql_cmp_type sc) const;\ + private:\ + static const char* table_;\ + const char* table_override_;\ + }; \ + MYSQLPP_SSQLS_CONDITIONAL_STATICS(\ + const char *NAME::names[] = { \ + N1 ,\ + N2 ,\ + N3 ,\ + N4 ,\ + N5 ,\ + N6 ,\ + N7 ,\ + N8 ,\ + N9 ,\ + N10 ,\ + N11 ,\ + N12 ,\ + N13 ,\ + N14 ,\ + N15 ,\ + N16 ,\ + N17 ,\ + N18 ,\ + N19 ,\ + N20 ,\ + N21 ,\ + N22 ,\ + N23 ,\ + N24 ,\ + N25 \ + }; \ + const char* NAME::table_ = #NAME;\ + )\ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21, bool i22, bool i23, bool i24, bool i25) \ + { \ + delim = d;\ + manip = m;\ + del_vector = true;\ + obj = o; \ + include = new std::vector(25, false);\ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + if (i13) (*include)[12]=true;\ + if (i14) (*include)[13]=true;\ + if (i15) (*include)[14]=true;\ + if (i16) (*include)[15]=true;\ + if (i17) (*include)[16]=true;\ + if (i18) (*include)[17]=true;\ + if (i19) (*include)[18]=true;\ + if (i20) (*include)[19]=true;\ + if (i21) (*include)[20]=true;\ + if (i22) (*include)[21]=true;\ + if (i23) (*include)[22]=true;\ + if (i24) (*include)[23]=true;\ + if (i25) (*include)[24]=true;\ + } \ + template \ + NAME##_cus_value_list::NAME##_cus_value_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21, NAME##_enum i22, NAME##_enum i23, NAME##_enum i24, NAME##_enum i25) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(25, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + if (i13 == NAME##_NULL) return;\ + (*include)[i13]=true;\ + if (i14 == NAME##_NULL) return;\ + (*include)[i14]=true;\ + if (i15 == NAME##_NULL) return;\ + (*include)[i15]=true;\ + if (i16 == NAME##_NULL) return;\ + (*include)[i16]=true;\ + if (i17 == NAME##_NULL) return;\ + (*include)[i17]=true;\ + if (i18 == NAME##_NULL) return;\ + (*include)[i18]=true;\ + if (i19 == NAME##_NULL) return;\ + (*include)[i19]=true;\ + if (i20 == NAME##_NULL) return;\ + (*include)[i20]=true;\ + if (i21 == NAME##_NULL) return;\ + (*include)[i21]=true;\ + if (i22 == NAME##_NULL) return;\ + (*include)[i22]=true;\ + if (i23 == NAME##_NULL) return;\ + (*include)[i23]=true;\ + if (i24 == NAME##_NULL) return;\ + (*include)[i24]=true;\ + if (i25 == NAME##_NULL) return;\ + (*include)[i25]=true;\ + }\ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21, bool i22, bool i23, bool i24, bool i25) {\ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(25, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + if (i13) (*include)[12]=true;\ + if (i14) (*include)[13]=true;\ + if (i15) (*include)[14]=true;\ + if (i16) (*include)[15]=true;\ + if (i17) (*include)[16]=true;\ + if (i18) (*include)[17]=true;\ + if (i19) (*include)[18]=true;\ + if (i20) (*include)[19]=true;\ + if (i21) (*include)[20]=true;\ + if (i22) (*include)[21]=true;\ + if (i23) (*include)[22]=true;\ + if (i24) (*include)[23]=true;\ + if (i25) (*include)[24]=true;\ + } \ + template \ + NAME##_cus_field_list::NAME##_cus_field_list\ + (const NAME *o, const char *d, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21, NAME##_enum i22, NAME##_enum i23, NAME##_enum i24, NAME##_enum i25) { \ + delim = d;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(25, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + if (i13 == NAME##_NULL) return;\ + (*include)[i13]=true;\ + if (i14 == NAME##_NULL) return;\ + (*include)[i14]=true;\ + if (i15 == NAME##_NULL) return;\ + (*include)[i15]=true;\ + if (i16 == NAME##_NULL) return;\ + (*include)[i16]=true;\ + if (i17 == NAME##_NULL) return;\ + (*include)[i17]=true;\ + if (i18 == NAME##_NULL) return;\ + (*include)[i18]=true;\ + if (i19 == NAME##_NULL) return;\ + (*include)[i19]=true;\ + if (i20 == NAME##_NULL) return;\ + (*include)[i20]=true;\ + if (i21 == NAME##_NULL) return;\ + (*include)[i21]=true;\ + if (i22 == NAME##_NULL) return;\ + (*include)[i22]=true;\ + if (i23 == NAME##_NULL) return;\ + (*include)[i23]=true;\ + if (i24 == NAME##_NULL) return;\ + (*include)[i24]=true;\ + if (i25 == NAME##_NULL) return;\ + (*include)[i25]=true;\ + }\ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21, bool i22, bool i23, bool i24, bool i25) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(25, false); \ + if (i1) (*include)[0]=true;\ + if (i2) (*include)[1]=true;\ + if (i3) (*include)[2]=true;\ + if (i4) (*include)[3]=true;\ + if (i5) (*include)[4]=true;\ + if (i6) (*include)[5]=true;\ + if (i7) (*include)[6]=true;\ + if (i8) (*include)[7]=true;\ + if (i9) (*include)[8]=true;\ + if (i10) (*include)[9]=true;\ + if (i11) (*include)[10]=true;\ + if (i12) (*include)[11]=true;\ + if (i13) (*include)[12]=true;\ + if (i14) (*include)[13]=true;\ + if (i15) (*include)[14]=true;\ + if (i16) (*include)[15]=true;\ + if (i17) (*include)[16]=true;\ + if (i18) (*include)[17]=true;\ + if (i19) (*include)[18]=true;\ + if (i20) (*include)[19]=true;\ + if (i21) (*include)[20]=true;\ + if (i22) (*include)[21]=true;\ + if (i23) (*include)[22]=true;\ + if (i24) (*include)[23]=true;\ + if (i25) (*include)[24]=true;\ + } \ + template \ + NAME##_cus_equal_list::NAME##_cus_equal_list\ + (const NAME *o, const char *d, const char *c, Manip m, NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21, NAME##_enum i22, NAME##_enum i23, NAME##_enum i24, NAME##_enum i25) { \ + delim = d;\ + comp = c;\ + manip = m;\ + del_vector = true; \ + obj = o; \ + include = new std::vector(25, false); \ + if (i1 == NAME##_NULL) return;\ + (*include)[i1]=true;\ + if (i2 == NAME##_NULL) return;\ + (*include)[i2]=true;\ + if (i3 == NAME##_NULL) return;\ + (*include)[i3]=true;\ + if (i4 == NAME##_NULL) return;\ + (*include)[i4]=true;\ + if (i5 == NAME##_NULL) return;\ + (*include)[i5]=true;\ + if (i6 == NAME##_NULL) return;\ + (*include)[i6]=true;\ + if (i7 == NAME##_NULL) return;\ + (*include)[i7]=true;\ + if (i8 == NAME##_NULL) return;\ + (*include)[i8]=true;\ + if (i9 == NAME##_NULL) return;\ + (*include)[i9]=true;\ + if (i10 == NAME##_NULL) return;\ + (*include)[i10]=true;\ + if (i11 == NAME##_NULL) return;\ + (*include)[i11]=true;\ + if (i12 == NAME##_NULL) return;\ + (*include)[i12]=true;\ + if (i13 == NAME##_NULL) return;\ + (*include)[i13]=true;\ + if (i14 == NAME##_NULL) return;\ + (*include)[i14]=true;\ + if (i15 == NAME##_NULL) return;\ + (*include)[i15]=true;\ + if (i16 == NAME##_NULL) return;\ + (*include)[i16]=true;\ + if (i17 == NAME##_NULL) return;\ + (*include)[i17]=true;\ + if (i18 == NAME##_NULL) return;\ + (*include)[i18]=true;\ + if (i19 == NAME##_NULL) return;\ + (*include)[i19]=true;\ + if (i20 == NAME##_NULL) return;\ + (*include)[i20]=true;\ + if (i21 == NAME##_NULL) return;\ + (*include)[i21]=true;\ + if (i22 == NAME##_NULL) return;\ + (*include)[i22]=true;\ + if (i23 == NAME##_NULL) return;\ + (*include)[i23]=true;\ + if (i24 == NAME##_NULL) return;\ + (*include)[i24]=true;\ + if (i25 == NAME##_NULL) return;\ + (*include)[i25]=true;\ + }\ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_value_list& obj) { \ + s << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.manip << obj.obj->I6 << obj.delim;\ + s << obj.manip << obj.obj->I7 << obj.delim;\ + s << obj.manip << obj.obj->I8 << obj.delim;\ + s << obj.manip << obj.obj->I9 << obj.delim;\ + s << obj.manip << obj.obj->I10 << obj.delim;\ + s << obj.manip << obj.obj->I11 << obj.delim;\ + s << obj.manip << obj.obj->I12 << obj.delim;\ + s << obj.manip << obj.obj->I13 << obj.delim;\ + s << obj.manip << obj.obj->I14 << obj.delim;\ + s << obj.manip << obj.obj->I15 << obj.delim;\ + s << obj.manip << obj.obj->I16 << obj.delim;\ + s << obj.manip << obj.obj->I17 << obj.delim;\ + s << obj.manip << obj.obj->I18 << obj.delim;\ + s << obj.manip << obj.obj->I19 << obj.delim;\ + s << obj.manip << obj.obj->I20 << obj.delim;\ + s << obj.manip << obj.obj->I21 << obj.delim;\ + s << obj.manip << obj.obj->I22 << obj.delim;\ + s << obj.manip << obj.obj->I23 << obj.delim;\ + s << obj.manip << obj.obj->I24 << obj.delim;\ + s << obj.manip << obj.obj->I25; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_field_list& obj) { \ + s << obj.manip << obj.obj->names[0] << obj.delim;\ + s << obj.manip << obj.obj->names[1] << obj.delim;\ + s << obj.manip << obj.obj->names[2] << obj.delim;\ + s << obj.manip << obj.obj->names[3] << obj.delim;\ + s << obj.manip << obj.obj->names[4] << obj.delim;\ + s << obj.manip << obj.obj->names[5] << obj.delim;\ + s << obj.manip << obj.obj->names[6] << obj.delim;\ + s << obj.manip << obj.obj->names[7] << obj.delim;\ + s << obj.manip << obj.obj->names[8] << obj.delim;\ + s << obj.manip << obj.obj->names[9] << obj.delim;\ + s << obj.manip << obj.obj->names[10] << obj.delim;\ + s << obj.manip << obj.obj->names[11] << obj.delim;\ + s << obj.manip << obj.obj->names[12] << obj.delim;\ + s << obj.manip << obj.obj->names[13] << obj.delim;\ + s << obj.manip << obj.obj->names[14] << obj.delim;\ + s << obj.manip << obj.obj->names[15] << obj.delim;\ + s << obj.manip << obj.obj->names[16] << obj.delim;\ + s << obj.manip << obj.obj->names[17] << obj.delim;\ + s << obj.manip << obj.obj->names[18] << obj.delim;\ + s << obj.manip << obj.obj->names[19] << obj.delim;\ + s << obj.manip << obj.obj->names[20] << obj.delim;\ + s << obj.manip << obj.obj->names[21] << obj.delim;\ + s << obj.manip << obj.obj->names[22] << obj.delim;\ + s << obj.manip << obj.obj->names[23] << obj.delim;\ + s << obj.manip << obj.obj->names[24]; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_equal_list& obj) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1 << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2 << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3 << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4 << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5 << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6 << obj.delim;\ + s << obj.obj->names[6] << obj.comp << obj.manip << obj.obj->I7 << obj.delim;\ + s << obj.obj->names[7] << obj.comp << obj.manip << obj.obj->I8 << obj.delim;\ + s << obj.obj->names[8] << obj.comp << obj.manip << obj.obj->I9 << obj.delim;\ + s << obj.obj->names[9] << obj.comp << obj.manip << obj.obj->I10 << obj.delim;\ + s << obj.obj->names[10] << obj.comp << obj.manip << obj.obj->I11 << obj.delim;\ + s << obj.obj->names[11] << obj.comp << obj.manip << obj.obj->I12 << obj.delim;\ + s << obj.obj->names[12] << obj.comp << obj.manip << obj.obj->I13 << obj.delim;\ + s << obj.obj->names[13] << obj.comp << obj.manip << obj.obj->I14 << obj.delim;\ + s << obj.obj->names[14] << obj.comp << obj.manip << obj.obj->I15 << obj.delim;\ + s << obj.obj->names[15] << obj.comp << obj.manip << obj.obj->I16 << obj.delim;\ + s << obj.obj->names[16] << obj.comp << obj.manip << obj.obj->I17 << obj.delim;\ + s << obj.obj->names[17] << obj.comp << obj.manip << obj.obj->I18 << obj.delim;\ + s << obj.obj->names[18] << obj.comp << obj.manip << obj.obj->I19 << obj.delim;\ + s << obj.obj->names[19] << obj.comp << obj.manip << obj.obj->I20 << obj.delim;\ + s << obj.obj->names[20] << obj.comp << obj.manip << obj.obj->I21 << obj.delim;\ + s << obj.obj->names[21] << obj.comp << obj.manip << obj.obj->I22 << obj.delim;\ + s << obj.obj->names[22] << obj.comp << obj.manip << obj.obj->I23 << obj.delim;\ + s << obj.obj->names[23] << obj.comp << obj.manip << obj.obj->I24 << obj.delim;\ + s << obj.obj->names[24] << obj.comp << obj.manip << obj.obj->I25; \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_value_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I6;\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I7;\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I8;\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I9;\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I10;\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I11;\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I12;\ + before = true; \ + } \ + if ((*obj.include)[12]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I13;\ + before = true; \ + } \ + if ((*obj.include)[13]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I14;\ + before = true; \ + } \ + if ((*obj.include)[14]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I15;\ + before = true; \ + } \ + if ((*obj.include)[15]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I16;\ + before = true; \ + } \ + if ((*obj.include)[16]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I17;\ + before = true; \ + } \ + if ((*obj.include)[17]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I18;\ + before = true; \ + } \ + if ((*obj.include)[18]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I19;\ + before = true; \ + } \ + if ((*obj.include)[19]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I20;\ + before = true; \ + } \ + if ((*obj.include)[20]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I21;\ + before = true; \ + } \ + if ((*obj.include)[21]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I22;\ + before = true; \ + } \ + if ((*obj.include)[22]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I23;\ + before = true; \ + } \ + if ((*obj.include)[23]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I24;\ + before = true; \ + } \ + if ((*obj.include)[24]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->I25;\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_field_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.manip << obj.obj->names[0];\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[1];\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[2];\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[3];\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[4];\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[5];\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[6];\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[7];\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[8];\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[9];\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[10];\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[11];\ + before = true; \ + } \ + if ((*obj.include)[12]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[12];\ + before = true; \ + } \ + if ((*obj.include)[13]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[13];\ + before = true; \ + } \ + if ((*obj.include)[14]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[14];\ + before = true; \ + } \ + if ((*obj.include)[15]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[15];\ + before = true; \ + } \ + if ((*obj.include)[16]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[16];\ + before = true; \ + } \ + if ((*obj.include)[17]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[17];\ + before = true; \ + } \ + if ((*obj.include)[18]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[18];\ + before = true; \ + } \ + if ((*obj.include)[19]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[19];\ + before = true; \ + } \ + if ((*obj.include)[20]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[20];\ + before = true; \ + } \ + if ((*obj.include)[21]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[21];\ + before = true; \ + } \ + if ((*obj.include)[22]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[22];\ + before = true; \ + } \ + if ((*obj.include)[23]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[23];\ + before = true; \ + } \ + if ((*obj.include)[24]) { \ + if (before) s << obj.delim;\ + s << obj.manip << obj.obj->names[24];\ + } \ + return s; \ + } \ + template \ + std::ostream& operator << (std::ostream& s, const NAME##_cus_equal_list& obj) { \ + bool before = false; \ + if ((*obj.include)[0]) { \ + s << obj.obj->names[0] << obj.comp << obj.manip << obj.obj->I1;\ + before = true; \ + } \ + if ((*obj.include)[1]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[1] << obj.comp << obj.manip << obj.obj->I2;\ + before = true; \ + } \ + if ((*obj.include)[2]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[2] << obj.comp << obj.manip << obj.obj->I3;\ + before = true; \ + } \ + if ((*obj.include)[3]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[3] << obj.comp << obj.manip << obj.obj->I4;\ + before = true; \ + } \ + if ((*obj.include)[4]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[4] << obj.comp << obj.manip << obj.obj->I5;\ + before = true; \ + } \ + if ((*obj.include)[5]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[5] << obj.comp << obj.manip << obj.obj->I6;\ + before = true; \ + } \ + if ((*obj.include)[6]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[6] << obj.comp << obj.manip << obj.obj->I7;\ + before = true; \ + } \ + if ((*obj.include)[7]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[7] << obj.comp << obj.manip << obj.obj->I8;\ + before = true; \ + } \ + if ((*obj.include)[8]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[8] << obj.comp << obj.manip << obj.obj->I9;\ + before = true; \ + } \ + if ((*obj.include)[9]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[9] << obj.comp << obj.manip << obj.obj->I10;\ + before = true; \ + } \ + if ((*obj.include)[10]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[10] << obj.comp << obj.manip << obj.obj->I11;\ + before = true; \ + } \ + if ((*obj.include)[11]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[11] << obj.comp << obj.manip << obj.obj->I12;\ + before = true; \ + } \ + if ((*obj.include)[12]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[12] << obj.comp << obj.manip << obj.obj->I13;\ + before = true; \ + } \ + if ((*obj.include)[13]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[13] << obj.comp << obj.manip << obj.obj->I14;\ + before = true; \ + } \ + if ((*obj.include)[14]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[14] << obj.comp << obj.manip << obj.obj->I15;\ + before = true; \ + } \ + if ((*obj.include)[15]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[15] << obj.comp << obj.manip << obj.obj->I16;\ + before = true; \ + } \ + if ((*obj.include)[16]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[16] << obj.comp << obj.manip << obj.obj->I17;\ + before = true; \ + } \ + if ((*obj.include)[17]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[17] << obj.comp << obj.manip << obj.obj->I18;\ + before = true; \ + } \ + if ((*obj.include)[18]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[18] << obj.comp << obj.manip << obj.obj->I19;\ + before = true; \ + } \ + if ((*obj.include)[19]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[19] << obj.comp << obj.manip << obj.obj->I20;\ + before = true; \ + } \ + if ((*obj.include)[20]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[20] << obj.comp << obj.manip << obj.obj->I21;\ + before = true; \ + } \ + if ((*obj.include)[21]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[21] << obj.comp << obj.manip << obj.obj->I22;\ + before = true; \ + } \ + if ((*obj.include)[22]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[22] << obj.comp << obj.manip << obj.obj->I23;\ + before = true; \ + } \ + if ((*obj.include)[23]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[23] << obj.comp << obj.manip << obj.obj->I24;\ + before = true; \ + } \ + if ((*obj.include)[24]) { \ + if (before) s << obj.delim;\ + s << obj.obj->names[24] << obj.comp << obj.manip << obj.obj->I25;\ + } \ + return s; \ + } \ + template \ + inline NAME##_value_list NAME::value_list(const char *d, Manip m) const { \ + return NAME##_value_list (this, d, m); \ + } \ + template \ + inline NAME##_field_list NAME::field_list(const char *d, Manip m) const { \ + return NAME##_field_list (this, d, m); \ + } \ + template \ + inline NAME##_equal_list NAME::equal_list(const char *d, const char *c, Manip m) const { \ + return NAME##_equal_list (this, d, c, m); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21, bool i22, bool i23, bool i24, bool i25) const {\ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21, bool i22, bool i23, bool i24, bool i25) const { \ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + bool i1, bool i2, bool i3, bool i4, bool i5, bool i6, bool i7, bool i8, bool i9, bool i10, bool i11, bool i12, bool i13, bool i14, bool i15, bool i16, bool i17, bool i18, bool i19, bool i20, bool i21, bool i22, bool i23, bool i24, bool i25) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21, NAME##_enum i22, NAME##_enum i23, NAME##_enum i24, NAME##_enum i25) const { \ + return NAME##_cus_value_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25); \ + } \ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21, NAME##_enum i22, NAME##_enum i23, NAME##_enum i24, NAME##_enum i25) const {\ + return NAME##_cus_field_list (this, d, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25); \ + } \ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m, \ + NAME##_enum i1, NAME##_enum i2, NAME##_enum i3, NAME##_enum i4, NAME##_enum i5, NAME##_enum i6, NAME##_enum i7, NAME##_enum i8, NAME##_enum i9, NAME##_enum i10, NAME##_enum i11, NAME##_enum i12, NAME##_enum i13, NAME##_enum i14, NAME##_enum i15, NAME##_enum i16, NAME##_enum i17, NAME##_enum i18, NAME##_enum i19, NAME##_enum i20, NAME##_enum i21, NAME##_enum i22, NAME##_enum i23, NAME##_enum i24, NAME##_enum i25) const { \ + return NAME##_cus_equal_list (this, d, c, m, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, i25); \ + } \ + template \ + inline NAME##_cus_value_list NAME::value_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_value_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_field_list NAME::field_list(const char *d, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_field_list (this, d, m, i);\ + }\ + template \ + inline NAME##_cus_equal_list NAME::equal_list(const char *d, const char *c, Manip m,\ + std::vector *i) const {\ + return NAME##_cus_equal_list (this, d, c, m, i);\ + }\ + template \ + inline NAME##_cus_value_list \ + NAME::value_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, value, NUM);\ + }\ + template \ + inline NAME##_cus_field_list \ + NAME::field_list(const char *d, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_def_##CMP(NAME, field, NUM);\ + }\ + template \ + inline NAME##_cus_equal_list \ + NAME::equal_list(const char *d, const char *c, Manip m, mysqlpp::sql_cmp_type /*sc*/) const {\ + sql_compare_type_defe_##CMP(NAME, equal, NUM);\ + }\ + template \ + void populate_##NAME(NAME *s, const mysqlpp::Row &row) { \ + mysqlpp::NoExceptions ignore_schema_mismatches(row);\ + s->I1 = row[N1].conv(T1());\ + s->I2 = row[N2].conv(T2());\ + s->I3 = row[N3].conv(T3());\ + s->I4 = row[N4].conv(T4());\ + s->I5 = row[N5].conv(T5());\ + s->I6 = row[N6].conv(T6());\ + s->I7 = row[N7].conv(T7());\ + s->I8 = row[N8].conv(T8());\ + s->I9 = row[N9].conv(T9());\ + s->I10 = row[N10].conv(T10());\ + s->I11 = row[N11].conv(T11());\ + s->I12 = row[N12].conv(T12());\ + s->I13 = row[N13].conv(T13());\ + s->I14 = row[N14].conv(T14());\ + s->I15 = row[N15].conv(T15());\ + s->I16 = row[N16].conv(T16());\ + s->I17 = row[N17].conv(T17());\ + s->I18 = row[N18].conv(T18());\ + s->I19 = row[N19].conv(T19());\ + s->I20 = row[N20].conv(T20());\ + s->I21 = row[N21].conv(T21());\ + s->I22 = row[N22].conv(T22());\ + s->I23 = row[N23].conv(T23());\ + s->I24 = row[N24].conv(T24());\ + s->I25 = row[N25].conv(T25());\ + } \ + inline NAME::NAME(const mysqlpp::Row& row) :\ + table_override_(0)\ + {\ + populate_##NAME(this, row);\ + }\ + inline void NAME::set(const mysqlpp::Row& row)\ + {\ + populate_##NAME(this, row);\ + }\ + sql_COMPARE__##CMP(NAME, I1, I2, I3, I4, I5, I6, I7, I8, I9, I10, I11, I12, I13, I14, I15, I16, I17, I18, I19, I20, I21, I22, I23, I24, I25 ) + +#define sql_create_25(NAME, CMP, CONTR, T1, I1, T2, I2, T3, I3, T4, I4, T5, I5, T6, I6, T7, I7, T8, I8, T9, I9, T10, I10, T11, I11, T12, I12, T13, I13, T14, I14, T15, I15, T16, I16, T17, I17, T18, I18, T19, I19, T20, I20, T21, I21, T22, I22, T23, I23, T24, I24, T25, I25) \ + sql_create_complete_25(NAME, CMP, CONTR, T1, I1, #I1, T2, I2, #I2, T3, I3, #I3, T4, I4, #I4, T5, I5, #I5, T6, I6, #I6, T7, I7, #I7, T8, I8, #I8, T9, I9, #I9, T10, I10, #I10, T11, I11, #I11, T12, I12, #I12, T13, I13, #I13, T14, I14, #I14, T15, I15, #I15, T16, I16, #I16, T17, I17, #I17, T18, I18, #I18, T19, I19, #I19, T20, I20, #I20, T21, I21, #I21, T22, I22, #I22, T23, I23, #I23, T24, I24, #I24, T25, I25, #I25) \ + +// --------------------------------------------------- +// End Create 25 +// --------------------------------------------------- + + +} // end namespace mysqlpp + +#endif // !defined(MYSQLPP_SSQLS_H) + Index: config/acx_pthread.m4 ================================================================== --- config/acx_pthread.m4 +++ config/acx_pthread.m4 @@ -1,275 +1,271 @@ -# =========================================================================== -# http://autoconf-archive.cryp.to/acx_pthread.html -# =========================================================================== -# -# SYNOPSIS -# -# ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) -# -# DESCRIPTION -# -# This macro figures out how to build C programs using POSIX threads. It -# sets the PTHREAD_LIBS output variable to the threads library and linker -# flags, and the PTHREAD_CFLAGS output variable to any special C compiler -# flags that are needed. (The user can also force certain compiler -# flags/libs to be tested by setting these environment variables.) -# -# Also sets PTHREAD_CC to any special C compiler that is needed for -# multi-threaded programs (defaults to the value of CC otherwise). (This -# is necessary on AIX to use the special cc_r compiler alias.) -# -# NOTE: You are assumed to not only compile your program with these flags, -# but also link it with them as well. e.g. you should link with -# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS -# -# If you are only building threads programs, you may wish to use these -# variables in your default LIBS, CFLAGS, and CC: -# -# LIBS="$PTHREAD_LIBS $LIBS" -# CFLAGS="$CFLAGS $PTHREAD_CFLAGS" -# CC="$PTHREAD_CC" -# -# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant -# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name -# (e.g. PTHREAD_CREATE_UNDETACHED on AIX). -# -# ACTION-IF-FOUND is a list of shell commands to run if a threads library -# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it -# is not found. If ACTION-IF-FOUND is not specified, the default action -# will define HAVE_PTHREAD. -# -# Please let the authors know if this macro fails on any platform, or if -# you have any other suggestions or comments. This macro was based on work -# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help -# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by -# Alejandro Forero Cuervo to the autoconf macro repository. We are also -# grateful for the helpful feedback of numerous users. -# -# LAST MODIFICATION -# -# 2008-04-12 -# -# COPYLEFT -# -# Copyright (c) 2008 Steven G. Johnson -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation, either version 3 of the License, or (at your -# option) any later version. -# -# This program 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 General -# Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . -# -# As a special exception, the respective Autoconf Macro's copyright owner -# gives unlimited permission to copy, distribute and modify the configure -# scripts that are the output of Autoconf when processing the Macro. You -# need not follow the terms of the GNU General Public License when using -# or distributing such scripts, even though portions of the text of the -# Macro appear in them. The GNU General Public License (GPL) does govern -# all other use of the material that constitutes the Autoconf Macro. -# -# This special exception to the GPL applies to versions of the Autoconf -# Macro released by the Autoconf Macro Archive. When you make and -# distribute a modified version of the Autoconf Macro, you may extend this -# special exception to the GPL to apply to your modified version as well. - -AC_DEFUN([ACX_PTHREAD], [ -AC_REQUIRE([AC_CANONICAL_HOST]) -AC_LANG_SAVE -AC_LANG_C -acx_pthread_ok=no - -# We used to check for pthread.h first, but this fails if pthread.h -# requires special compiler flags (e.g. on True64 or Sequent). -# It gets checked for in the link test anyway. - -# First of all, check if the user has set any of the PTHREAD_LIBS, -# etcetera environment variables, and if threads linking works using -# them: -if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) - AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes) - AC_MSG_RESULT($acx_pthread_ok) - if test x"$acx_pthread_ok" = xno; then - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" - fi - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" -fi - -# We must check for the threads library under a number of different -# names; the ordering is very important because some systems -# (e.g. DEC) have both -lpthread and -lpthreads, where one of the -# libraries is broken (non-POSIX). - -# Create a list of thread flags to try. Items starting with a "-" are -# C compiler flags, and other items are library names, except for "none" -# which indicates that we try without any flags at all, and "pthread-config" -# which is a program returning the flags for the Pth emulation library. - -acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" - -# The ordering *is* (sometimes) important. Some notes on the -# individual items follow: - -# pthreads: AIX (must check this before -lpthread) -# none: in case threads are in libc; should be tried before -Kthread and -# other compiler flags to prevent continual compiler warnings -# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) -# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) -# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) -# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) -# -pthreads: Solaris/gcc -# -mthreads: Mingw32/gcc, Lynx/gcc -# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it -# doesn't hurt to check since this sometimes defines pthreads too; -# also defines -D_REENTRANT) -# ... -mt is also the pthreads flag for HP/aCC -# pthread: Linux, etcetera -# --thread-safe: KAI C++ -# pthread-config: use pthread-config program (for GNU Pth library) - -case "${host_cpu}-${host_os}" in - *solaris*) - - # On Solaris (at least, for some versions), libc contains stubbed - # (non-functional) versions of the pthreads routines, so link-based - # tests will erroneously succeed. (We need to link with -pthreads/-mt/ - # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather - # a function called by this macro, so we could check for that, but - # who knows whether they'll stub that too in a future libc.) So, - # we'll just look for -pthreads and -lpthread first: - - acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags" - ;; -esac - -if test x"$acx_pthread_ok" = xno; then -for flag in $acx_pthread_flags; do - - case $flag in - none) - AC_MSG_CHECKING([whether pthreads work without any flags]) - ;; - - -*) - AC_MSG_CHECKING([whether pthreads work with $flag]) - PTHREAD_CFLAGS="$flag" - ;; - - pthread-config) - AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no) - if test x"$acx_pthread_config" = xno; then continue; fi - PTHREAD_CFLAGS="`pthread-config --cflags`" - PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" - ;; - - *) - AC_MSG_CHECKING([for the pthreads library -l$flag]) - PTHREAD_LIBS="-l$flag" - ;; - esac - - save_LIBS="$LIBS" - save_CFLAGS="$CFLAGS" - LIBS="$PTHREAD_LIBS $LIBS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Check for various functions. We must include pthread.h, - # since some functions may be macros. (On the Sequent, we - # need a special flag -Kthread to make this header compile.) - # We check for pthread_join because it is in -lpthread on IRIX - # while pthread_create is in libc. We check for pthread_attr_init - # due to DEC craziness with -lpthreads. We check for - # pthread_cleanup_push because it is one of the few pthread - # functions on Solaris that doesn't have a non-functional libc stub. - # We try pthread_create on general principles. - AC_TRY_LINK([#include ], - [pthread_t th; pthread_join(th, 0); - pthread_attr_init(0); pthread_cleanup_push(0, 0); - pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], - [acx_pthread_ok=yes]) - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - AC_MSG_RESULT($acx_pthread_ok) - if test "x$acx_pthread_ok" = xyes; then - break; - fi - - PTHREAD_LIBS="" - PTHREAD_CFLAGS="" -done -fi - -# Various other checks: -if test "x$acx_pthread_ok" = xyes; then - save_LIBS="$LIBS" - LIBS="$PTHREAD_LIBS $LIBS" - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $PTHREAD_CFLAGS" - - # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. - AC_MSG_CHECKING([for joinable pthread attribute]) - attr_name=unknown - for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do - AC_TRY_LINK([#include ], [int attr=$attr; return attr;], - [attr_name=$attr; break]) - done - AC_MSG_RESULT($attr_name) - if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then - AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name, - [Define to necessary symbol if this constant - uses a non-standard name on your system.]) - fi - - AC_MSG_CHECKING([if more special flags are required for pthreads]) - flag=no - case "${host_cpu}-${host_os}" in - *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; - *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; - esac - AC_MSG_RESULT(${flag}) - if test "x$flag" != xno; then - PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" - fi - - LIBS="$save_LIBS" - CFLAGS="$save_CFLAGS" - - # More AIX lossage: must compile with xlc_r or cc_r - if test x"$GCC" != xyes; then - AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC}) - else - PTHREAD_CC=$CC - fi -else - PTHREAD_CC="$CC" -fi - -AC_SUBST(PTHREAD_LIBS) -AC_SUBST(PTHREAD_CFLAGS) -AC_SUBST(PTHREAD_CC) - -# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: -if test x"$acx_pthread_ok" = xyes; then - ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) - : -else - acx_pthread_ok=no - $2 -fi -AC_LANG_RESTORE -])dnl ACX_PTHREAD +# ========================================================================= +# This makefile was generated by +# Bakefile 0.2.0 (http://bakefile.sourceforge.net) +# Do not modify, all changes will be overwritten! +# ========================================================================= + + + +# ------------------------------------------------------------------------- +# These are configurable options: +# ------------------------------------------------------------------------- + +# C++ compiler +CXX = g++ + +# Standard flags for C++ +CXXFLAGS = + +# Standard preprocessor flags (common for CC and CXX) +CPPFLAGS = + +# Standard linker flags +LDFLAGS = + +# Type of compiled binaries [debug,release] +BUILD = debug + + + +# ------------------------------------------------------------------------- +# Do not modify the rest of this file! +# ------------------------------------------------------------------------- + +### Variables: ### + +CPPDEPS = -MT$@ -MF$@.d -MD +UTIL_CXXFLAGS = -mthreads $(__DEBUGINFO) -I..\lib -D_UNICODE -Ic:\mysql\include \ + -DMYSQLPP_NO_DLL $(CPPFLAGS) $(CXXFLAGS) +UTIL_OBJECTS = \ + util_util.o +RESETDB_CXXFLAGS = -mthreads $(__DEBUGINFO) -I..\lib -D_UNICODE \ + -Ic:\mysql\include -DMYSQLPP_NO_DLL $(CPPFLAGS) $(CXXFLAGS) +RESETDB_OBJECTS = \ + resetdb_resetdb.o +SIMPLE1_CXXFLAGS = -mthreads $(__DEBUGINFO) -I..\lib -D_UNICODE \ + -Ic:\mysql\include -DMYSQLPP_NO_DLL $(CPPFLAGS) $(CXXFLAGS) +SIMPLE1_OBJECTS = \ + simple1_simple1.o +SIMPLE2_CXXFLAGS = -mthreads $(__DEBUGINFO) -I..\lib -D_UNICODE \ + -Ic:\mysql\include -DMYSQLPP_NO_DLL $(CPPFLAGS) $(CXXFLAGS) +SIMPLE2_OBJECTS = \ + simple2_simple2.o +SIMPLE3_CXXFLAGS = -mthreads $(__DEBUGINFO) -I..\lib -D_UNICODE \ + -Ic:\mysql\include -DMYSQLPP_NO_DLL $(CPPFLAGS) $(CXXFLAGS) +SIMPLE3_OBJECTS = \ + simple3_simple3.o +USEQUERY_CXXFLAGS = -mthreads $(__DEBUGINFO) -I..\lib -D_UNICODE \ + -Ic:\mysql\include -DMYSQLPP_NO_DLL $(CPPFLAGS) $(CXXFLAGS) +USEQUERY_OBJECTS = \ + usequery_usequery.o +MULTIQUERY_CXXFLAGS = -mthreads $(__DEBUGINFO) -I..\lib -D_UNICODE \ + -Ic:\mysql\include -DMYSQLPP_NO_DLL $(CPPFLAGS) $(CXXFLAGS) +MULTIQUERY_OBJECTS = \ + multiquery_multiquery.o +CUSTOM1_CXXFLAGS = -mthreads $(__DEBUGINFO) -I..\lib -D_UNICODE \ + -Ic:\mysql\include -DMYSQLPP_NO_DLL $(CPPFLAGS) $(CXXFLAGS) +CUSTOM1_OBJECTS = \ + custom1_custom1.o +CUSTOM2_CXXFLAGS = -mthreads $(__DEBUGINFO) -I..\lib -D_UNICODE \ + -Ic:\mysql\include -DMYSQLPP_NO_DLL $(CPPFLAGS) $(CXXFLAGS) +CUSTOM2_OBJECTS = \ + custom2_custom2.o +CUSTOM3_CXXFLAGS = -mthreads $(__DEBUGINFO) -I..\lib -D_UNICODE \ + -Ic:\mysql\include -DMYSQLPP_NO_DLL $(CPPFLAGS) $(CXXFLAGS) +CUSTOM3_OBJECTS = \ + custom3_custom3.o +CUSTOM4_CXXFLAGS = -mthreads $(__DEBUGINFO) -I..\lib -D_UNICODE \ + -Ic:\mysql\include -DMYSQLPP_NO_DLL $(CPPFLAGS) $(CXXFLAGS) +CUSTOM4_OBJECTS = \ + custom4_custom4.o +CUSTOM5_CXXFLAGS = -mthreads $(__DEBUGINFO) -I..\lib -D_UNICODE \ + -Ic:\mysql\include -DMYSQLPP_NO_DLL $(CPPFLAGS) $(CXXFLAGS) +CUSTOM5_OBJECTS = \ + custom5_custom5.o +CUSTOM6_CXXFLAGS = -mthreads $(__DEBUGINFO) -I..\lib -D_UNICODE \ + -Ic:\mysql\include -DMYSQLPP_NO_DLL $(CPPFLAGS) $(CXXFLAGS) +CUSTOM6_OBJECTS = \ + custom6_custom6.o +DBINFO_CXXFLAGS = -mthreads $(__DEBUGINFO) -I..\lib -D_UNICODE \ + -Ic:\mysql\include -DMYSQLPP_NO_DLL $(CPPFLAGS) $(CXXFLAGS) +DBINFO_OBJECTS = \ + dbinfo_dbinfo.o +FIELDINF1_CXXFLAGS = -mthreads $(__DEBUGINFO) -I..\lib -D_UNICODE \ + -Ic:\mysql\include -DMYSQLPP_NO_DLL $(CPPFLAGS) $(CXXFLAGS) +FIELDINF1_OBJECTS = \ + fieldinf1_fieldinf1.o +XACTION_CXXFLAGS = -mthreads $(__DEBUGINFO) -I..\lib -D_UNICODE \ + -Ic:\mysql\include -DMYSQLPP_NO_DLL $(CPPFLAGS) $(CXXFLAGS) +XACTION_OBJECTS = \ + xaction_xaction.o +CGI_IMAGE_CXXFLAGS = -mthreads $(__DEBUGINFO) -I..\lib -D_UNICODE \ + -Ic:\mysql\include -DMYSQLPP_NO_DLL $(CPPFLAGS) $(CXXFLAGS) +CGI_IMAGE_OBJECTS = \ + cgi_image_cgi_image.o +LOAD_FILE_CXXFLAGS = -mthreads $(__DEBUGINFO) -I..\lib -D_UNICODE \ + -Ic:\mysql\include -DMYSQLPP_NO_DLL $(CPPFLAGS) $(CXXFLAGS) +LOAD_FILE_OBJECTS = \ + load_file_load_file.o +UPDEL_CXXFLAGS = -mthreads $(__DEBUGINFO) -I..\lib -D_UNICODE -Ic:\mysql\include \ + -DMYSQLPP_NO_DLL $(CPPFLAGS) $(CXXFLAGS) +UPDEL_OBJECTS = \ + updel_updel.o + +### Conditionally set variables: ### + +ifeq ($(BUILD),debug) +__DEBUGINFO = -g +endif +ifeq ($(BUILD),release) +__DEBUGINFO = +endif + + +### Targets: ### + +all: libmysqlpp_util.a resetdb.exe simple1.exe simple2.exe simple3.exe usequery.exe multiquery.exe custom1.exe custom2.exe custom3.exe custom4.exe custom5.exe custom6.exe dbinfo.exe fieldinf1.exe xaction.exe cgi_image.exe load_file.exe updel.exe + +clean: + -if exist .\*.o del .\*.o + -if exist .\*.d del .\*.d + -if exist libmysqlpp_util.a del libmysqlpp_util.a + -if exist resetdb.exe del resetdb.exe + -if exist simple1.exe del simple1.exe + -if exist simple2.exe del simple2.exe + -if exist simple3.exe del simple3.exe + -if exist usequery.exe del usequery.exe + -if exist multiquery.exe del multiquery.exe + -if exist custom1.exe del custom1.exe + -if exist custom2.exe del custom2.exe + -if exist custom3.exe del custom3.exe + -if exist custom4.exe del custom4.exe + -if exist custom5.exe del custom5.exe + -if exist custom6.exe del custom6.exe + -if exist dbinfo.exe del dbinfo.exe + -if exist fieldinf1.exe del fieldinf1.exe + -if exist xaction.exe del xaction.exe + -if exist cgi_image.exe del cgi_image.exe + -if exist load_file.exe del load_file.exe + -if exist updel.exe del updel.exe + +libmysqlpp_util.a: $(UTIL_OBJECTS) + if exist $@ del $@ + ar rcu $@ $(UTIL_OBJECTS) + ranlib $@ + +resetdb.exe: $(RESETDB_OBJECTS) libmysqlpp_util.a + $(CXX) -o $@ $(RESETDB_OBJECTS) $(LDFLAGS) -L. -mthreads $(__DEBUGINFO) -Lc:\mysql\lib\opt -Wl,--enable-auto-import -L..\lib -lmysqlpp_util -lmysqlpp -lmysqlclient + +simple1.exe: $(SIMPLE1_OBJECTS) libmysqlpp_util.a + $(CXX) -o $@ $(SIMPLE1_OBJECTS) $(LDFLAGS) -L. -mthreads $(__DEBUGINFO) -Lc:\mysql\lib\opt -Wl,--enable-auto-import -L..\lib -lmysqlpp_util -lmysqlpp -lmysqlclient + +simple2.exe: $(SIMPLE2_OBJECTS) libmysqlpp_util.a + $(CXX) -o $@ $(SIMPLE2_OBJECTS) $(LDFLAGS) -L. -mthreads $(__DEBUGINFO) -Lc:\mysql\lib\opt -Wl,--enable-auto-import -L..\lib -lmysqlpp_util -lmysqlpp -lmysqlclient + +simple3.exe: $(SIMPLE3_OBJECTS) libmysqlpp_util.a + $(CXX) -o $@ $(SIMPLE3_OBJECTS) $(LDFLAGS) -L. -mthreads $(__DEBUGINFO) -Lc:\mysql\lib\opt -Wl,--enable-auto-import -L..\lib -lmysqlpp_util -lmysqlpp -lmysqlclient + +usequery.exe: $(USEQUERY_OBJECTS) libmysqlpp_util.a + $(CXX) -o $@ $(USEQUERY_OBJECTS) $(LDFLAGS) -L. -mthreads $(__DEBUGINFO) -Lc:\mysql\lib\opt -Wl,--enable-auto-import -L..\lib -lmysqlpp_util -lmysqlpp -lmysqlclient + +multiquery.exe: $(MULTIQUERY_OBJECTS) libmysqlpp_util.a + $(CXX) -o $@ $(MULTIQUERY_OBJECTS) $(LDFLAGS) -L. -mthreads $(__DEBUGINFO) -Lc:\mysql\lib\opt -Wl,--enable-auto-import -L..\lib -lmysqlpp_util -lmysqlpp -lmysqlclient + +custom1.exe: $(CUSTOM1_OBJECTS) libmysqlpp_util.a + $(CXX) -o $@ $(CUSTOM1_OBJECTS) $(LDFLAGS) -L. -mthreads $(__DEBUGINFO) -Lc:\mysql\lib\opt -Wl,--enable-auto-import -L..\lib -lmysqlpp_util -lmysqlpp -lmysqlclient + +custom2.exe: $(CUSTOM2_OBJECTS) libmysqlpp_util.a + $(CXX) -o $@ $(CUSTOM2_OBJECTS) $(LDFLAGS) -L. -mthreads $(__DEBUGINFO) -Lc:\mysql\lib\opt -Wl,--enable-auto-import -L..\lib -lmysqlpp_util -lmysqlpp -lmysqlclient + +custom3.exe: $(CUSTOM3_OBJECTS) libmysqlpp_util.a + $(CXX) -o $@ $(CUSTOM3_OBJECTS) $(LDFLAGS) -L. -mthreads $(__DEBUGINFO) -Lc:\mysql\lib\opt -Wl,--enable-auto-import -L..\lib -lmysqlpp_util -lmysqlpp -lmysqlclient + +custom4.exe: $(CUSTOM4_OBJECTS) libmysqlpp_util.a + $(CXX) -o $@ $(CUSTOM4_OBJECTS) $(LDFLAGS) -L. -mthreads $(__DEBUGINFO) -Lc:\mysql\lib\opt -Wl,--enable-auto-import -L..\lib -lmysqlpp_util -lmysqlpp -lmysqlclient + +custom5.exe: $(CUSTOM5_OBJECTS) libmysqlpp_util.a + $(CXX) -o $@ $(CUSTOM5_OBJECTS) $(LDFLAGS) -L. -mthreads $(__DEBUGINFO) -Lc:\mysql\lib\opt -Wl,--enable-auto-import -L..\lib -lmysqlpp_util -lmysqlpp -lmysqlclient + +custom6.exe: $(CUSTOM6_OBJECTS) libmysqlpp_util.a + $(CXX) -o $@ $(CUSTOM6_OBJECTS) $(LDFLAGS) -L. -mthreads $(__DEBUGINFO) -Lc:\mysql\lib\opt -Wl,--enable-auto-import -L..\lib -lmysqlpp_util -lmysqlpp -lmysqlclient + +dbinfo.exe: $(DBINFO_OBJECTS) libmysqlpp_util.a + $(CXX) -o $@ $(DBINFO_OBJECTS) $(LDFLAGS) -L. -mthreads $(__DEBUGINFO) -Lc:\mysql\lib\opt -Wl,--enable-auto-import -L..\lib -lmysqlpp_util -lmysqlpp -lmysqlclient + +fieldinf1.exe: $(FIELDINF1_OBJECTS) libmysqlpp_util.a + $(CXX) -o $@ $(FIELDINF1_OBJECTS) $(LDFLAGS) -L. -mthreads $(__DEBUGINFO) -Lc:\mysql\lib\opt -Wl,--enable-auto-import -L..\lib -lmysqlpp_util -lmysqlpp -lmysqlclient + +xaction.exe: $(XACTION_OBJECTS) libmysqlpp_util.a + $(CXX) -o $@ $(XACTION_OBJECTS) $(LDFLAGS) -L. -mthreads $(__DEBUGINFO) -Lc:\mysql\lib\opt -Wl,--enable-auto-import -L..\lib -lmysqlpp_util -lmysqlpp -lmysqlclient + +cgi_image.exe: $(CGI_IMAGE_OBJECTS) + $(CXX) -o $@ $(CGI_IMAGE_OBJECTS) $(LDFLAGS) -mthreads $(__DEBUGINFO) -Lc:\mysql\lib\opt -Wl,--enable-auto-import -L..\lib -lmysqlpp -lmysqlclient + +load_file.exe: $(LOAD_FILE_OBJECTS) + $(CXX) -o $@ $(LOAD_FILE_OBJECTS) $(LDFLAGS) -mthreads $(__DEBUGINFO) -Lc:\mysql\lib\opt -Wl,--enable-auto-import -L..\lib -lmysqlpp -lmysqlclient + +updel.exe: $(UPDEL_OBJECTS) + $(CXX) -o $@ $(UPDEL_OBJECTS) $(LDFLAGS) -mthreads $(__DEBUGINFO) -Lc:\mysql\lib\opt -Wl,--enable-auto-import -L..\lib -lmysqlpp -lmysqlclient + +util_util.o: ./util.cpp + $(CXX) -c -o $@ $(UTIL_CXXFLAGS) $(CPPDEPS) $< + +resetdb_resetdb.o: ./resetdb.cpp + $(CXX) -c -o $@ $(RESETDB_CXXFLAGS) $(CPPDEPS) $< + +simple1_simple1.o: ./simple1.cpp + $(CXX) -c -o $@ $(SIMPLE1_CXXFLAGS) $(CPPDEPS) $< + +simple2_simple2.o: ./simple2.cpp + $(CXX) -c -o $@ $(SIMPLE2_CXXFLAGS) $(CPPDEPS) $< + +simple3_simple3.o: ./simple3.cpp + $(CXX) -c -o $@ $(SIMPLE3_CXXFLAGS) $(CPPDEPS) $< + +usequery_usequery.o: ./usequery.cpp + $(CXX) -c -o $@ $(USEQUERY_CXXFLAGS) $(CPPDEPS) $< + +multiquery_multiquery.o: ./multiquery.cpp + $(CXX) -c -o $@ $(MULTIQUERY_CXXFLAGS) $(CPPDEPS) $< + +custom1_custom1.o: ./custom1.cpp + $(CXX) -c -o $@ $(CUSTOM1_CXXFLAGS) $(CPPDEPS) $< + +custom2_custom2.o: ./custom2.cpp + $(CXX) -c -o $@ $(CUSTOM2_CXXFLAGS) $(CPPDEPS) $< + +custom3_custom3.o: ./custom3.cpp + $(CXX) -c -o $@ $(CUSTOM3_CXXFLAGS) $(CPPDEPS) $< + +custom4_custom4.o: ./custom4.cpp + $(CXX) -c -o $@ $(CUSTOM4_CXXFLAGS) $(CPPDEPS) $< + +custom5_custom5.o: ./custom5.cpp + $(CXX) -c -o $@ $(CUSTOM5_CXXFLAGS) $(CPPDEPS) $< + +custom6_custom6.o: ./custom6.cpp + $(CXX) -c -o $@ $(CUSTOM6_CXXFLAGS) $(CPPDEPS) $< + +dbinfo_dbinfo.o: ./dbinfo.cpp + $(CXX) -c -o $@ $(DBINFO_CXXFLAGS) $(CPPDEPS) $< + +fieldinf1_fieldinf1.o: ./fieldinf1.cpp + $(CXX) -c -o $@ $(FIELDINF1_CXXFLAGS) $(CPPDEPS) $< + +xaction_xaction.o: ./xaction.cpp + $(CXX) -c -o $@ $(XACTION_CXXFLAGS) $(CPPDEPS) $< + +cgi_image_cgi_image.o: ./cgi_image.cpp + $(CXX) -c -o $@ $(CGI_IMAGE_CXXFLAGS) $(CPPDEPS) $< + +load_file_load_file.o: ./load_file.cpp + $(CXX) -c -o $@ $(LOAD_FILE_CXXFLAGS) $(CPPDEPS) $< + +updel_updel.o: ./updel.cpp + $(CXX) -c -o $@ $(UPDEL_CXXFLAGS) $(CPPDEPS) $< + +.PHONY: all clean + + +# Dependencies tracking: +-include ./*.d Index: config/libm.m4 ================================================================== --- config/libm.m4 +++ config/libm.m4 @@ -1,37 +1,26 @@ -dnl @synopsis LIB_MATH -dnl -dnl This macro figures out how whether programs using C's math routines -dnl need to link to libm or not. This is common on SysV Unices. -dnl -dnl @category C -dnl @author Warren Young -dnl @version 1.2, 2006-03-06 - -AC_DEFUN([LIB_MATH], -[ - AC_MSG_CHECKING([whether -lm is needed to use C math functions]) - - MYSQLPP_EXTRA_LIBS= - TRY_LIBM=no - AC_TRY_LINK( - [ #include ], - [ floor(0); ], AC_MSG_RESULT(no), TRY_LIBM=yes) - - if test "x$TRY_LIBM" = "xyes" - then - save_LIBS=$LIBS - LIBS="$LIBS -lm" - AC_TRY_LINK( - [ #include ], - [ floor(0); ], - [ - MYSQLPP_EXTRA_LIBS=-lm - AC_MSG_RESULT(yes) - ], - AC_MSG_ERROR([Failed to build program containing math functions!])) - LIBS="$save_LIBS" - fi - - AC_SUBST(MYSQLPP_EXTRA_LIBS) -]) - + + + + + $(DOLLAR)$(DOLLAR) + yes + + single + + multi + + + + + + on + off + + Index: config/localtime_r.m4 ================================================================== --- config/localtime_r.m4 +++ config/localtime_r.m4 @@ -1,30 +1,38 @@ -dnl @synopsis AX_C_LOCALTIME_R -dnl -dnl This macro determines whether the C runtime library contains -dnl localtime_r(), a thread-safe replacement for localtime(). -dnl -dnl @version 1.0, 2007/02/20 -dnl @author Warren Young -AC_DEFUN([AX_C_LOCALTIME_R], -[ - AC_MSG_CHECKING([for localtime_r()]) - - AC_TRY_RUN([ - #include - int main(void) - { - time_t tt; - struct tm stm; - localtime_r(&tt, &stm); - return 0; - } - ], [localtime_r_found=yes], [localtime_r_found=no], [localtime_r_found=no]) - - AC_MSG_RESULT([$localtime_r_found]) - if test x"$localtime_r_found" = xyes - then - AC_DEFINE(HAVE_LOCALTIME_R, 1, - [Define if you have the localtime_r() facility]) - fi -]) dnl AX_C_LOCALTIME_R +@echo off +if "%1" == "" goto error + +set BASE_DIR=c:\mysql++ +set INST_INC_DIR=%BASE_DIR%\include +set INST_LIB_DIR=%BASE_DIR%\%1 + +if not exist %BASE_DIR% mkdir %BASE_DIR% +if not exist %INST_INC_DIR% mkdir %INST_INC_DIR% +if not exist %INST_LIB_DIR% mkdir %INST_LIB_DIR% +if not exist %INST_LIB_DIR%\debug mkdir %INST_LIB_DIR%\debug +if not exist %INST_LIB_DIR%\release mkdir %INST_LIB_DIR%\release + +copy lib\*.h "%INST_INC_DIR%" > NUL + +if exist *.a goto install_mingw +copy debug\*.dll "%INST_LIB_DIR%\debug" > NUL +copy debug\*.lib "%INST_LIB_DIR%\debug" > NUL +copy release\*.dll "%INST_LIB_DIR%\release" > NUL +copy release\*.lib "%INST_LIB_DIR%\release" > NUL +goto install_done +:install_mingw +copy *.a "%INST_LIB_DIR%\debug" > NUL +echo WARNING: I assume you built a debug version of the library, as that +echo is what you get with MinGW unless you make a special effort. You +echo must do a manual install if you make a release version. + +:install_done +echo MySQL++ (%1 version) installed successfully! +goto end + +:error +echo usage: install [subdir] +echo. +echo Installs MySQL++ into the given subdirectory of %BASE_DIR% + +:end Index: config/mysql++.m4 ================================================================== --- config/mysql++.m4 +++ config/mysql++.m4 @@ -1,131 +1,198 @@ -#-###################################################################### -# mysql++.m4 - Example autoconf macro showing how to find MySQL++ -# library and header files. -# -# Copyright (c) 2004-2009 by Educational Technology Resources, Inc. -# -# This file 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. -# -# This program 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 -#-###################################################################### - -dnl @synopsis MYSQLPP_DEVEL -dnl -dnl This macro tries to find the MySQL++ library and header files. -dnl -dnl We define the following configure script flags: -dnl -dnl --with-mysqlpp: Give prefix for both library and headers, and try -dnl to guess subdirectory names for each. (e.g. tack /lib and -dnl /include onto given dir name, and other common schemes.) -dnl --with-mysqlpp-lib: Similar to --with-mysqlpp, but for library only. -dnl --with-mysqlpp-include: Similar to --with-mysqlpp, but for headers -dnl only. -dnl -dnl This macro depends on having the default compiler and linker flags -dnl set up for building programs against the MySQL C API. The mysql.m4 -dnl macro in this directory fits this bill; run it first. -dnl -dnl @version 1.3, 2009/11/22 -dnl @author Warren Young - -AC_DEFUN([MYSQLPP_DEVEL], -[ - dnl - dnl Set up configure script macros - dnl - AC_ARG_WITH(mysqlpp, - [ --with-mysqlpp= path containing MySQL++ header and library subdirs], - [MYSQLPP_lib_check="$with_mysqlpp/lib64 $with_mysqlpp/lib $with_mysqlpp/lib64/mysql++ $with_mysqlpp/lib/mysql++" - MYSQLPP_inc_check="$with_mysqlpp/include $with_mysqlpp/include/mysql++"], - [MYSQLPP_lib_check="/usr/local/mysql++/lib64 /usr/local/mysql++/lib /usr/local/lib64/mysql++ /usr/local/lib/mysql++ /opt/mysql++/lib64 /opt/mysql++/lib /usr/lib64/mysql++ /usr/lib/mysql++ /usr/local/lib64 /usr/local/lib /usr/lib64 /usr/lib" - MYSQLPP_inc_check="/usr/local/mysql++/include /usr/local/include/mysql++ /opt/mysql++/include /usr/local/include/mysql++ /usr/local/include /usr/include/mysql++ /usr/include"]) - AC_ARG_WITH(mysqlpp-lib, - [ --with-mysqlpp-lib= directory path of MySQL++ library], - [MYSQLPP_lib_check="$with_mysqlpp_lib $with_mysqlpp_lib/lib64 $with_mysqlpp_lib/lib $with_mysqlpp_lib/lib64/mysql $with_mysqlpp_lib/lib/mysql"]) - AC_ARG_WITH(mysqlpp-include, - [ --with-mysqlpp-include= directory path of MySQL++ headers], - [MYSQLPP_inc_check="$with_mysqlpp_include $with_mysqlpp_include/include $with_mysqlpp_include/include/mysql"]) - - dnl - dnl Look for MySQL++ library - dnl - AC_CACHE_CHECK([for MySQL++ library location], [ac_cv_mysqlpp_lib], - [ - for dir in $MYSQLPP_lib_check - do - if test -d "$dir" && \ - ( test -f "$dir/libmysqlpp.so" || - test -f "$dir/libmysqlpp.a" ) - then - ac_cv_mysqlpp_lib=$dir - break - fi - done - - if test -z "$ac_cv_mysqlpp_lib" - then - AC_MSG_ERROR([Didn't find the MySQL++ library dir in '$MYSQLPP_lib_check']) - fi - - case "$ac_cv_mysqlpp_lib" in - /* ) ;; - * ) AC_MSG_ERROR([The MySQL++ library directory ($ac_cv_mysqlpp_lib) must be an absolute path.]) ;; - esac - ]) - AC_SUBST([MYSQLPP_LIB_DIR],[$ac_cv_mysqlpp_lib]) - - dnl - dnl Look for MySQL++ header file directory - dnl - AC_CACHE_CHECK([for MySQL++ include path], [ac_cv_mysqlpp_inc], - [ - for dir in $MYSQLPP_inc_check - do - if test -d "$dir" && test -f "$dir/mysql++.h" - then - ac_cv_mysqlpp_inc=$dir - break - fi - done - - if test -z "$ac_cv_mysqlpp_inc" - then - AC_MSG_ERROR([Didn't find the MySQL++ header dir in '$MYSQLPP_inc_check']) - fi - - case "$ac_cv_mysqlpp_inc" in - /* ) ;; - * ) AC_MSG_ERROR([The MySQL++ header directory ($ac_cv_mysqlpp_inc) must be an absolute path.]) ;; - esac - ]) - AC_SUBST([MYSQLPP_INC_DIR],[$ac_cv_mysqlpp_inc]) - - dnl - dnl Now check that the above checks resulted in -I and -L flags that - dnl let us build actual programs against MySQL++. - dnl - case "$ac_cv_mysqlpp_lib" in - /usr/lib) ;; - *) LDFLAGS="$LDFLAGS -L${ac_cv_mysqlpp_lib}" ;; - esac - CPPFLAGS="$CPPFLAGS -I${ac_cv_mysqlpp_inc} -I${MYSQL_C_INC_DIR}" - AC_MSG_CHECKING([that we can build MySQL++ programs]) - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([#include ], - [mysqlpp::Connection c(false)])], - AC_MSG_RESULT([yes]), - AC_MSG_ERROR([no])) -]) dnl End MYSQLPP_DEVEL +/// \file cpool.h +/// \brief Declares the ConnectionPool class. + +/*********************************************************************** + Copyright (c) 2007-2008 by Educational Technology Resources, Inc. and + (c) 2007 by Jonathan Wakely. 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 +***********************************************************************/ + +#if !defined(MYSQLPP_CPOOL_H) +#define MYSQLPP_CPOOL_H + +#include "beemutex.h" + +#include + +#include +#include + +namespace mysqlpp { + +#if !defined(DOXYGEN_IGNORE) +// Make Doxygen ignore this +class MYSQLPP_EXPORT Connection; +#endif + +/// \brief Manages a pool of connections for programs that need more +/// than one Connection object at a time, but can't predict how many +/// they need in advance. +/// +/// This class is useful in programs that need to make multiple +/// simultaneous queries on the database; this requires multiple +/// Connection objects due to a hard limitation of the underlying +/// C API. Connection pools are most useful in multithreaded programs, +/// but it can be helpful to have one in a single-threaded program as +/// well. Sometimes it's necessary to get more data from the server +/// while in the middle of processing data from an earlier query; this +/// requires multiple connections. Whether you use a pool or manage +/// connections yourself is up to you, but realize that this class +/// takes care of a lot of subtle details for you that aren't obvious. +/// +/// The pool's policy for connection reuse is to always return the +/// \em most recently used connection that's not being used right now. +/// This ensures that excess connections don't hang around any longer +/// than they must. If the pool were to return the \em least recently +/// used connection, it would be likely to result in a large pool of +/// sparsely used connections because we'd keep resetting the last-used +/// time of whichever connection is least recently used at that moment. + +class MYSQLPP_EXPORT ConnectionPool +{ +public: + /// \brief Create empty pool + ConnectionPool() { } + + /// \brief Destroy object + /// + /// If the pool raises an assertion on destruction, it means our + /// subclass isn't calling clear() in its dtor as it should. + virtual ~ConnectionPool() { assert(empty()); } + + /// \brief Returns true if pool is empty + bool empty() const { return pool_.empty(); } + + /// \brief Grab a free connection from the pool. + /// + /// This method creates a new connection if an unused one doesn't + /// exist, and destroys any that have remained unused for too long. + /// If there is more than one free connection, we return the most + /// recently used one; this allows older connections to die off over + /// time when the caller's need for connections decreases. + /// + /// Do not delete the returned pointer. This object manages the + /// lifetime of connection objects it creates. + /// + /// \retval a pointer to the connection + Connection* grab(); + + /// \brief Return a connection to the pool + /// + /// Marks the connection as no longer in use. + /// + /// The pool updates the last-used time of a connection only on + /// release, on the assumption that it was used just prior. There's + /// nothing forcing you to do it this way: your code is free to + /// delay releasing idle connections as long as it likes. You + /// want to avoid this because it will make the pool perform poorly; + /// if it doesn't know approximately how long a connection has + /// really been idle, it can't make good judgements about when to + /// remove it from the pool. + void release(const Connection* pc); + + /// \brief Remove all unused connections from the pool + void shrink() { clear(false); } + +protected: + /// \brief Drains the pool, freeing all allocated memory. + /// + /// A derived class must call this in its dtor to avoid leaking all + /// Connection objects still in existence. We can't do it up at + /// this level because this class's dtor can't call our subclass's + /// destroy() method. + /// + /// \param all if true, remove all connections, even those in use + void clear(bool all = true); + + /// \brief Create a new connection + /// + /// Subclasses must override this. + /// + /// Essentially, this method lets your code tell ConnectionPool + /// what server to connect to, what login parameters to use, what + /// connection options to enable, etc. ConnectionPool can't know + /// any of this without your help. + /// + /// \retval A connected Connection object + virtual Connection* create() = 0; + + /// \brief Destroy a connection + /// + /// Subclasses must override this. + /// + /// This is for destroying the objects returned by create(). + /// Because we can't know what the derived class did to create the + /// connection we can't reliably know how to destroy it. + virtual void destroy(Connection*) = 0; + + /// \brief Returns the maximum number of seconds a connection is + /// able to remain idle before it is dropped. + /// + /// Subclasses must override this as it encodes a policy issue, + /// something that MySQL++ can't declare by fiat. + /// + /// \retval number of seconds before an idle connection is destroyed + /// due to lack of use + virtual unsigned int max_idle_time() = 0; + +private: + //// Internal types + struct ConnectionInfo { + Connection* conn; + time_t last_used; + bool in_use; + + ConnectionInfo(Connection* c) : + conn(c), + last_used(time(0)), + in_use(true) + { + } + + // Strict weak ordering for ConnectionInfo objects. + // + // This ordering defines all in-use connections to be "less + // than" those not in use. Within each group, connections + // less recently touched are less than those more recent. + bool operator<(const ConnectionInfo& rhs) const + { + const ConnectionInfo& lhs = *this; + return lhs.in_use == rhs.in_use ? + lhs.last_used < rhs.last_used : + lhs.in_use; + } + }; + typedef std::list PoolT; + typedef PoolT::iterator PoolIt; + + //// Internal support functions + Connection* find_mru(); + void remove_old_connections(); + + //// Internal data + PoolT pool_; + BeecryptMutex mutex_; +}; + +} // end namespace mysqlpp + +#endif // !defined(MYSQLPP_CPOOL_H) Index: config/mysql_ssl.m4 ================================================================== --- config/mysql_ssl.m4 +++ config/mysql_ssl.m4 @@ -1,17 +1,30 @@ -dnl @synopsis MYSQL_WITH_SSL -dnl -dnl This macro determines whether mysql_ssl_set() API call exists. -dnl Requires at least MySQL 4.0.1. -dnl -dnl @version $Id$, $Date$ -dnl @author Ovidiu Bivolaru -AC_DEFUN([MYSQL_WITH_SSL], -[ - # - # Check for mysql_ssl_set() in libmysqlclient(_r) - # - AC_CHECK_LIB($MYSQL_C_LIB_NAME, mysql_ssl_set, [ - AC_DEFINE(HAVE_MYSQL_SSL_SET,, Define if your MySQL library has SSL functions) - ]) dnl AC_CHECK_LIB(mysqlclient, mysql_ssl_set) -]) dnl MYSQL_WITH_SSL - +Prerequisite: Create Import Library +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Before you can build MySQL++ with MinGW, you will need to + create a MinGW-compatible import library for MySQL's C API + library. Assuming you installed MySQL in c:\mysql and MySQL++ + in c\mysql++, the commands to do this are: + + mkdir c:\mysql\lib\opt + cd c:\mysql\lib\opt + dlltool -k -d c:\mysql++\libmysqlclient.def -l libmysqlclient.a + + +Building the Library and Example Programs +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Now you can build MySQL++ with this command: + + mingw32-make -f Makefile.mingw + + Notice that we're using the MinGW-specific version of GNU + make, not the Cygwin or MSYS versions. This is in order to + get proper path separator handling. + + If you didn't install MySQL in c:\mysql, it's probably simplest + to just change the Makefile.mingw files. Theoretically you + could adjust the Bakefiles instead, but due to the way we're + using Bakefile, it's a little difficult to rebuild Makefiles + on Windows right now. + + If you want to change the install location, that is in + install.bat. Index: config/socket_nsl.m4 ================================================================== --- config/socket_nsl.m4 +++ config/socket_nsl.m4 @@ -1,72 +1,50 @@ -dnl @synopsis LIB_SOCKET_NSL -dnl -dnl This macro figures out what libraries are required on this platform -dnl to link sockets programs. -dnl -dnl The common cases are not to need any extra libraries, or to need -dnl -lsocket and -lnsl. We need to avoid linking with libnsl unless -dnl we need it, though, since on some OSes where it isn't necessary it -dnl will totally break networking. Unisys also includes gethostbyname() -dnl in libsocket but needs libnsl for socket(). -dnl -dnl @category Misc -dnl @author Warren Young -dnl @version 1.5, 2006-03-06 - -AC_DEFUN([LIB_SOCKET_NSL], -[ - save_LIBS="$LIBS" - - AC_MSG_CHECKING([whether -lsocket is needed]) - TRY_LSOCKET=no - AC_TRY_LINK( - [ - #include - #include - #include - #include - ], - [ socket(AF_INET, SOCK_STREAM, 0); ], - AC_MSG_RESULT(no), TRY_LSOCKET=yes) - - if test "x$TRY_LSOCKET" = "xyes" - then - LIBS="-lsocket $LIBS" - AC_TRY_LINK( - [ - #include - #include - #include - #include - ], - [ socket(AF_INET, SOCK_STREAM, 0); ], - [ - MYSQLPP_EXTRA_LIBS="-lsocket $MYSQLPP_EXTRA_LIBS" - AC_MSG_RESULT(yes) - ], - AC_MSG_ERROR([failed to link using -lsocket!])) - fi - - AC_MSG_CHECKING([whether -lnsl is needed]) - TRY_LNSL=no - AC_TRY_LINK( - [ #include ], - [ gethostbyname("gna.org"); ], - AC_MSG_RESULT(no), TRY_LNSL=yes) - - if test "x$TRY_LNSL" = "xyes" - then - LIBS="-lnsl $LIBS" - AC_TRY_LINK( - [ #include ], - [ gethostbyname("gna.org"); ], - [ - MYSQLPP_EXTRA_LIBS="-lnsl $MYSQLPP_EXTRA_LIBS" - AC_MSG_RESULT(yes) - ], - AC_MSG_ERROR([failed to link using -lnsl!])) - fi - - AC_SUBST(MYSQLPP_EXTRA_LIBS) -]) - +#!/bin/sh +CFG_FILE=~/.mysqlpp +if [ ! -f $CFG_FILE ] +then + echo Create $CFG_FILE, please. + echo + exit 1 +fi +. $CFG_FILE + +if [ ! -f config.h ] +then + echo Package hasn't yet been built, or you aren't in the top + echo mysql++ directory. + echo + exit 1 +fi + +VERSION=`cat mysql++.spec | grep ^Version: | cut -f2 -d' '` +TMPDIR=`mktemp -d /tmp/mysqlpp-up.XXXXXXXXXX` + +if [ "$1" = "src" ] +then + if [ ! -e mysql++-$VERSION.tar.gz ] + then + make dist + fi + cp mysql++-$VERSION.tar.gz $TMPDIR + + if [ ! -e /usr/src/redhat/RPMS/i386/mysql++-manuals-$VERSION-1.i386.rpm ] + then + make rpm + fi + cp /usr/src/redhat/RPMS/i386/mysql++-manuals-$VERSION-1.i386.rpm $TMPDIR + + if [ ! -e /usr/src/redhat/SRPMS/mysql++-$VERSION-1.src.rpm ] + then + make srpm + fi + cp /usr/src/redhat/SRPMS/mysql++-$VERSION-1.src.rpm $TMPDIR +fi + +cp /usr/src/redhat/RPMS/i386/mysql++-$VERSION-1.i386.rpm \ + $TMPDIR/mysql++-$VERSION-1.`./osver`.i386.rpm +cp /usr/src/redhat/RPMS/i386/mysql++-devel-$VERSION-1.i386.rpm \ + $TMPDIR/mysql++-devel-$VERSION-1.`./osver`.i386.rpm + +scp $SSH_OPTIONS $TMPDIR/* $SSH_TARGET + +rm -rf $TMPDIR Index: config/stl_slist.m4 ================================================================== --- config/stl_slist.m4 +++ config/stl_slist.m4 @@ -1,55 +1,81 @@ -dnl @synopsis STL_SLIST_EXTENSION -dnl -dnl This macro determines whether the local STL implementation includes -dnl a singly-linked list template, slist, and if so, where it is. -dnl -dnl @version 1.2, 2005/07/22 -dnl @author Warren Young -AC_DEFUN([STL_SLIST_EXTENSION], -[ - AC_MSG_CHECKING([for STL slist extension]) - - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [#include ], - [slist l])], - AC_DEFINE(HAVE_GLOBAL_SLIST, 1, - [ Define if you have ::slist container in ]), - TRY_NEXT=yes) - - if test -z "$TRY_NEXT" - then - SLIST_LOC=", global scope" - else - TRY_NEXT="" - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [#include ], - [std::slist l])], - AC_DEFINE(HAVE_STD_SLIST, 1, - [ Define if you have std::slist container in ]), - TRY_NEXT=yes) - - if test -z "$TRY_NEXT" - then - SLIST_LOC=", namespace std" - else - TRY_NEXT="" - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [#include ], - [__gnu_cxx::slist l])], - AC_DEFINE(HAVE_EXT_SLIST, 1, - [ Define if you have __gnu_cxx:slist container in ]), - SLIST_LOC="not found") - - if test -z "$SLIST_LOC" - then - SLIST_LOC=", namespace __gnu_cxx" - fi - fi - fi - - AC_MSG_RESULT([$SLIST_LOC]) -]) dnl STL_SLIST_EXTENSION +The user manual is written in XML DocBook format, version 4.2. We +restrict ourselves to Simplified DocBook 1.1 as much as possible. +(Why these versions? They're the newest supported on the oldest system +I still use, Red Hat Linux 9.) + +If you're looking to hack on the manual, here are some helpful resources +for getting up to speed on DocBook: + + +Mills' "Installing And Using An XML/SGML DocBook Editing Suite" article: + + http://supportweb.cs.bham.ac.uk/documentation/tutorials/docsystem/build/tutorials/docbooksys/docbooksys.html + + This is the best tutorial I've found. + + +Walsh and Muellner's _Simplified DocBook: The Definitive Guide_ book: + + http://www.docbook.org/tdg/simple/en/html/sdocbook.html + + This is the most accessible reference. + + +Walsh and Muellner's _DocBook: The Definitive Guide_ book, second +edition, online version: + + http://www.docbook.org/tdg/en/html/docbook.html + + This is the official DocBook referece; the "Simplified" guide is a + subset of this book. + + +DocBook FAQ: + + http://www.dpawson.co.uk/docbook/ + + Go here when you have a question that the tutorials and references + do not answer. + + +xsltproc: + + http://xmlsoft.org/XSLT/ + + This is the XSL processor that takes the DocBook file and an XSL + stylesheet and produces either HTML or XSL+FO. (The latter is an + intermediate step towards any of several print-oriented formats, + such as PDF or TeX.) If your system has GNOME on it, you probably + have this installed already. + + You will also need the standard set of DocBook style sheets. On + Red Hat Linux and Fedora Core, these are in the docbook-style-xsl + package. + + +FOP: + + http://xml.apache.org/fop/ + + This is the XSL+FO document processor we use to build the PDF + files. ('make pdf') + + If for some reason you have trouble getting FOP working, there's + an alternate method available as 'make oldpdf' which uses xsltproc + and pdfxmltex. It produces a pretty ugly PDF, but you probaly + already have the tools installed, if you have any of them at all. + pdfxmltex is in the xmltex package on Fedora Core 3. + + If neither of those work for you, you could use the OpenJade + tool chain instead. (http://openjade.org/) This is SGML DocBook + rather than the more modern XML DocBook I favor, but the only + XML-specific thing we are using is local XSL stylesheets. You + could ignore them and use the standard DSSSL stylesheets + instead. I avoid the SGML tool chain only because I've had + trouble with it in the past. + + +The official DocBook site: + + http://docbook.org/ Index: doc/README-devel-RPM.txt ================================================================== --- doc/README-devel-RPM.txt +++ doc/README-devel-RPM.txt @@ -1,10 +1,2621 @@ -mysql++-devel RPM installs the files you need when building your own -MySQL++ based programs, as well as documentation and examples that -can help you learn how to use the library. - -The MySQL++ header files are in /usr/include/mysql++, the library -is in /usr/lib, and the example programs' source code is in -/usr/share/doc/mysql++-devel-*/examples. For more information on -the examples, see the README-examples.txt file in the directory -containing the examples. +3.0.1, 2008.03.19 (r2255) + + o String objects can now be compared to mysqlpp::null directly. + + o Added a template operator== and operator!= to String, syntactic + sugar for the existing String::compare() methods. + + o String::compare() now returns 0 ("equal") when one of the + strings is an uninitialized String() (no refcounted buffer) + and the other is empty. It used to consider any initialized + string greater than an uninitted one. An uninitialized String + appears empty, though, so this was incorrect. + + o Made Connection::thread_aware(), thread_start() and thread_end() + static methods, so they can be called before you create your + first connection. Ditto for DBDriver versions of these methods. + + o Calling Connection::thread_start() and thread_end() in + examples/cpool.cpp, as appropriate. Above changes were necessary + to make this work sensibly. + + o Made ConnectionPool::release() virtual, so your pool subclass can + override it. + + o Added ConnectionPool::size(), so a subclass can know the current + number of extant connections. + + o No longer single-quoting NOW() call generated for default + init of DateTime type when building queries from SSQLS objects + in Query::insert(), replace() and update(). The template query + and stream interfaces of Query treated NOW() correctly already. + + o Fixed a bug that left SSQLS::table_override_ uninitted if + you used certain of the generated ctors or set() member + functions instead of others used by the examples. This could + cause a crash any time you caused SSQLS.table() to be called, + such as when passing the SSQLS to Query::insert(). + + o Minor memset bug fixed in test/uds.cpp. Patch by Dave Jones. + + +3.0.0, 2008.02.29 (r2236) The "Giant Leap Forward" release + + THIS IS NOT A DROP-IN REPLACEMENT FOR MySQL++ v2.x! + + You will have to recompile your program against this version + of the library, and you will almost certainly have to make code + changes as well. Please see these sections in the user manual + for information on migrating your code to this new version: + + http://tangentsoft.net/mysql++/doc/html/userman/breakages.html#api-3.0.0 + http://tangentsoft.net/mysql++/doc/html/userman/breakages.html#abi-3.0.0 + + o Added ConnectionPool class, primarily to let multithreaded + programs share a set of Connection objects safely in situations + where it isn't acceptable to have a Connection per thread. + + o Created examples/cpool.cpp to demonstrate this new class. + + o Added RefCountedPointer template, which provides automatic + memory management and data sharing. It's not intended + for use outside of MySQL++ itself, but it's the mechanism + behind everything below where reference counting is mentioned. + I created the initial version of it, but Jonathan Wakely almost + completely rebuilt it, and Joseph Artsimovich provided helpful + commentary and advice as well. + + o Many improvements to Specialized SQL Structures (SSQLS): + + - Renamed custom* to ssqls*. There's still a custom.h which + #includes ssqls.h for you, but it's only intended to ease + the transition to the new name. It will go away in a future + release, probably as soon as v3.1. + + - SSQLSes are finally compatible with Null<>-wrapped types. This + feature is based loosely on the "Waba" patch posted to the + mailing list back in the v2.0 days, but extended to allow + Null types for key fields. (The Waba patch only allowed + these types in non-key fields.) + + - It's no longer necessary to define a different SSQLS for each + different field set you use in queries. That is to say, + you can define an SSQLS for an entire table and store just a + subset of the table in it now, with the other fields keeping + default values. Removed examples/custom6.cpp, as custom1.cpp + can now demonstrate the same thing, implicitly. + + - An SSQLS's field order no longer has to match the order of + fields in the result set it is populated from. + + - As a result of previous, removed sql_create_c_order_* macros; + they have no purpose now. + + - Removed order parameters from sql_create_complete_*, which now + gives it the same functionality as sql_create_c_names_* so + removed the latter, too. + + - Removed "basic" variants of SSQLS creation macros. They've + been unofficially deprecated by dint of being all but + undocumented and unexemplified for a very long time now. + + - It's now possible to use mysqlpp::String, Date, DateTime, and + Time types in the key field positions in an SSQLS as they + now support the necessary comparison interfaces. + + - If you use a floating-point data type in one of the key field + positions, it no longer uses exact comparison logic. Instead, + it now does [in]equality comparisons by testing whether the + difference between two floating-point values is less than a + configurable threshold defaulting to 0.00001. + + - You can now use 'bool' type in an SSQLS. + + - Renamed _table static member variable in each SSQLS to table_ + and made it private. There are now public setter and getter + methods, table(). + + - Added per-instance table name overriding via instance_table() + setter. table() getter returns static version if this is not + set, so it's still a global setting by default. + + o You can now use mysqlpp::null as a template query parameter to + get a SQL null. + + o Replaced template ColData_Tmpl: + + - Used to have typedef ColData_Tmpl MutableColData. + It was used only once within MySQL++ itself, and was never + documented as a class for end users. This one use within + the library was a crock, so we just replaced this use with + std::string and removed the typedef. + + - This left just one use of ColData_Tmpl, instantiating it + with the MySQL++ utility class const_string, basically a + clone of std::string with all the mutating features removed. + Folded the functionality of const_string into the template, + renamed the result to String, and deleted the const_string + class. It'd be a complete std::string replacement -- with + SQL-related enhancements -- if it were modifiable, but MySQL++ + doesn't need it to be modifiable. Yet, it's still the closest + thing MySQL++ has to its own string type; thus the name. + + - Replaced its internal buffer management with a much more + clever reference counted scheme. This shows its greatest + advantage in the return from Row::operator[](), which for + technical reasons must return by value, not by reference + as is more common. This lets you pass around Strings by + value while having the efficiency of reference semantics. + This can be important with large return values, like BLOBs. + + - Converting String to numeric types (ints, floats...) uses a + new, cleaner system by Jonathan Wakely. Unless you were + abusing weaknesses in the old system, you won't see a + difference. It's just more robust and flexible. + + o Redesigned SQLString: + + - It used to derive from std::string, and while MySQL++'s + internals did use it in place of std::string, these places + didn't take advantage of the additional features offered + by SQLString. So, replaced all those uses with std::string. + + - All the remaining uses are MySQL++ public interfaces that + need to be able to accept any of many different data types, + and we want that data to be automatically converted to a + SQL-compatible string form. Because it no longer has the + parentage to be a general-purpose string type and MySQL++ has + a new contender for that role (String), renamed SQLString to + SQLTypeAdapter to reflect its new, limited purpose. ("STA" + for short.) + + - Since we don't have the std::string base class to manage the + string buffer any more, using the same reference counted + buffer mechanism as String. In addition to saving code by + not creating yet another buffer management mechanism, it means + objects of the two classes can share a buffer when you assign + one to the other or pass one to the other's copy ctor. + + - Added many more conversion ctors. + + - STA interfaces using the 'char' data type now treat them as + single-character strings instead of one-byte integers, as + does the Standard C++ Library. + + - Added mysqlpp::tiny_int interfaces to STA to replace the + former char interfaces for those needing one-byte integers. + + o As a result of the ColData -> String redesign, removed + Row::raw_*(). Before String copies were efficient, this + was helpful in accessing BLOB data efficiently. It was also + required back when ColData didn't deal correctly with embedded + null characters, but that reason is gone now, too. + + o Row::operator[](const char*) no longer unconditionally throws the + BadFieldName exception when you ask for a field that doesn't + exist. It will still throw it if exceptions are enabled, but if + not, it'll just return an empty String. This was necessary to + make the SSQLS subset and field order independence features work. + + o Similarly, Result::field_num() returns -1 when exceptions are + disabled and you ask for a field that doesn't exist. + + o You can now use the OptionalExceptions mechanism to disable + exceptions on const MySQL++ objects. + + o Redesigned query result classes: + + - Instead of Result deriving from ResUse, the two derive from + a common base class -- ResultBase -- containing the bits that + are truly the same between them. Before, Result inherited + several methods that didn't really make sense for "store" + query result sets. + + - Renamed Result to StoreQueryResult and ResUse to UseQueryResult + so it's clearer what each is for. + + - Renamed ResNSel to SimpleResult. + + - Made all SimpleResult data members private and hid them behind + const accessor functions of the same name. + + - The result set classes all used to be friends of Connection + for various lame reasons. Since they are created by Query, + and Query has a good reason for a strong relationship with + Connection, moved Connection access out of each result set + class into the code in Query that creates that type of result + set object. + + - StoreQueryResult now derives from vector in addition to + ResultBase; it used to merely emulate a vector of Rows, poorly. + It can now dispose of the MYSQL_RESULT at the end of object + construction, because it creates all the Row objects up front + instead of on the fly. And as a result of *that*, operator[] + returns by reference instead of by value, operator -> works + correctly on iterators, all STL algorithms work, etc., etc. + + - IMPORTANT COMPATIBILITY BREAK: because we used fetch_row() + stuff in Result previously, it was okay to index past the + end of the result set: you'd just get a falsy Row when you + did this, just as happens when doing the same thing in a + "use" query. The simple1 and simple2 examples did this, + so it's likely that code exists that takes advantage of this + misfeature. New versions of these examples show how to index + through a StoreQueryResult without running past its end. + + - ResUse used to delay creation of its FieldNames and FieldTypes + objects until the point of need. This had several implications + for thread and exception safety that we fix by just creating + them in the ctor. If your code is multi-threaded and was + avoiding certain usage patterns due to crashes, it's worth + trying your preferred way again. + + - Result sets create a few data structures to hold information + common to all rows in that set. The row objects need access + to these shared data structures, so on creation each gets + a pointer back to the result set object that creates it. + This was efficient, but required that a result set object + outlive any row objects it creates. Now these shared data + structures are reference-counted, decoupling the lifetime of + the child row objects from their result set parent. + + - Copy operations for result sets used to actually be "moves" + before, for efficiency. (MySQL++ itelf only copied result + sets in returning them by value from the query execution + methods of Query, so this was acceptable if you didn't do + anything uncommon with these objects.) Reference counted + data structures allow us to have copy semantics now without + sacrificing efficiency. + + - You can now use Query::storein() with an STL container of Row + objects now, instead of having to use SSQLSes. The lifetime + issue guaranteed a crash if you tried this before. + + - Removed a bunch of unnecessary alias methods: + + - columns() -> num_fields() + - names() -> field_names() + - rows() -> num_rows() + - types() -> field_types() + + - Renamed several methods for grammar reasons: + + - fields(unsigned int) -> field(unsigned int) + - names(const std::string&) -> field_num(const std::string&) + - names(int) -> field_name(int) + - types(int) -> field_type(int) + + - Removed several "smelly" methods: + + - purge() + - raw_result() + - reset_names() + - reset_field_names() + - reset_types() + - reset_field_types() + + o Field class used to just be a typedef for the corresponding C + API class. Now it's a real C++ class providing a more MySQL++ + sort of interface, plus good OO things like information hiding + and implementation detail abstraction. This changes several + things about the interface. + + o Fields class was basically a specialized std::vector work-alike + for dealing with the C API to get access to MYSQL_FIELD objects + and present them as contained Field objects. New Field type + let us replace it with "typedef std::vector Fields" + + o Major improvements to the quoting and escaping mechanisms: + + - Replaced almost all of the type-specific interfaces in manip.h + with a single version taking STA. The compiler can convert + almost anything to STA without losing any information we need + for correct quoting and escaping. This has the side benefit + that we can now do correct quoting and escaping for more data + types now, including plain C and C++ string types. + + - Fixed a bug in quote_double_only manipulator for String: was + using single quotes by mistake. + + - Escaping and quoting only works in instances where MySQL++ + can tell you're building a SQL query and are using a data type + that requires it. This affects many things, but the one most + likely to cause trouble is that inserting MySQL++'s quoting + and escaping manipulators in non-Query ostreams is now a no-op. + + - Added escape_string() member functions to Query and + SQLQueryParms::escape_string(), and removed the global function + of the same name. Because these are tied indirectly to a + Connection object, this also has the effect that escaping is + now aware of the current default character set used by the + database server. There's only one case where this isn't done + now, and that's when we're disconnected from the server. + + - Previous two items form a trade-off: if your code was depending + on MySQL++ to get SQL escaping and it no longer happens for + what we consider a good reason, you can build a replacement + mechanism using these new functions. Quoting needs no special + support in MySQL++. + + - Removed 'r' and 'R' template query parameter modifiers, + which meant "always quote" and "always quote and escape" + regardless of the data type of the parameter. There are no + corresponding manipulators (for good reason), so the removal + restores symmetry. + + o Created DBDriver class from code previously in Connection and + Query to almost completely wrap the low-level MySQL C API: + + - Connection creates a DBDriver object upon connection and + passes a pointer to it down to Query objects it creates. + In turn, they pass the pointer on to any of their children + that need access to the C API. + + - Nothing outside DBDriver calls the C API directly now, though + DBDriver leaks C API data structures quite a lot, so this + feature doesn't constitute "database independence." See the + Wishlist for what must be done to get to that point. + + o Completely redesigned the connection option setting mechanism: + + - There's now just a single Connection::set_option() method that + takes a pointer to the abstract Option base class, and there is + an Option subclass for every connection option we understand. + Thus, type errors are now caught at compile time instead of + at run time. + + - Replaced Connection::enable_ssl() with SslOption class. + + - Enabling data compression and setting the connection timeout + are no longer set via parameters to Connection interfaces. + These are now set with CompressOption and ConnectTimeoutOption. + + - Similarly, removed client_flag parameters from Connection's + ctor and connect() method and added corresponding Option + subclasses. There's about a dozen, so rather than list them + here, look for similarly-named classes in lib/options.h. + + o Added Connection::count_rows() to execute "SELECT COUNT(*) FROM + tablename" queries for you. + + o Moved Connection::affected_rows(), info() and insert_id() methods + to class Query, as they relate to the most recently-executed + query, not to the connection. + + o Several method name changes in Connection: + + - client_info() -> client_version() + - host_info() -> ipc_info() + - proto_info() -> protocol_version() + - server_info() -> server_version() + - stat() -> status() + + o Removed Connection::api_version(). It does the same thing as + client_version(). + + o Lots of changes to Date, DateTime, and Time classes: + + - If you use the default constructor for DateTime and don't + subsequently set its year, month, day, hour, minute or second + data members to nonzero values, it becomes the SQL function + "NOW()" in a query string. You can also use DateTime::now() + as syntactic sugar for this. + + - As a result of above, had to hide all of DateTime's data + members behind accessor functions, to keep the state of the + object consistent. (If it's initialized as "now" and you + give it an explicit year value, say, it is no longer "now", + so the setter has to clear the now-flag.) There are getters + and setters for year, month, day, hour, minute and second, + all named after the member. + + - Did the same for Date and Time for consistency, even though it + isn't technically required. + + - The sql_timestamp typedef now aliases DateTime instead of Time. + + - Renamed template class DTbase to Comparable. The fact + that it's the common base class of all date and time classes + is irrelevant; making subclasses comparable is what it does, + so that's what it should be named after. + + - Added a DateTime ctor taking discrete year, month, day, hour, + minute, and second values. + + - Implicit conversion from stringish types to the date and time + types is no longer allowed. This is part of the "Waba" + Null patch mentioned above; allowing implicit conversions + would break this new feature. + + - Added operator std::string and str() methods to all of these + classes. Adding this to the existing operator << support, you + now have several ways to convert these objects to string form. + + - Added time_t conversion to Date and Time classes. DateTime + already had it, since it's more legitimate to convert time_t + to DateTime, but you could already "slice" it with something + like Time(DateTime(time(0))) so there's no point pretending + you can't get from time_t to Date or Time. Might as well + legitimize it. + + o Improved tiny_int class: + + - Turned it into a template parameterized on the value type so + you can get both signed and unsigned TINYINTs + + - Changed the sql_tinyint and sql_tinyint_unsigned typedefs to + use mysqlpp::tiny_int instead of raw chars + + - Added a bool conversion ctor and operator, and typedef'd it + to sql_bool and sql_boolean to match MySQL server behavior + + o Added many more sql_* typedefs. We now have a typedef for every + type the MySQL server knows about, including those it supports + just for compatibility with other database servers. + + o Changed the sql_*int* typedefs to use integer types of the same + size as the MySQL server. (Run test/inttypes.cpp to test it.) + + o Added copy ctor and assignment operator to Row. + + o Row::operator[]() takes int now instead of unsigned int. + This finally (!) makes it possible to say row[0] without the + compiler giving an ambiguous overload error. + + o Changed all uses of row.at(0) in the examples to row[0] + + o Added operator[] to all classes that only had at(). + + o Query now automatically resets itself unless the query fails + or you're using template queries. In either case, the contents + of the query's internal buffers are considered precious, + either for debugging, or future queries. Except when using + template queries, this means you may be able to avoid calling + Query::reset() entirely. It's still safe to call reset() + as before, just unnecessary most of the time. + + o Removed reset_query parameter from all Query methods. It was + almost completely broken before, and above change does what + was really wanted to begin with. + + o Query::store_next() and Result::fetch_row() no longer throw + the EndOfResults and EndOfResultSets exceptions; these are not + exceptional conditions! These methods simply return false now. + + o Removed examples/usequery.cpp: there's no essential difference + between what it did and what examples/simple3.cpp does now as + a result of the previous change. + + o Added Query::exec(void), paralleling Query::execute(void). + + o Removed Query::preview(). The most direct replacement is str(), + which has always done the same thing. + + o You can now insert a Query object into an ostream to get a copy + of the built query. This means Query::str() is only necessary + when using template queries. + + o Removed overloads of Query::execute(), store(), and use() + that take const char*. It was redundant because const char* + converts implicitly to STA, for which overloads already exist. + + o Renamed Query::def to Query::template_defaults to make its + purpose clearer. + + o Query::error() now returns const char*, not a std::string by + value. There's no point in making a copy of the error string. + The method is now const as well, as it doesn't change the + Query object. + + o Added Query::errnum(), which just wraps Connection::errnum(). + + o Added error number parameters and accessor functions to BadQuery, + ConnectionFailed and DBSelectionFailed exceptions, to preserve + the state of Connection::errnum() at the point of the exception, + so you don't have to rely on this value remaining unchanged + during the exception throw process. All places that use these + exceptions now include this value where possible. Thanks for the + initial patch go to Jim Wallace. + + o Removed Lockable mechanism from Connection and Query; it was + conceptually flawed. See the new user manual chapter on + threading for advice on using MySQL++ safely without locking. + There is mutex locking now in ConnectionPool, but that's it. + + o Connection::query() now takes an optional query string, allowing + the returned Query object to start off with a value. Especially + useful when the query string is static, either because it's + a simple query or because it's a template. You can now build + chains like "if (conn.query("CREATE INDEX ...").exec()) { ..." + + o Added Connection::thread_aware(), thread_end(), thread_id() + and thread_safe(). See user manual's threading chapter for + explanations. + + o Renamed "success" data members in Connection, Query and + SimpleResult (neé ResNSel) to "copacetic_", making them private + if they weren't before. This better reflects their actual + use, which isn't to say that there has necessarily been actual + success, but rather that everything's okay with the object. + + o Removed success() member functions from above classes. All can + be tested in bool context to get the same information. + + o Replaced all operator bool()s in MySQL++ classes with safer + alternatives. See http://www.artima.com/cppsource/safebool.html + Thanks to Jonathan Wakely for much helpful commentary, advice, + and code used in these mechanisms. + + o Decoupled Connection::copacetic_ from Connection::is_connected_. + It is now possible for the object to be copacetic without being + connected. However, if it tries to connect and fails, then + it is not copacetic. If it is copacetic and not connected, it + means we haven't even tried to connect yet, a useful distinction. + + o Collapsed Connection's host, port, and socket_name down into + a new combined 'server' parameter which is parsed to determine + what kind of connection you mean. These interfaces are still + compatible with v2.3 and earlier up through the port parameter. + There are differences beyond this. + + o Added TCPConnection, UnixDomainSocketConnection and + WindowsNamedPipeConnection subclasses for Connection giving + simpler construction and connect() method interfaces for + instances where you know what kind of connection you want at + compile time. + + o Changed Connection::ping() return value from int to bool. + + o Renamed NullisNull to NullIsNull -- capital I -- and similar for + NullisZero and NullisBlank. + + o It's now a compile-time error to try to convert a MySQL++ + representation of a SQL null to any other data type, rather + than a run-time error as in previous versions. Removed + BadNullConversion exception as a result. + + o Way back in v1.7.x we used the BadQuery exception for all kinds + of exceptional conditions, not just bad queries. Replaced + most of these in v2.0.0 with new dedicated exceptions, but a + few remained: + + - Errors that occur during the processing of a "use" query after + the query itself executes correctly now throw UseQueryError. + It's not a "bad query", because the query executed + successfully. It just choked during subsequent processing, + so it's a different exception. Thanks for this patch go to + Jim Wallace. + + - Replaced BadQuery exceptions thrown in Row constructor due + to bad ctor parameters with new ObjectNotInitialized exception + This is also Jim Wallace's work. + + o The examples now all use getopt() type command line options + instead of positional options. This makes it possible to + pass options in any order, leave at their default options that + used to be in the middle of the sequence, and offer different + subsets of options for different programs. Also allows for + special internal-use options, like -D passed by dtest to let + examples change their behavior when run under dtest to produce + only predictable output. + + o Split old libutil functionality into two modules, one holding + all the "print data" functions, and another holding all the + command line parsing stuff. This makes it easier for newbies + to ignore the command line stuff, treating it like a black box. + The wish to understand the "print data" routines is much more + common, so the two needed to be disentangled. + + o Renamed examples' libutil to libexcommon. + + o Removed connect_to_db() libutil function. It combined command + line parsing, which users don't care about, with database + connection establishment, which they do care about. Now the + examples just call out to libexcommon to parse the command + line, and use the values they get back to explicitly make the + connection, so it isn't hidden. + + o Removed cchar and uint typedefs. + + o Redesigned dbinfo example's output to be easier to read. + + o Fixed an output formatting bug created in 2.3.0 that caused the + tabular output from examples to not line up. + + o Renamed examples/tquery.cpp to tquery1.cpp. Created tquery2.cpp + to demonstrate passing parameters via a SQLQueryParametrs object + instead of discretely. Created tquery3.cpp for testing unquoted + template parameters, such as integers. + + o Renamed fieldinf1.cpp example to fieldinf.cpp, and simplified + its output so it can be part of the dtest sequence. + + o Renamed examples/xaction.cpp to transaction.cpp. It created too + much cognotive dissonance whenever thinking about both it and + lib/transaction.cpp. + + o Added examples/deadlock.cpp, to test handling of exceptions due + to server-side transaction deadlock detection. Also added + code to resetdb to create a table needed to test this. + Initial version created by Jim Wallace to test the value of + all his BadQuery exception work, with reworking by me. + + o Greatly expanded dtest suite. Primary change is that we now + have a handful of unit tests, where in v2.3.2 we only tested + a subset of the examples. Still very low coverage ratio, + but it's a big improvement. + + o Optimized #includes, especially in lib/*.h to reduce + dependencies and thus compile time when one of these changes. + + o Fixed a typo in RPM filename generation that prevented -devel + RPM from recognizing that the corresponding MySQL++ library + RPM was installed. + + o RPM spec file improvements by Remi Collet. + + o Renamed NO_LONG_LONGS to MYSQLPP_NO_LONG_LONGS to avoid a risk + of collision in the global macro namespace. + + o First cut at Xcode2 project support. Testing needed! + + o Debug build of library on VC++ and Xcode have a _d suffix now + so you can have both versions of the library installed without + conflict. + + o Moved the VC++ 2003 project files into a new vs2003 subdirectory + because there are so many of them. Also created vs2005 + subdirectory for VC++ 2005 and 2008 compatible project files. + 2005 makes an even bigger mess of the directory containing + the .sln file, so the incentive is bigger. Plus, we have to + disable several things to get VC++ 2003 to build MySQL++ now, + so we need a special 2005+ version of the project files for a + complete build, if the user has one of the newer compilers. + + o ...plus dozens of small bug fixes and internal enhancements, + many documentation improvements, and expansion of support for + newer operating systems and compilers. + + +2.3.2, 2007.07.11 (r1669) + + o Previous release's const_string change caused more problems + than it fixed. This release contains the real fix. :) + + o New Connection::set_option() handling deals with the multi + statements option correctly again. examples/multiquery now + runs again as a result. + + o Added new unit testing script, called dtest. See the + HACKERS file for details. (This tool caught the previous + two problems!) + + o Squished a GCC pedantic warning. Thanks for the patch go to + Andrew Sayers. + + +2.3.1, 2007.07.10 (r1659) The "After the Fireworks" release + + o const_string objects now keep a copy of their data, not + just a pointer to it. This is less efficient, but necessary + to allow SSQLS to work with BLOBs. Without this, we were + seeing segfaults due to accessing freed memory pointed to + by the const_string, because the underlying object went + out of scope. + + o Fixed many more potential embedded null handling problems + in manip.h. + + o MySQL++ can now optionally reference MySQL C API headers as + being in a mysql subdirectory, a common thing on *ix systems, + by defining MYSQLPP_MYSQL_HEADERS_BURIED before #including + mysql++.h. + + o Restored ColData_Tmpl::get_string(), removed in v2.3.0, + along with warnings in the docs saying why you don't want + to use it, and what your alternatives are. + + o VC++ and MinGW builds now define the HAVE_MYSQL_SSL_SET + macro, which lets you use the C API's SSL features. + This assumes your C API library does actually have these + features enabled, which is the case with the official binary + releases on Windows. (Builds on *ix systems continue to + test for these features at configure time.) + + o Fixed simple examples-only Makefile generation, for RPMs. + + +2.3.0, 2007.07.02 (r1645) + + o Added Query::for_each() and Query::store_if() methods + proposed by Joel Fielder, and added examples for each. + + o It's now possible to store BLOB data in an SSQLS. It's not + foolproof, so added a section to the user manual (5.9) to + document the method. Also, changed examples/cgi_jpeg to use + this new mechanism, instead of the ugly "raw row data" method + it used to use. + + o Revamped Connection::set_option() handling. These options + used to be queued up, and applied only just before actually + establishing the connection. This made error reporting less + helpful because the diagnostic was separated from the cause. + Plus, the error messages were misleading to begin with. Now, + set_option() takes effect immediately if the connection is not + yet up (excepting one special option that can actually be set + after the connection is up) and issues better diagnostics when + it detects errors. + + o Connection::connect() used to set a few options in such a + way that the user couldn't override them. Now it's smart enough + to set them with the desired default values only when we see + that the user hasn't given them other values. + + o SQLString can now be initialized from a mysqlpp::null, + giving a "NULL" string. This is useful for template queries. + Patch by Michael Hanselmann. + + o resetdb error message about mixing library and header version + numbers is now more explicit. + + o Changed BadConversion exception's "what" message text to be + more like the other exceptions. The inconsistency lead one + to incorrectly copy-paste code from another exception handler, + expecting it to behave the same way. Now it does. + + o Added Row::raw_size(), as a shortcut for Row::at().size(). + + o ssqls-pretty now detects when it's being run from within + the MySQL++ distribution tree and gives a different -I flag + to the compiler, so that it picks up the distribution headers + instead of those that may be on the system already. + + o The quote manipulator now works for char[] correctly. + Thanks for this patch go to Andrew Sayers. (It's always + worked for char*, but C++ doesn't consider that to be the + same type, so it used the generic quote handling path, + which doesn't do anything for char[].) + + o Fixed a build bug on older Solaris versions where the + test for the C API library was erroneously failing, stopping + the configuration process. + + o Simplified mysql_shutdown() level argument detection. + Already had to do a version number ifdef check for the + Windows case, so there's really no point to doing it with + autoconf on Unixy platforms. Moved version number check + into lib/connection.cpp, and nuked the separate autoconf and + Windows tests. + + o Removed dependency of sql_types.h on myset.h and (indirectly) + datetime.h. Now we only define sql_* typedef aliases for those + MySQL++ types if the headers are included before sql_types.h. + + o Fixed a typo in one of the storein_sequence() template + overloads, which is apparently rarely (or never?) used, because + no one reported the compiler error you'd get if you tried. + + o Fixed a few more embedded null handling problems. + + o ColData used to keep two copies of all data it held. + Now it keeps just one. + + o Fixed install.bat script to track the unified Bakefile change + and the lack of separate debug and release builds under MinGW. + + o Yet another STLport + Query memory leak fix. + + o Squished a warning in newer GCCs having to do with identifier + shadowing. Patch by Jonathan Wakely. + + o Fixed a null-termination bug in Query::parse(). If you + somehow constructed a query string without a terminating null + character, then tried to parse it as a template query, it could + walk off the end of the string. Patch by Worster Chen. + + o Removed MYSQLPP_EXPORT tag from FieldNames and FieldTypes + class declarations, as this can cause problems in programs + that use vector in VC++. It has to do with multiply + defined templates, since these classes derive from that + template, and VC++ can't resolve the conflict without help. + Since these classes aren't actually used outside the library, + this shouldn't cause a problem. Patch by Nils Woetzel. + + o Partial fix to Doxygen PDF build on RHEL4 and 5. Needs + hand-coaxing to complete successfully on RHEL4, and doesn't + yet work at all on RHEL5. + + o Shortened the "no*" options to the bootstrap script, so that + the usage message fits on a single line. + + o Added "nodoc" bootstrap script option, for disabling the + documentation build during the dist target build. Allows for + building binary RPMs on CentOS 5.0, where doc building is + currently broken. + + o Removed the updel example program. It was kind of silly, + and if you were to rewrite it today, you'd use for_each() anyway. + + o Lots of documentation improvements. + + +2.2.3, 2007.04.17 (r1538) The "Tax Day" release + + o Previous version left examples/vstudio/* out of the tarball + by accident. + + o Improved generation of RPM temporary build directory path + name generation. Was using a hacked variant of the Fedora + Packaging Guidelines' second best choice. Now we're using + the choice they recommend most highly, without changes. + + o Removed unnecessary resources from vstudio/wforms example. + + o Minor URL fix in refman + + +2.2.2, 2007.04.13 (r1526) The "Nervousmaking Friday the 13th" release + + o More small fixes to embedded null handling in Query. + + o Fixed a bug in single-parameter template query handling. + + o Added tquery example, to demonstrate proper use of template + queries. Previously, resetdb was the only exemplar, and + it wasn't really suited for that. This example also tests + the previous item. + + o Added examples/vstudio/mfc, allowing us to improve the way + we demonstrate Unicode handling. Old way wasn't realistic. + On *ix, people will depend on the terminal code to handle + UTF-8. On Windows, users are almost certain to be writing + a GUI program, which requires different Unicode handling + than the old examples showed. + + o Removed explicit Unicode conversion stuff from command line + examples, and reworked the Unicode chapter in the user + manual. + + o Added examples/vstudio/wforms to show integration with + C++/CLI and Windows Forms. Documented this in README.vc. + + o Rewrote load_file and cgi_image examples to be more + useful, renaming them to load_jpeg and cgi_jpeg along + the way. Also, resetdb now creates a second table in the + sample database for these two examples' use. Also, added + examples/logo.jpg to the distribution as sample data for + these examples. + + o Limited the ostream base class casting stuff in Query to + VC++ 2003, which is the only platform that really needed it. + VC++ 2005 emits a warning with that hack in place, and on + other platforms it's just replicating work that the compiler + does already. + + o Added library version information to main library target + so that systems that version shared libraries work as + expected. Thanks for this patch go to Jack Eidsness. + + o Merged much of the diffs between Remi Collet's RPM spec file + into the official one. + + o Reorganized the doc subdir a bit. Generated HTML is now all + under doc/html instead of scattered under other subdirs, + and renamed doc/README.mysql++ to doc/README.manuals. + + o Improvements to top-level manual building make targets: + manuals now only rebuild at need, it's easier to request + a rebuild of all manuals, and we force a rebuild attempt + before building the distribution tarball so we don't ship + outdated manuals. + + o Added ability to run examples under gdb using exrun, + using same mechanism as we currently have for valgrind. + Thanks for this patch go to Michael Hanselmann. + + o Added "Important Underlying C API Limitations" chapter to the + user manual, to cover problems we keep seeing on the + mailing list that are the result of ignorance of the way + libmysqlclient behaves, not bugs MySQL++ is really in a + position to fix. + + +2.2.1, 2007.02.28 (r1433) + + o Fixed the new localtime() alternative selection code + for VS2003 and various uses of STLport. + + o No longer inserting a null character into the query stream + on calling one of the preview() functions. This was harmless + in v2.1, which used C strings more extensively, but began + causing problems in v2.2 due to its wider use of C++ strings. + + o Fixed a bug in the Connection copy ctor where it didn't + completely initialize the object. + + o Optimized Query::preview_char() a bit. Patch by Jonathan + Wakely. + + o Reordered directory list used by autconf when locating the + MySQL C API library. The list is now ordered with the + most likely locations for the library first, so we're less + distracted by incorrect libraries. This fixes a specific + build error under RHEL4 with recent versions of MySQL 5.0. + + +2.2.0, 2007.01.23 (r1417) + + o ColData, const_string, and SQLString can now be constructed + with an explicit length parameter. Furthermore, Query + class's execute(), store() and use() call chains terminate + in a version taking an explicit length parameter, instead + of one taking a simple C string. Together, this means + that it's now easier to handle data from the SQL server + containing nulls. The library is almost certainly not yet + capable of handling embedded nulls in all cases, but this + is a big first step towards that. + + o Can now construct a DateTime object from a time_t, and + convert a DateTime back to a time_t. Patch by Korolyov Ilya. + + o Changed the way we're handling exported functions in the + Windows DLL case so that it works more reliably under MinGW. + + o Added proper copy semantics to Connection, so that you get a + new connection with the same parameters, not just a bitwise + copy of the object. + + o Using an explicitly thread-safe variant of localtime() for + time conversions where one is available. + + o Removed ListInsert template from myset.h. This wasn't used + within the library, and was never documented, so I'm betting + that no one actually uses it. + + o Result::copy() was not copying the exception flag in + all cases. Fix by Steven Van Ingelgem. + + o Added exrun shell script and exrun.bat files to distribution, + to avoid linkage errors when running the examples while + you still have an older version of MySQL++ installed. + + o Renamed MYSQLPP_LIB_VERSION to MYSQLPP_HEADER_VERSION, as + what it really encodes is the version number in the mysql++.h + file you're using, not the actual library version number. + + o Added mysqlpp::get_library_version(), which returns the + library version number at build time. Between this and + the header version constant, you can check that you're not + mixing MySQL++ header and library versions. + + o resetdb example uses these new version number affordances to + double-check that you're not mixing libraries and headers + from different versions. This happens easily unless you + take care of it (such as by using exrun) when you have one + version of MySQL++ installed and you're trying to build and + test a new version without blowing away the old one first + or overwriting it. + + o No longer using recursive Makefiles on Unixy platforms + or split lib + examples project files on VC++. Everything is + handled by a single top-level Makefile or project file, which + is simpler for the end user, and makes better dependency + management possible. + + o When looking for the MySQL C library on systems using + autoconf, looking in .../lib64 wherever we are also looking + in .../lib. + + o RPM build process no longer depends on Bakefile. It means + you have to build the examples when building an RPM even + though they're never used within the RPM, but it's a better + tradeoff in my opinion. + + o Updated include and library paths on Windows to reflect + changes in the most recent MySQL installers. + + o Merged lib/defs.h and lib/platform.h into new file, + lib/common.h. Just cleans up the library internals. + + o Fixed build errors on Windows due to recent changes in MySQL. + + o Fixed a few memory leaks and double-deletes in Query class. + + o Fixed compatibility with STLPort's string implementation. + Patch by dengxy at cse.buaa.edu.cn. + + o Fixed a compatibility problem between Set<> template and + SSQLS. Patch by Korolyov Ilya. + + o Fixed build bug in SQLQueryParms due to a character + signedness issue on PowerPC with GCC. Patch by Michael + Hanselmann. + + o ~Transaction() can no longer throw exceptions. It'll just + quietly eat them, to avoid program termination. Fix + suggested by Alex Burton. + + o Fixed thread safety testing in autoconf case, accidentally + broken during v2.1.0 development cycle. + + o Using Doxygen 1.5.1 to generate documentation. + + +2.1.1, 2006.04.04 (r1289) + + o MinGW and Cygwin will now build and link to mysqlpp DLLs. + + o Fixed bug in Query, causing it to initialize the "throw + exceptions" flag incorrectly. Thanks for this patch go to + Joel Fielder. + + o Added -v flag for custom.pl script, which turns off the + multiply-defined static variable fix. Needed for VS 2003, + which doesn't support variadic macros. Also, added + a diagnostic to detect the need for the -v flag, and + suppressed the test for this feature in examples/util.cpp. + + +2.1.0, 2006.03.24 (r1269) + + o Converted automake and makemake files to their equivalents in + Bakefile format. + + o Added the Transaction class, which makes it easy to use + transaction sets in MySQL++. + + o Added xaction example to test new Transaction class. + + o Resetdb example now creates its example table using the + InnoDB storage engine, in order to test the new transaction + support. Resetdb also declares the table as using UTF-8 + text; this doesn't change anything, but it does correctly + document what we're doing. + + o Added sql_types.h header, containing C++ typedefs + corresponding to each MySQL column type. Using those new + types in the type_info module, and in the SSQLS examples. + + o Replaced the way we were handling the template query + version of Query member functions, to allow an arbitrary + number of template query parameters. By default, we + now support 25 parameters, up from the old limit of 12. + It's now possible to change just one number, run a script, + and have a new limit. + + o Connection class does a better job of returning error + messages if you call certain member functions that depend + on a connection to the server before the connection is + established. + + o Updated libmysqlclient.def for newer versions of MySQL. (Fixes + build errors having to do with mysql_more_results() and + mysql_next_result(). + + o Replaced final use of strcpy() with strncpy(). + + o custom.pl now runs without complaint in strict mode, with + warnings turned on. Thanks for this patch go to "Waba". + + o Fixed a bug in custom.pl where incorrect code would be + generated for some SSQLS set() methods. Thanks for this + patch go to "Waba". + + o SSQLS structures now support long and unsigned long fields. + Thanks for this patch go to "Waba". + + o It's now possible to put SSQLS definitions in a header + file used by multiple modules in a program without + getting multiple static member definition errors. See the + documentation for details. Thanks for this patch go to + Viktor Stark. + + o Moved the definition of the 'stock' SSQLS out of the + custom*.cpp example files and into a new stock.h file. + Also, #including that file in the util module to test out + the new SSQLS multiple static definition fix. + + o Using all of the digits of precision guaranteed by the + IEEE 754 spec when stringizing floating point numbers + to build queries. Previously, we would use the platform + default, which can be as few as 6 digits. + + o Removed lib/compare.h. Not used within the library, never + documented, and nobody seems to want to defend it. + + +2.0.7, 2005.11.23 (r1147) + + o Added explicit mysqlpp namespace qualifiers to generated code in + custom*.h so you can use SSQLS in places where it doesn't make + sense to say "using namespace mysqlpp" before the declaration. + Also updated some of the examples to not have this "using" + declaration to make it clear to users that it isn't needed, if you + want to use explicit namespace qualifiers as well. Thanks for + this patch to Chris Frey. + + o Removed an apparently useless unlock() call from ResUse; there is + no nearby lock() call, so if this unlock() is in fact necessary, + it shouldn't be here anyway, because the two calls should be + nearby each other. Thanks for this patch to Chris Frey. + + o Fixed Query ostream initialization bug affecting SunPro CC (at + least). While this bug violates the Standard, it doesn't affect + many real compilers because they don't enforce this rule. Fixed + by Chris Frey. + + o Previously, we only used the C99 style "long long" support when + building under GNU CC. This is now the default. This should + allow the code to work under SunPro CC. + + o Added another dynamic cast needed for proper Query ostream + subclass overloading under VC++. (7.1 at least...) + + o Detecting whether MySQL is built with SSL support on platforms + using autotools. Needed on some old Sun systems, for instance. + Thanks for this patch to Ovidiu Bivolaru. + + o Fixed a potential memory bug in ColData's conversion to SQL null. + + o Many minor packaging tweaks. (README clarifications, file + permission fixes, better adherence to GNU packaging standards, + etc.) + + +2.0.6, 2005.09.28 (r1123) + + o Fixed makemake.bat so it works on cmd.exe, not just 4NT. + + o Documentation fixes. + + +2.0.5, 2005.09.13 (r1114) + + o Visual C++ build now requires GNU make. It is tested to work + with either the Cygwin or the MinGW versions. The previous + version of MySQL++ used nmake. This change enabled the + following features: + + o Debug and Release versions are both built into + separate subdirectories. + + o Dependency tracking for release version works + correctly now. (Previously dependencies worked + only for debug version.) + + o 'make clean' removes release version binaries + in addition to debug versions. + + o MinGW makemake support updated to support new release/debug + subdirectory system. This is probationary support, since + this code currently can't be built as a DLL. As a result, + it is no more useful than the Cygwin version, for licensing + reasons. + + o Several fixes to allow building on Solaris 8. These fixes may + also help on other SVR4-derived systems. + + o Removed Borland C++ makemake support, because this version + of the library does not work completely, and there seems + to be almost no user interest in fixing it. + + o Clarified "Handling SQL Nulls" section of user manual's + Tutorial chapter. + + +2.0.4, 2005.08.29 (r1076) + + o Made mysql_shutdown() second parameter autoconf check less + sensitive to compiler pedantry. + + o VC++ library Makefile is now smart enough to re-create the + import library, if it is deleted while leaving the DLL alone. + + o Added libmysqlclient.def to tarball. + + o Reworked most of the top-level README* files. + + o Renamed LGPL file to LICENSE. + + +2.0.3, 2005.08.25 (r1060) + + o Visual C++ makemake system updated to build both debug and + release versions of library DLL. + + o Fixed bug in simple1 example that caused crashes on Windows. + + o Doing UTF-8 to ANSI text translation in simple examples now. + + o Previous two releases built libmysqlpp with wrong soname on + autotools-based systems. Fixed. + + +2.0.2, 2005.08.18 (r1050) + + o Fixes to makemake system for cmd.exe. + + o Fixed the case where the system's C++ library includes an slist + implementation in namespace std. + + +2.0.1, 2005.08.17 (r1046) + + o Added new simple1 example, showing how to retrieve just one + column from a table. Old simple1 is now called simple2, and + simple2 is likewise shifted to simple3. + + o Added custom6 example, showing how to do the same thing with + SSQLS. + + o Updated user manual to cover new examples. + + o Was accidentally shipping Subversion crap with tarball. Fixed. + + +2.0.0, 2005.08.16 (r1031) The "Excess Hair Removal" release + + THIS IS NOT A DROP-IN REPLACEMENT FOR MySQL++ v1.7! + + At minimum, you will have to recompile your program against + this library. You may also have to make code changes. + Please see the "Incompatible Library Changes" chapter of + the user manual for a guide to migrating your code to this + new version: + + http://tangentsoft.net/mysql++/doc/html/userman/breakages.html + + o The library's shared object file name (soname) scheme has + changed. (This mainly affects POSIX systems.) + + The soname for the last 1.7.x releases of MySQL++ was + libmysqlpp.so.4, meaning the fourth version of the library's + application binary interface (ABI). (The first ABI version + in this scheme was that provided by 1.7.9.) MySQL++ + 2.0.0's soname is libmysqlpp.so.2.0.0. Since the dynamic + linker setup on some systems will create a symlink to + that file called libmysqlpp.so.2, it's possible that this + library could be confused with that for MySQL++ 1.7.19 + through .21, which also used this number. Do not install + this library on a system which still has binaries linked + against that version of the library! + + The new scheme is {ABI}.{feature}.{bug fix}. That is, + the first number changes whenever we break the library's + binary interface; the second changes when adding features + that do not break the ABI; and the last changes when the + release contains only internal bug fixes. This means + that we will probably end up with MySQL++ 3.0 and 4.0 at + some point, so there will be further soname conflicts. + Hopefully we can put these ABI changes off long enough + to avoid any real problems. + + o autoconf now installs headers into $prefix/include/mysql++, + instead of $prefix/include. If you were using the + --includedir configure script option to get this behavior + before, you no longer need it. + + o Linux binary RPMs will henceforth include only the + libmysqlpp.so.X.Y.Z file, and create any short names + required, to allow multiple versions to be installed at + once. Currently, you cannot install two MySQL++ library + RPMs at once, because they both have /usr/lib/libmysqlpp.so.X, + for instance. + + o Replaced the Visual C++ and Borland C++ project files with + a new "makemake" system, which creates Makefiles specific + to a particular toolchain. This new mechanism also supports + MinGW and generic GCC-on-*ix. This was done partly to reduce + the number of places we have to change when changing the + file names in MySQL++ or adding new ones, and partly so we're + not tied to one particular version of each of these tools. + + o VC++ Makefiles create a DLL version of the library only + now, so there's no excuse for LGPL violations now. + This same mechanism should make DLL builds under other + Windows compilers easy. + + o Added Connection::enable_ssl(), which enables encrypted + connections to the database server using SSL. + + o Connection::create_db() and drop_db() now return true on + success, not false. + + o Connection::create_db() and drop_db() use Query::exec() + now, for efficiency, rather than Query::execute(). + + o Removed Connection::infoo(). Apparently just there to + save you from a typo when calling the info() method, since + it was a mere alias. + + o Renamed Connection::real_connect() to connect(), gave + several more of its parameters defaults, and removed old + connect() function. Then changed user manual and examples + to use new APIs. + + o Replaced Connection::read_option() with new set_option() + mechanism. The name change matches the method's purpose + better. Functional changes are that it returns true on + success instead of 0, it supports a broader set of options + than read_option() did, and it enforces the correct option + argument type. + + o You can now call Connection::set_option() before the + connection is established, which will simply queue the option + request up until the connection comes up. If you use this + feature, you should use exceptions, because that's the only + way an option setting failure can be signalled in this case. + + o Removed query-building functions (exec*(), store*(), + use()) from class Connection, and moved all the implementation + code to class Query. Query no longer delegates the final + step of sending the query to the database server to + Connection(). + + o Added Connection::enable_ssl(), for turning on SSL support on + a connection. + + o Extracted exception disabling mechanism out of the many + classes that had the feature into a new OptionalExceptions + base class, which all classes having this feature now + derive from. Also, removed all per-method exception + handling flags. Finally, added NoExceptions class. With + all of these changes, there is now a common way to disable + exceptions with fine granularity on all objects that + support the feature. + + o All custom MySQL++ exceptions now derive from the new + Exceptions class. This regularizes the exception interface + and allows you to use a single catch() block if you want. + + o The "throw exceptions" flag is passed from parent to child + in all situations now. (Or if not, please report it as + a bug.) This fulfills a promise made in the v1.7.9 user + manual, with the cost being that some programs will see + new exceptions thrown that they're not expecting. + + o Added a bunch of new exception types: BadOption, + ConnectionFailed, DBSelectionFailed, EndOfResults, + EndOfResultSets, LockFailed, and ObjectNotInitialized. + Some of these replace the use of BadQuery, which in v1.7.x + was a kind of generic exception, thrown when something more + specific wasn't available. Beware, this means that programs + may start crashing after recompiling them under v2.0 due to + uncaught exceptions, if they were only trying to catch BadQuery. + + There are additional instances where the library will + throw new exceptions. One is when calling a method that + forces the internals to use an out-of-bounds index on a + vector; previously, this would just make the program + likely to crash. Another is that the library uses the + BadFieldName exception -- created in v1.7.30 -- in more + apropos situations. + + o Renamed SQLQueryNEParms to BadParamCount, to match naming + style of other concrete exception types. + + o Extracted lock()/unlock() functions from Connection and + Query classes into a new Lockable interface class. Locking + is implemented in terms of a different class hierarchy, Lock, + which allows multiple locking strategies with a single ABI. + + o Removed ResUse::eof(). It's based on a deprecated MySQL + C API feature, and it isn't needed anyway. + + o Removed arrow operator (->) for iterator returned by Fields, + Result and Row containers. It was inherently buggy, because + a correct arrow operator must return the address of an + object, but the underlying element access functions in these + classes (e.g. at()) return objects by value, of necessity. + Therefore, this operator could only return the address of + a temporary, which cannot be safely dereferenced. + + o Returned Row subscripting to something more like the + v1.7.9 scheme: there are two operator[] overloads, one for an + integer (field by index) and another for const char* (field + by name). lookup_by_name() has been removed. Because row[0] + is ambiguous again, added Row::at() (by analogy with STL + sequence containers), which always works. + + o Collapsed two of the Row::value_list*() overloads into + two other similar functions using default parameters. + This changes the API, but the removed functions aren't + used within the library, and I doubt they are used outside, + either. + + o Merged RowTemplate into Row. + + o Merged SQLQuery class into Query class. + + o Query is now derived from std::ostream instead of + std::stringstream, and we manage our own internal string + buffer. + + o Moved SQLParseElement and SQLQueryParms into their own + module, qparms. + + o Added multiple result set handling to Query. MySQL 4.1 + and higher allow you to give multiple SQL statements in a + single "store" call, which requires extensions to MySQL++ + so you can iterate through the multiple result sets. Also, + stored procedures in MySQL 5.0 reportedly return multiple + result sets. Thanks for the initial patch go to Arnon Jalon; + I reworked it quite a bit. + + o Query::storein*() now supports more varieties of the + nonstandard slist comtainer. (Singly-linked version of + STL std::list.) + + o Template query mechanism and user manual had several + mismatches. Made manual match actual behavior, or + made library match documented behavior, as apropriate. + Initial patch by Jürgen MF Gleiss, with corrections and + enhancements by Warren Young. + + o Collapsed mysql_* date and time base classes' methods and + data into the subclasses. Also, DateTime no longer derives + from Date and Time; you could get away with that in the + old hierarchy, but now it creates an inheritance diamond, + and allows unsupported concepts like comparing a Time to + a DateTime. + + o Removed "field name" form of Row::field_list(). It was + pretty much redundant -- if you have the field names, why + do you need a list of field names? + + o ColData can convert itself to bool now. Thanks for this + patch go to Byrial Jensen. + + o Removed simp_list_b type; wasn't being used, and doesn't + look to be useful for end-user code. + + o Several methods that used to take objects by value now + do so by const reference, for efficiency. + + o Several variable and function renamings so that MySQL++ + isn't needlessly tied to MySQL. Even if we never make + the library work with other database servers, there's + little point in tying this library to MySQL blindly. + + o Renamed all private data members of MySQL++ classes to + have trailing underscores. + + o 'private' section follows 'public' section in all classes + now. + + o Removed mysql++.hh and sqlplus.hh backwards-compatibility + headers. + + o Added copy ctors to Date/Time classes so that they will + work in SSQLS under GCC 4.0.0. Without these, the compiler + couldn't make the conversion from raw MySQL row data. + + o Fixed a bunch of GCC 4.0 pedantic warnings: added virtual + dtors to all base classes, calling base class ctors from leaf + classes, etc. + + o All warnings fixed under VC++ at warning level 3. (Mostly + harmless signedness and integer conversion stuff.) + + o Updated LGPL license/copyright comments at the top of + several files to use FSF's new physical address. + + o Relicensed user manual under a close variant of the Linux + Documentation Project License, as it's designed for + documentation, which the LGPL is not. Permission for this + received from Kevin Atkinson and MySQL AB. + + o Added ABI and API breakages chapter to user manual. It + is basically a subset of this ChangeLog, with only the + information an end-user must know when migrating between + versions. + + o Reworked user manual's DocBook code quite a bit after + reading Bob Stayton's book "DocBook XSL" 3/e. Better handling + of stylesheets, taking advantage of some superior DocBook + features, prettier output (especially the HTML version), etc. + + o Rewrote doc/userman/README to make it clearer how to get + started contributing to the user manual. It's essentially a + "getting started with DocBook" guide now! + + o Lots of small text improvements to user and reference + manuals. Aside from the obvious tracking of library changes, + made a bunch of minor style and clarity improvements. + + o Added CSS stylesheets for userman and refman to + make the HTML versions of each a) not ugly; and b) match + tangentsoft.net. (Yes, some may say that these are incompatible + goals....) + + o Standardized exception handling code in the examples that + use it. + + o Fixed a potential memory leak due to exceptions thrown from + ResUse. Thanks for this patch go to Chris Frey. + + o Using new "no exceptions" feature of library in simple1 + example, so it is now truly simple. + + o simple1 example no longer depends as much on util module, so + that all of the important code is in one place. Makes + learning MySQL++ a little less intimidating. + + o Added new simple2 and usequery examples, to demonstrate + the proper way to handle a "use" query, with exceptions + disabled, and not, respectively. Added them to the user + manual, in the appropriate place. + + o Refactored the "print stock table" example functions + again, to make code using them clearer. + + o UTF-8 to UCS-2 handling in examples is now automatic on + Windows. + + o Removed debug code from Windows Unicode output examples + that slipped into previous release. + + o resetdb example is now clearer, and more robust in the + face of database errors. + + o Simplified connect_to_db() in examples' util module. + + o Added sample autoconf macro for finding MySQL++ libraries, for + people to use in their own autotools-based projects. + + o Lots and lots of minor cleanups not worth mentioning + individually... + + +1.7.40, 2005.05.26 (r719) + + o Multiple item form of insert() now works if you're using the + SQLQuery class, or its derivative, Query. Thanks to Mark + Meredino for this patch. + + o Fixed a bug in const_string::compare(), in which MySQL++ + would walk off the end of the shorter of the two strings. + All was well if the two were the same length. + + o ResUse::operator=() now fully updates the object, so it's more + like the behavior of the full ctor. + + o All source files now contain a license and copyright statement + somewhere within them. + + o Optimized mysql++.h a bit: it now #includes only the minimum set + of files required, and there is now an idempotency guard. + This improves compile times a smidge, but mainly it was + done to clean up the generated #include file graph in the + reference manual. Before, it was a frightful tangle because + we #included everything except custom*.h. + + o Constness fix in MySQL++ date/time classes to avoid compiler + warnings with SSQLS. Thanks to Wolfram Arnold for this patch. + + o Fixed some compiler warnings in custom*.h. Thanks to Chris Frey + for this patch. + + o Added "Submitting Patches" and "Maintaining a Private CVS + Repository" sections to the HACKERS file. Thanks to Chris + Frey for the source material for these sections. The HACKERS + file was improved in several other ways at the same time. + + o PDF version of user manual no longer has links to the reference + manual. They were ugly, and they were broken anyway due to the + way we move the PDFs after generating them. If you want + interlinked manuals, use the HTML version. + + o PDF version of user manual now has hard page breaks between + chapters. + + o Removed complic1 example. Wasn't pulling its own weight. + Everything it is supposed to demonstrate is shown in other + examples already. + + o Refactored print_stock_table() in examples/util module to be + four functions, and made all the examples use various of + these functions where appropriate. Before, several of + the examples had one-off stock table printing code because + print_stock_table() wasn't exactly the right thing, for one + reason or another. One practical problem with this is that + some of the examples missed out on the recent Unicode updates; + now such a change affects all examples the same way. + + o Since so many of the examples rely on the util module, the user + manual now covers it. The simple1 example in the user manual + didn't make much sense before, in particular, because it's + really just a driver for the util module. + + o Added custom5 example. It shows how to use the equal_list() + functionality of SSQLS. Thanks to Chris Frey for the original + version of this program. (I simplified it quite a bit after + accepting it.) + + o New user manual now covers the value_list(), equal_list() and + field_list() stuff that the old manual covered but which was + left out in previous versions of the new manaul. Most of the + examples are the same, but the prose is almost completely new. + This new section includes the custom5 example. + + o Every declaration in MySQL++ is now documented in the reference + manual, or explicitly treated as "internal only". + + o Improved docs for MySQL++'s mechanism to map between MySQL + server types and C++ types. Initial doc patch by Chris Frey, + which I greatly reworked. + + o Improved a lot of existing reference manual documentation while + adding the new stuff. + + o Expanded greatly on the exception handling discussion in the user + manual. + + o Added all-new "Quoting and Escaping" section to the user + manual's Tutorial chapter. Moved some existing comments on + quoting and escaping around and added some new ones to other + sections as a result. + + o Added all-new "Handling SQL Nulls" section to the user manual's + Tutorial chapter. + + o Many improvements to the Overview section of the user manual. + + o Row::operator[] reference now explains the right and wrong way to + use the values it returns. This is in response to a mailing list + post where someone was incorrectly using this feature and getting + a bunch of dangling pointers. + + o Updated Doxyfile so 1.3.19.1 parses it without warnings. Still + works with versions back to 1.2.18, at least. (These are + the versions shipped with Fedora Core 3 and Red Hat Linux 9, + respectively.) + + o Using a superior method to make Doxygen ignore certain sections + of the source code. Between this change and the fact that + everything not so ignored is documented, Doxygen no longer + generates any warnings. + + o Lots of code style updates. Everything should now be consistently + formatted. + + +1.7.35, 2005.05.05 (r601) The "Cinco de Mayo" release + + o Added a "how to use Unicode with MySQL++" chapter to the user + manual. (Too bad "Cinco de Mayo" doesn't have any accented + characters. That would be just _too_ precious.) + + o VC++ examples now use the Unicode Win32 APIs, so they can display + Unicode data from MySQL++. + + o Added an optional conversion function to examples/util.cpp to + handle the conversion from UTF-8 to UCS-2 on Win32. + + o Moved "brief history of MySQL++" from intro section of refman to + intro section of userman. + + o Lots of small bits of documentation polishing. + + o Made some minor constness fixes. Thanks to Erwin van Eijk + for this patch. + + o Made some warning fixes for GCC 4.0. Not all warnings are + fixed, because some of the needed changes would break the ABI. + Thanks to Chris Frey for this patch. + + o Added lib/Doxyfile to distribution. + + +1.7.34, 2005.04.30 (r573) + + o Added a multiple-insert method for Query, which lets you insert + a range of records from an STL container (or the whole thing, + if you like) in a single SQL query. This is faster, and it + reduces coding errors due to less repetition. Thanks to Mark + Meredino for the patch. + + o Reference and user manual now get rebuilt automatically when + required. (E.g. on 'make dist', or explicitly now through 'make + docs'.) + + o Made it easier to change the maximum number of SSQLS data members + in generated custom-macros.h file. It used to be hard-coded in + several places in lib/custom.pl; now it's a variable at the top of + the file. + + o Changed default SSQLS data member limit to 25, which is what it + has been documented as for a long time now. It was actually 26 + within custom.pl. + + o Fixed a regression in previous version. + + o Trimmed some fat from the distribution packages. + + o Some more small doucmentation improvements. + + +1.7.33, 2005.04.29 (r555) + + o Worked around an overloaded operator lookup bug in VC++ 7.1 + that caused SSQLS insert, replace and update queries to get + mangled. (Symptom was that custom2 and custom3 examples didn't + work right.) Thanks to Mark Meredino for digging up the + following, which explains the problem and gives the solution: + + http://groups-beta.google.com/group/microsoft.public.vc.stl/browse_thread/thread/9a68d84644e64f15 + + o Some VC++ warning fixes. + + o Major documentation improvements: + + o Using DocBook for user manual and Doxygen for reference + manual. The former now references the latter where + useful. + + o Split out HACKERS and CREDITS files from main README, + and improved remaining bits of README. + + o Moved the text from the old v1.7.9 LaTeX-based + documentation over into the new systems, and reworked + it to more closely resemble English. + + o Added a lot of new material to documentation, and + simplified a lot of what already existed. + + o Documentation is now being built in HTML and PDF forms. + + o ebuild file updated to take advantage of recent configure script + features. Thanks to Chris Frey for this patch. + + + +1.7.32, 2005.03.10 (r479) + + o Example building may now be skipped with --disable-examples + configure script flag. + + o Changed stock items added in resetdb. One is now UTF-8 encoded, + to show that basic use of Unicode with MySQL++ is easy, yet not + foolproof. (See formatting of table on systems where cout isn't + UTF-8 aware!) Other stock items now follow a theme, for your + amusement. :) + + o custom3 example now changes UTF-8 item's name to the 7-bit ASCII + equivalent. Previously, this example would fix a spelling error + in the table. + + o resetdb example now says 'why' when it is unable to create the + sample database. + + o Small formatting change to print_stock_table(), used by several + examples. + + o Was issuing a VC++-specific warning-disable pragma when built by + any Windows compiler. Fixed. + + +1.7.31, 2005.03.05 (r462) The "Inevitable Point-one Followup" release + + o Check for threads support must now be explicitly requested via + configure script's new --enable-thread-check flag. + + o Fix for contacting MySQL server on a nonstandard port number. + Thanks to Chris Frey for this patch. + + o Example programs using standard command line format now accept a + fourth optional parameter, a port number for the server. Thanks + to Chris Frey for this patch. + + o One more g++ 3.4 pedantic warning fix by Chris Frey. + + o Exception handling in resetdb is no longer nested, because you'd + get a segfault on some systems when an exception was thrown from + one of the inner try blocks. + + o Improvements to Connection class's handling of locking mechanism. + Concept based on patches by Rongjun Mu. + + o Implemented the declared-but-never-defined Query::lock(). Thanks + to Rongjun Mu for this patch. + + o Cleaned up some unclear if/else blocks in connection.cpp by + adding explicit braces, correct indenting and putting normal + code path in the if side instead of the else. + + +1.7.30, 2005.02.28 (r443) The "Power of Round Numbers" release + + o bootstrap script now accepts a 'pedantic' argument, which sets a + bunch of CFLAGS that make g++ very picky about the code it + accepts without warnings. + + o Fixed a bunch of things that generated warnings with g++ in + pedantic mode. Only two warnings remain, having to do with + floating point comparisons. (See Wishlist for plans on how to + deal with these.) Thanks to Chris Frey for this patch. + + o Split long tests out of configure.in into M4 files in new config + subdir. This makes configure.in easier to read. + + o Added preliminary thread support. Currently, this just means that + we detect the required compiler and linker thread flags, and link + against the proper thread-safe libraries. THERE MAY BE + UN-THREAD-SAFE CODE IN MYSQL++ STILL! + + o Standard C++ exceptions are the default now. Old pre-Standard + exception stuff removed. + + o Row::lookup_by_name() will throw the new BadFieldName exception if + you pass a bad field name. Thanks for this patch to Chris Frey. + + o Row::operator[] will throw a Standard C++ out of bounds exception + by way of std::vector::at() if you pass it a bad index. Thanks + for this patch to Chris Frey. + + o Setting Connection::is_connected flag to false on close(). + Previously, is_connected() would continue to return true after + close() was called. + + o All number-to-string conversion ctors in SQLString class now use + ostringstream to do the conversion. Previously, we used + snprintf(), which isn't available on all systems. Also, we used a + C99 format specifier for the "long long" conversion, which is also + not available on all systems. This new ostringstream code should + be platform-independent, finally. + + +1.7.28, 2005.02.04 (r403) + + o --with-mysql* flags to configure script now try the given + directory explicitly, and only if that fails do they try + variations, like tacking '/lib' and such onto it to try and find + the MySQL includes and libraries. Thanks to Matthew Walton for + the patch. + + o Finally removed sql_quote.h's dependence on custom.h, by moving + the one definition it needed from custom.h to deps.h. This will + help portability to compilers that can't handle the SSQLS macros, + by making that part of the library truly optional. + + +1.7.27, 2005.01.12 (r395) + + o configure check for libmysqlclient now halts configuration if the + library isn't found. Previously, it would just be flagged as + missing, and MySQL++ would fail to build. + + o Added sql_string.cpp to VC++ and BCBuilder project files. + + o Removed Totte Karlsson's 'populate' example, which never made it + into the distribution anyway. + + o Removed last vestiges of 'dummy.cpp'. + + o Renamed *.cc to *.cpp in BCBuilder project files. + + o Worked around a BCBuilder C++ syntax processing bug in row.h. + + +1.7.26, 2004.12.17 (r382) + + o Moved all of the SQLString definitions out of the header and into + a new .cpp file, reformatted it all, and made the integer + conversion functions use snprintf() or _snprintf() instead of + sprintf(). Also, widened some of the buffers for 64-bit systems. + + o Using quoted #include form for internal library headers, to avoid + some problems with file name clashes. (The headers should still + be installed in their own separate directory for best results, + however.) Thanks to Chris Frey and Evan Wies for the patch and + the discussion that lead to it. + + o Removed unnecessary semicolons on namespace block closures. + Thanks to Evan Wies for this patch. + + o Fixed namespace handling in the legacy headers mysql++.hh and + sqlplus.hh. Thanks to Chris Frey for this patch. + + o #including iostream instead of ostream in lib/null.h for + broader C++ compatibility. (This may allow MySQL++ to work on GCC + 2.95.2 again, but this is unconfirmed.) + + o Detecting proper mysql_shutdown() argument handling automatically + in platform.h for the Windows compiler case instead of making the + user edit the file. Thanks to Evan Wies for this patch. + + o Fixed examples/Makefile.simple to use new *.cpp file naming. + + o Fix to Gentoo ebuild file's exception configure switch handling. + Thanks to Chris Frey for this patch. + + o Rebuilding lib/custom*.h intelligently now, to avoid unnecessary + recompiles after running bootstrap script. + + +1.7.25, 2004.12.09 (r360) + + o Yet more fixes to the --with-mysql-lib and --with-mysql-include + flags. + + o Added DLLEXPORT stuff to platform.h, hopefully so that someone + can figure out how to make VC++ make a DLL version of MySQL++. + + o Renamed *.cc to *.cpp. + + o Made 'set -> myset' change in VC++ project files. + + o Some style changes (mostly whitespace) in header files. + + +1.7.24, 2004.12.08 (r343) + + o Fixed the --with-mysql-lib and --with-mysql-include flags' + behavior, and extended their search ability to handle one other + common case. (Fixed by Steve Roberts) + + o Fixes to put freestanding functions in namespace mysqlpp. (They + weren't in the namespace, while all the class member functions + were.) This required bumping the ABI version number to 4. + + o Renamed set module to myset, to avoid conflicts with Standard C++ + Library's set.h when MySQL++ headers were installed into one of + the standard system include directories. + + o Renamed all the idempotency guards to make them consistent in + style and unique to MySQL++. + + o Reformatted all of lib/*.cc. + + +1.7.23, 2004.11.20 (r333) + + o Query::reset() now empties the stored query string. If you + subsequently stored a longer query in the object, you'd overwrite + the previous query, but otherwise the longer part of the previous + one would stick out past the new query. + + o We now look to the NO_LONG_LONGS macro only to decide whether to + fake 64-bit integer support using 32-bit integers. + + o 64-bit integer support under Visual C++ may be working now, using + that platform's __int64_t type. This has not been tested. + + o Removed 64-bit integer support for Codewarrior on Mac OS 9 and + earlier. OS X uses GCC, so it requires no special support. + + o Added MinGW detection in platform.h. + + o If you pass a flag (-X) to the examples that take the standard + parameters (resetdb, simple1, etc.), it prints a usage message. + + o Better error handling in resetdb example, where errors are the + most critical. (If that one runs without errors, the others + probably will, too, and you have to run that one first.) + + o resetdb now reports success, rather than succeeding silently. + + o Removed the code in sample1 example that duplicated util module's + print_stock_table(), and called that function instead. + + o Moved the preview() calls in the example programs to before the + query execution calls, because execution modifies the query. + + o All examples that take the standard command line parameters now + exit when connect_to_db() fails in one of the ways that don't + throw an exception, rather than bulling onward until the next + MySQL database call fails because the connection isn't up. + + o dbinfo example now takes the standard command line parameters. + + o Much better output formatting in dbinfo example. + + o Calling reset() where appropriate in the various example programs. + Before, the programs may have worked, but not for the right + reason. This lead some people to believe that calling reset() + was not necessary. + + o Fixed an incorrect use of row["string"] in complic1 example. + + o Lots of code style improvements to the examples. + + o Some VC++ type warnings squished. Some remain. + + +1.7.22, 2004.11.17 (r302) + + o Applied patches by Zahroof Mohammed to allow it to build under GCC + 3.4.2. Tested on MinGW and Fedora Core 3 systems. + + o Removed all the forward declarations in defs.h, and added + forward declarations where necessary in individual header files. + #including defs.h in fewer locations as a result. + + o Legacy headers sqlplus.hh and mysql++.hh now declare they are + using namespace mysqlpp, to allow old code to compile against the + new library without changes. + + o Removed query_reset parameter from several class Query member + functions. In the implementation, these parameters were always + overridden! No sense pretending that we pay attention to these + parameters. This changes the ABI version to 3. + + o #including custom.h in sql_query.h again...it's necessary on GCC + 3.4. + + o bootstrap script runs lib/config.pl after configure. This is + just a nicety for those running in 'maintainer mode'. + + +1.7.21, 2004.11.05 (r273) + + o Generating a main mysql++ RPM containing just the library files + and basic documentation, and the -devel package containing + everything else. + + o Devel package contains examples now, along with a new Makefile + that uses the system include and library files, rather than the + automake-based Makefile.am we currently have which uses the files + in the mysql++ source directory. + + o Renamed sqlplusint subdirectory in the package to lib. + + o Removed the obsolete lib/README file. + + o lib/sql_query.h no longer #includes custom.h, simplifying + build-time dependencies and shortening compile times. + + +1.7.20, 2004.11.03 (r258) + + o Collapsed all numbered *.hh headers into a single *.h file. For + example, the contents of row1.hh, row2.hh and row3.hh are now in + row.h. + + o While doing the previous change, broke several circular + dependencies. (The numbered file scheme was probably partly done + to avoid this problem.) The practical upshot of most of these + changes is that some functions are no longer inline. + + o Removed define_short.hh and everything associated with it. The + library now uses the short names exclusively (e.g. Row instead of + MysqlRow). + + o Put all definitions into namespace mysqlpp. For most programs, + simply adding a 'using namespace mysqlpp' near the top of the + program will suffice to convert to this version. + + o Once again, the main include file was renamed, this time to + mysql++.h. Hopefully this is the last renaming! + + o mysql++.hh still exists. It emits a compiler warning that the + file is obsolete, then it #includes mysql++.h for you. + + o sqlplus.hh is back, being a copy of the new mysql++.hh. Both of + these files may go away at any time. They exist simply to help + people transition to the new file naming scheme. + + o Renamed mysql++-windows.hh to platform.h, and added code to it to + handle #inclusion of config.h on autotools-based systems + intelligently. This fixes the config.h error when building under + Visual C++. + + o There is now only one place where conditional inclusion of + winsock.h happens: platform.h. + + o Beautified the example programs. + + +1.7.19, 2004.10.25 (r186) + + o Fixed an infinite loop in the query mechanism resulting from the + strstream change in the previous version. There is an overloaded + set of str() member functions that weren't a problem when query + objects were based on strstream. + + o Query mechanism had a bunch of const-incorrectness: there were + several function parameters and functions that were const for + the convenience of other parts of the code, but within these + functions the constness was const_cast away! This was evil + and wrong; now there are fewer const promises, and only one is + still quietly broken within the code. (It's in the SQLQuery + copy ctor implementation; it should be harmless.) + + o Removed operator=() in Query and SQLQuery classes. It cannot take + a const argument for the same reason we have to cast away const + in the SQLQuery copy ctor. It's tolerable to do this in the copy + ctor, but intolerable in an operator. Since the copy ctor is good + enough for all code within the library and within my own code, I'm + removing the operator. + + o Above changes required bumping the ABI to version 2. + + o Visual C++ projects now look for MySQL build files in c:\mysql, + since that's the default install location. (Previously, it was + c:\program files\mysql.) + + +1.7.18, 2004.10.01 (r177) + + o Changed all the strstream (and friends) stuff to stringstream type + classes. Let there be much rejoicing. + + o Query object now lets you use store() even when the SQL query + cannot return a result, such as a DROP TABLE command. This is + useful for sending arbitrary SQL to the server. Thanks to + Jose Mortensen for the patch. + + o Quote fix in configure.in, thanks to David Sward. + + o Renamed undef_short file to undef_short.hh. + + o Gentoo ebuild file is actually being shipped with the tarball, + instead of just sitting in my private CVS tree since 1.7.14 was + current. Ooops.... + + +1.7.17, 2004.09.16 (r170) + + o Reverted one of the VC++ warning fix changes from 1.7.16 that + caused crashes on Linux. + + o Added a configure test that conditionally adds the extra 'level' + parameter to mysql_shutdown() that was added in MySQL 4.1.3 and + 5.0.1. + + +1.7.16, 2004.09.13 (r160) + + o Building VC++ version with DLL version of C runtime libraries, and + at warning level 3 with no warnings emitted. + + o VC++ build no longer attempts to fake "long long" support. See + the Wishlist for further thoughts on this. + + +1.7.15, 2004.09.02 (r144) + + o Renamed Configure file to common.am, to avoid file name conflict + with configure script on case-sensitive file systems. + + o Added ebuild file and ebuild target to top-level Makefile for + Gentoo systems. Thanks to Chris Frey for this. + + o Small efficiency improvements to BadQuery exception handling. + Initial idea by Chris Frey, improvements by Warren Young. + + +1.7.14, 2004.08.26 (r130) + + o Builds with Visual C++ 7.1. + + o Fixed a bug in custom macro generation that caused problems with + GCC 3.4. (X_cus_value_list ctor definition was broken.) + + +1.7.13, 2004.08.23 (r92) + + o Removed USL CC support. (System V stock system compiler.) Use + GCC on these platforms instead. + + o Added examples/README, explaining how to use the examples, and + what they all do. + + o Most of the example programs now accept command line arguments for + host name, user name and password, like resetdb does. + + o Renamed sinisa_ex example to dbinfo. + + o Several Standard C++ syntax fixes to quash errors emitted by + GCC 3.4 and Borland C++ Builder 6. Thanks to Steffen Schumacher + and Totte Karlsson for their testing and help with these. + + o Added proper #includes for BCBuilder, plus project files for same. + Thanks to Totte Karlsson for these. + + +1.7.12, 2004.08.19 (r63) + + o Many Standard C++ fixes, most from the GCC 3.4 patch by + Rune Kleveland. + + o Added Wishlist file to distribution. + + o Fixed a problem in the bootstrap script that caused complaints + from the autotools on some systems. + + o RPM building is working properly now. + + o Fixed the idempotency guard in datetime1.hh. + + +1.7.11, 2004.08.17 (r50) + + o Renamed mysql++, defs and define_short files, adding .hh to the + end of each. (They're header files!) This shouldn't impact + library users, since these are hopefully used internal to the + library only. + + o Removed sqlplus.hh file. Use mysql++.hh instead. + + o Added mysql++.spec, extracted from contributed 1.7.9 source RPM, + and updated it significantly. Also, added an 'rpm' target to + Makefile.am to automate the process of building RPMs. + + o Added bootstrap and LGPL files to distribution tarball. + + o Added pre-1.7.10 history to this file. + + o Removed .version file. Apparently it's something required by old + versions of libtool. + + +1.7.10, 2004.08.16 (r27) + + o Maintenance taken over by Warren Young (mysqlpp at etr dash usa + dot com.) See http://lists.mysql.com/plusplus/3326 for details. + + o Applied many of the GCC 3.x patches submitted for 1.7.9 over + the years. This allows it to build on everything from 3.0 to + 3.3.3, at least. Because so many patches are rolled up in one + big jump, it's difficult to describe all the changes and where + they came from. Mostly they're Standard C++ fixes, as GCC + has become more strict in the source code that it will accept. + + o MysqlRow used to overload operator[] for string types as well as + integers so you could look up a field by its name, rather than by + its index. GCC 3.3 says this is illegal C++ due to ambiguities in + resolving which overload should be used in various situations. + operator[] is now overloaded only for one integer type, and a + new member function lookup_by_name() was added to maintain the old + by-field-name functionality. + + o Fixed another operator overloading problem in SSQLS macro + generation with GCC 3.3. + + o The _table member of SSQLS-defined structures is now const char*, + so you can assign to it from a const char* string. + + o Got autoconf/automake build system working with current versions + of those tools again. Removed the generated autotools files from + CVS. + + o Renamed library file from libsqlplus to libmysqlpp. + + +1.7.9 (May 1 2001) Sinisa Milivojevic + + * Fixed a serious bug in Connection constructor when reading MySQL + * options + * Improved copy constructor and some other methods in Result / + * ResUse + * Many other minor improvements + * Produced a complete manual with chapter 5 included + * Updated documentation, including a Postscript format + +1.7.8 (November 14 2000) Sinisa Milivojevic + + * Introduced a new, standard way of dealing with C++ exceptions. + * MySQL++ now supports two different methods of tracing exceptions. + * One is by the fixed type (the old one) and one is standard C++ + * type by the usage of what() method. A choice of methods has to be + * done in building a library. If configure script is run with + * -enable-exception option , then new method will be used. If no + * option is provided, or -disable-exception is used, old MySQL++ + * exceptions will be enforced. This innovation is a contribution of + * Mr. Ben Johnson + * MySQL++ now automatically reads at connection all standard MySQL + * configuration files + * Fixed a bug in sql_query::parse to enable it to parse more then 99 + * char's + * Added an optional client flag in connect, which will enable usage + * of this option, e.g. for getting matched and not just affected + * rows. This change does not require any changes in existing + * programs + * Fixed some smaller bugs + * Added better handling of NULL's. Programmers will get a NULL + * string in result set and should use is_null() method in ColData to + * check if value is NULL + * Further improved configuration + * Updated documentation, including a Postscript format + +1.7.6 (September 22 2000) Sinisa Milivojevic + + * This release contains some C++ coherency improvements and scripts + * enhacements + * result_id() is made available to programmers to fetch + * LAST_INSERT_ID() value + * Connection constroctur ambiguity resolved, thanks to marc@mit.edu + * Improved cnnfigure for better finding out MySQL libraries and + * includes + * Updated documentation, including a Postscript format + +1.7.5 (July 30 2000) Sinisa Milivojevic + + * This release has mainl bug fixes and code improvements + * A bug in FieldNames::init has been fixed, enabling a bug free + * usage of this class with in what ever a mixture of cases that is + * required + * Changed behaviour of ResUse, Result and Row classes, so that they + * could be re-used as much as necessary, without any memory leaks, + * nor with any re-initializations necessary + * Fixed all potential leaks that could have been caused by usage of + * delete instead of delete[] after memory has been allocated with + * new[] + * Deleted all unused classes and macros. This led to a reduction of + * library size to one half of the original size. This has + * furthermore brought improvements in compilation speed + * Moved all string manipulation from system libraries to + * libmysqlclient, thus enabling uniformity of code and usage of 64 + * bit integers on all platforms, including Windows, without + * reverting to conditional compilation. This changes now requires + * usage of mysql 3.23 client libraries, as mandatory + * Changed examples to reflect above changes + * Configuration scripts have been largely changed and further + * changes shall appear in consecutive sub-releases. This changes + * have been done and shall be done by our MySQL developer Thimble + * Smith + * Changed README, TODO and text version of manual. Other versions of + * manual have not been updated + * Fixed .version ``bug''. This is only partially fixed and version + * remains 1.7.0 due to some problems in current versions of libtool. + * This shall be finally fixed in a near future + * Several smaller fixes and improvements + * Added build.sh script to point to the correct procedure of + * building of this library. Edit it to add configure options of your + * choice + +1.7 (May17 2000) Sinisa Milivojevic + + * This is mainly a release dealing with bug fixes, consistency + * improvements and easier configure on some platforms + * A bug in fetch_row() method of ResUse class has been fixed. Beside + * changes that existed in a distributed patch, some additional error + * checking has been introduced + * A bug in escape manipulator has been fixed that could cause an + * error if all characters had to be escaped + * An inconsistency in column indexing has been fixed. Before this + * version, column names in row indexing with strings, i.e. + * row[] , has been case sensitive, which was inconsistent + * with MySQL server handling of column names + * An inconsistency in conversion from strings to integers or floats + * has been fixed. In prior version a space found in data would cause + * a BadConversion exception. This has been fixed, but 100% + * consistency with MySQL server has not been targeted, so that other + * non-numeric characters in data will still cause BadConversion + * exception or error. As this API is used in applications, users + * should provide feedback if full compatibility with MySQL server is + * desired, in which case BadConversion exception or error would be + * abolished in some of future versions + * A new method in ColData class has been introduced. is_null() + * method returns a boolean to denote if a column in a row is NULL. + * Finally, as of this release, testing for NULL values is possible. + * Those are columns with empty strings for which is_null() returns + * true. + * Some SPARC Solaris installations had C++ exception problems with + * g++ 2.95.2 This was a bug that was fixed in GNU gcc, as from + * release 2.95 19990728. This version was thoroughly tested and is + * fully functional on SPARC Solaris 2.6 with the above version of + * gcc. + * A 'virtual destructor ' warning for Result class has been fixed + * Several new functions for STL strings have been added. Those + * functions (see string_util.hh) add some of the functionality + * missing in existing STL libraries + * Conversion for 64 bit integers on FreeBSD systems has been added. + * On those systems _FIX_FOR_BSD_ should be defined in CXXFLAGS prior + * to configuring. Complete conversion to the usage of functions for + * integer conversion found in mysqlclient library is planned for one + * of the next releases + * A completely new, fully dynamic, dramatic and fully mutable result + * set has been designed and will be implemented in some of 2.x + * releases + * Several smaller fixes and improvements, including defaulting + * exceptions to true, instead of false, as of this version + * An up-to-date and complete Postscript version of documentation is + * included in this distribution + * Large chunks of this manual are changed, as well as README and + * TODO files. + +1.6 (Feb 3 2000) Sinisa Milivojevic + + * This is a major release as it includes new features and major + * rewrites + * Automatic quoting and escaping with streams. It works + * automatically , depending on the column type. It will work with << + * on all ostream derived types. it is paricularly handy with query + * objects and strstreams. Automatic quoting and escaping on cout, + * cerr and clog stream objects is intentionally left out, as quoting + * / escaping on those stream objects is not necessary. This feature + * can be turned of by setting global boolean dont_quote_auto to + * true. + * Made some major changes in code, so that now execute method should + * be used only with SSQL and template queries, while for all other + * query execution of UPDATE's, INSERT's, DELETE's, new method exec() + * should be used. It is also faster. + * New method get_string is inroduced for easier handling / casting + * ColData into C++ strings. + * Major rewrite of entire code, which led to it's reduction and + * speed improvement. This also led to removal of several source + * files. + * Handling of binary data is introduced. No application program + * changes are required. One of new example programs demonstrates + * handling of binary data + * Three new example programs have been written and thoroughly + * tested. Their intention is to solve some problems addressed by + * MySQL users. + * Thorough changes is Makefile system has been made + * Better configuration scripts are written, thanks to D.Hawkins + * + * Added several bug fixes + * Changed Manual and Changelog + +1.5 (Dec 1 1999) Sinisa Milivojevic + + * Fixed bug in template queries, introduced in 1.4 (!) + * Fixed connect bug + * Fixed several bug in type_info classes + * Added additional robustness in classes + * Added additional methods for SQL type info + * Changed Changelog and README + +1.4 (Nov 25 1999) Sinisa Milivojevic + + * Fixed bug in store and storein methods + * Fixed one serious memory leak + * Fixed a very serious bug generated by gcc 2.95.xx !! + * Added robustness in classes, so that e.g. same query and row + * objects can be re-used + * Changed sinisa_ex example to reflect and demonstrate this + * stability + * Changed Changelog and README + * Few other bug fixes and small improvements and speed-ups + +1.3 (Nov 10 1999) Sinisa Milivojevic + + * Fixed several erronous definitions + * Further changed source to be 2.95.2 compatible + * Expunged unused statements, especially dubious ones, like use of + * pointer_tracker + * Corrected bug in example file fieldinf1 + * Finally fixed mysql_init in Connection constructor, which provided + * much greater stability ! + * Added read and get options, so that clients, like mysqlgui can use + * it + * Changed Changelog and README + * Many other bug fixes. + +1.2 (Oct 15 1999) Sinisa Milivojevic + + * First offical release. Version 1.0 and 1.1 were releases by Sinisa + * before I (Kevin Atkinson) made him the offical maintainer, + * Many manual fixes. + * Changed README and Changelog + * Changed source to be compilable by gcc 2.95.xx, tribute to Kevin + * Atkinson + * Added methods in Connection class which are necessary for + * fullfilling administrative functions with MySQL + * Added many bug fixes in code pertaining to missing class + * initializers , as notified by Michael Rendell + * Sinisa Milivojevic is now the offical + * maintainer. + +1.1 (Aug 2 1999) Sinisa Milivojevic + + * Added several bug fixes + * Fixed memory leak problems and variables overlapping problems. + * Added automake and autoconf support by loic@ceic.com + * Added Makefile for manual + * Added support for cygwin + * Added example sinisa_ex (let modesty prevail) which used to crash + * a lot when memory allocation, memory leak and overlap problems + * were present. Smooth running of this example proves that all those + * bugs are fixed + * Corrected bugs in sql_query.cc regarding delete versus delete[] + * and string length in manip.cc + * Changed manual + * Changed README + * Many other smaller things + +1.0 (June 9 1999) Michael Widenius + + * Added patches from Orion Poplawski to support the + * UnixWare 7.0 compiler + +.64.1.1a (Sep 27 1998) + + * Fixed several bugs that caused my library to fail to compile with + * egcs 1.1. Hopefully it will still compile with egcs 1.0 however I + * have not been able to test it with egcs 1.0. + * Removed some problem causing debug output in sql++pretty. + +.64.1a (Aug 1 1998) + + * Added an (almost) full guide to using Template Queries. + * Fixed it so the SQLQuery will throw an exception when all the + * template parameters are not provided. + * Proofread and speedchecked the manual (it really needed it). + * Other minor document fixes. + +.64.0.1a (July 31 1998) + + * Reworked the Class Reference section a bit. + * Minor document fixes + * Added more examples for SSQLS. + * Changed the syntax of equal_list for SSQLS from equal_list (cchar + * *, Manip, cchar *) to (cchar *, cchar *, Manip). + * Added set methods to SSQLS. These new methods do the same thing as + * there corresponding constructors. + * Added methods for creating a mysql_type_info from a C++ type_info. + +.64.a (July 24 1998) + + * Changed the names of all the classes so they no longer have to + * have Mysql in the begging of it. However if this creates a problem + * you can define a macro to only use the old names instead. + * The Specialized SQL Structures (formally known as Custom Mysql + * Structures) changed from mysql_ to sql_. + * Added the option of using exceptions thoughout the API. + * ColData (formally known as MysqlStrings) will now throw an + * exception if there is a problem in the conversion. + * Added a null adapter. + * Added Mutable Result Sets + * Added a very basic runtime type identification for SQL types + * Changed the document format from POD to LYX . + * Am now using a modified version of Perceps to extract the class + * information directly from the code to make my life easier. + * Added an option of defining a macro to avoid using the automatic + * conversion with binary operators. + * Other small fixed I probully forgot to mentune. + +.63.1.a + + * Added Custom Mysql Structures. + * Fixed the Copy constructor of class Mysql + * Started adding code so that class Mysql lets it children now when + * it is leaving + * Attempted to compile it into a library but still need help. As + * default it will compile as a regular program. + * Other small fixes. + +.62.a (May 3 1998) + + * Added Template Queries + * Created s separate SQLQuery object that is independent of an SQL + * connection. + * You no longer have to import the data for the test program as the + * program creates the database and tables it needs. + * Many small bug fixes. + +.61.1.a (April 28 1998) + + * Cleaned up the example code in test.cc and included it in the + * manual. + * Added an interface layout plan to the manual. + * Added a reverse iterator. + * Fixed a bug with row.hh (It wasn't being included because of a + * typo). + +.61.0.a + + * Major interface changes. I warned you that the interface may + * change while it is in pre-alpha state and I wasn't kidding. + * Created a new and Separate Query Object. You can no longer execute + * queries from the Mysql object instead you have to create a query + * object with Mysql::query() and use it to execute queries. + * Added the comparison operators to MysqlDate, MysqlTime and + * MysqlDateTime. Fixed a few bugs in the MysqlDate... that effected + * the stream output and the conversion of them to strings. + * Reflected the MysqlDate... changes in the manual. + * Added a new MysqlSet object and a bunch of functions for working + * with mysql set strings. + +.60.3a (April 24 1998) + + * Changed strtoq and strtouq to strtoll and strtull for metter + * compatibility Minor Manual fix. + * Changed makefile to make it more compatible with Solaris (Thanks + * Chris H) + * Fixed bug in comparison functions so that they would compare in he + * right direction. + * Added some items to the to do list be sure to have a look. Index: doc/README-manuals-RPM.txt ================================================================== --- doc/README-manuals-RPM.txt +++ doc/README-manuals-RPM.txt @@ -1,5 +1,314 @@ -For more information about MySQL++, see its home page: +Patches for any of these thoughtfully considered! See the HACKERS file +for instructions on sending patches. + +The items in the bug fix/maintenance section are the easiest to do +without breaking things, so if you're looking for a project.... + +Here's a meta-item that doesn't really fit into any of the categories +below: any time you must hand-roll some SQL code in your program, +consider whether it could be reduced to an API feature that would be +widely useful. Patches or proposals of this sort are always welcome. + + +v2.1 Plan +--------- + + This plan is not set in stone. These are simply the features + we want to try and tackle for the v2.1 release. + + Items in this plan may slip to a future release. This + typically happens when the proper solution is unclear, + so the best way to prevent this is to get on the mailing + list and help discuss it. Or even better, provide a patch; + we rarely reject working code outright. + + Items from the following sections may make it in, but if + you don't help make that happen, this will just be on the + whim of one of MySQL++'s developers. Don't forget that it's + possible to subclass yourself from the "MySQL++'s developers" + base class. + + + o Transaction support. Create a "Transaction" class, an + object of which you create on the stack, giving it a + reference to the Connection object. Transaction object's + ctor calls a function on the Connection object to start + a transaction set, and its dtor calls another function to + commit the transaction. Also provide a "commit()" member + function, to commit before destruction. This has a couple + of uses. First, it's useful for avoiding exceptions coming + from ~Transaction(), if such a thing is possible. Second, + sometimes it's inconvenient to wait until the end of a block + to commit the transaction, and adding artifical blocks is + somewhat ugly. + + o Add a configure script option to allow the new lock + mechanism to use platform mutexes via the Boost.Threads + library. + + Mechanism must reflect these MySQL C API restrictions: + + - Only one query executing at once per connection + + - For "use" queries, Connection (and therefore Query) object must + remain locked until last row is consumed + + - Safest to have one Connection per thread. Rules for sharing: + http://dev.mysql.com/doc/mysql/en/threaded-clients.html + + Need some way to call mysql_thread_init() and + mysql_thread_end() per thread. Also, work in some way to + call mysql_thread_safe() automatically, perhaps the first + time through the function that calls mysql_thread_init(). + If the C API library reports that it is not thread-safe, + report this to the caller, perhaps through an exception, + or simply by refusing to init more than one thread. + + o Currently, all overloads for Query's execute(), store() + and use() methods eventually call the const char* + version, which does the actual work of executing the query. + This rules out query strings with embedded nulls, as you're + likely to get with BLOB columns. Also, it means MySQL++ + must scan the string for length in a few places. The C API + isn't limited in this way if you use mysql_real_query(), + but you need an accurate length value to call it. We could + get that length with binary data if the end of the call + chain were a std::string overload, but we can't do that + easily because each of these functions has a version taking + a SQLString (a subclass of std:string) for template queries. + + One way around this is to add a parallel set of functions + (e.g. do_execute(), or execute_(), or some such) that take + a single std::string, which are the new terminus of the call + chain. Reimplement const char* versions in terms of these. + + Another way is to rename the template query versions (e.g. to + execute_tq()) to avoid the overload conflict. With that + done, we can use C API functions like mysql_real_query(), + which can take binary data. + + Yet another way is to add a length parameter to the call + chain end functions. + + And finally, we may be able to co-opt the first template + query version of each of these functions, as it takes a + single SQLString. + + o Date and time classes are pretty minimalistic; they could + be so much more powerful. Some ideas: + + - Add time_t conversion. + + - Arithmetic features. (See "Algorithms for Programmers" + by Binstock and Rex.) + + - It may be possible to get some nice syntactic sugar, + such as a way to call SQL functions like NOW() when + inserting certain Date/Time objects into a Query stream. + + Don't forget to write an example showing how to use these + new mechanisms. + + It may be possible to find existing date and time classes + that can be extended, instead of reinventing the wheel. + Boost, perhaps? + + o When you create a Connection object with its default ctor and + don't .connect() it, several of its functions can fail to + work correctly. ping(), for one, because the MYSQL handle + isn't initialized until the connection is established. + Decide how to cope: a) init the handle in all ctors; b) + throw ObjectNotInitialized when the library knows the + call will fail; or c) just return a failure code and hope + the user is checking it. Could be a different answer for + each function. Keep in mind the consequences for database- + independence here. + + o Build a forward iterator mechanism for ResUse. Make it + general enough that you can use it with STL algorithms + like find_if(). Then make an example to demonstrate this + augmentation of SELECT. Also, update usequery example + to use the iterator. Tricky bit: how do we make it not + interfere with subclass Result's random-access iterator? + + o Write an example to demonstrate compare.h features, or throw + the header away. It's not being used within the library. + + o Have resetdb create a second table containing a BLOB column + that load_file and cgi_image can use. + + Rework load_image to take the standard command line + parameters, and load a JPEG or something into the BLOB table. + Include a suitable JPEG with the distribution. (A cheesy + Photoshopped "MySQL++ Rocks!" thing should suffice.) + + Rework cgi_image so that you can drop it into a cgi-image + directory and immediately use it to query the database and + return the image data in CGI format. + + o It may be possible to optimize the use of ColData in + the return from Row::operator[]. Currently, that operator + returns a temporary ColData object, which contains a + std::string buffer which is initialized by a const char* + pointer to data within the Row object. Since the ColData + object is temporary, you currently must copy the data a + second time to store it when using Row::operator[]. If the + end user just wants a const char*, this double copy could + be prevented. See http://lists.mysql.com/plusplus/4451 + for the proposal. + + +Future Features +--------------- + + These changes are planned for versions after v2.1. If you + need one of these changes to happen on some particular + schedule, the best way to ensure it is to start coding and + provide a patch! + + + o Define operator<< for Fields, Row, ResUse, etc. In other + words, there should be a way to get a user-readable version + of received data without a lot of code. Perhaps use a CSV + output format, or a mysql(1) one (ASCII grid). + + o Abstract all uses of MySQL C API functions into a database + driver class with a generic interface. This is a step + towards database-independence, without the parallel class + hierarchy required by the MySQL++ 1.7 design. Also, it + will make it easier to make class Connection completely + friend-less. Right now, the main reason it needs friends + is because these other classes make C API calls using its + private MYSQL data member. The other reasons for it having + friends aren't nearly as compelling, so it wouldn't be + hard to justify redesigning Connection to eliminate these + final reasons. + + While it would be easy to have just one global database + driver object, it's probably going to be necessary to have + one per Connection. Consider what happens when you have one + program connected to two very different MySQL databases, + and you indirectly call C API functions that take MYSQL + parameters. It's likely that those calls are supposed + to behave different, depending on the data in that MYSQL + object; for instance, different character encodings in the + selected databases. So, there must somehow be a way to pass + the database driver's instance pointer down to all objects + that will need to use the driver. A side benefit is that + a single program could talk to multiple different database + server types. Imagine a program for importing data from + PostgreSQL and loading it into a MySQL table, for instance. + + o manip.cpp uses mysql_escape_string(), which doesn't take the + selected database's character set into account. To do that, + you must use mysql_real_escape_string(), which differs + by taking a MYSQL instance as an additional parameter. + The problem is, Connection owns the relevant MYSQL instance, + and the manipulator functionality is implemented in global + functions (operator<<() and such) so they have no direct + access to the relevant Connection object. + + The key question for all operator<<'s for manipulators + to ask is, "which Query object am I being inserted into?" + From there, you can look up the associated Connection object. + + In some cases, this answer to the question is easy, because + the operator takes an ostream parameter, which can be + dynamically cast to Query. From there, it's just a lookup + table problem. + + Other operator<<'s don't take an ostream, but they do take + a manipulator. Right now, manipulators are just enum values, + but they could in fact be classes. Classes can carry data, + so there may be a way to "bind" them to the appropriate + Connection object. If not, then perhaps some other method + will pop out of the database driver class idea. The driver + object may be able to look up a suitable Connection object + for the manipulators. + + o SSQLS structures include some static elements (_table and + names[]), which are defined within the macro. If you + put an SSQLS declaration in a header file and #include + that from multiple locations, you get a multiply-defined + symbol warning. Some ways to separate the definition from + the declaration: + + o Give the SSQLS macros another parameter, to + suppress static definition. + + o Put statics in a separate macro, which the + user must instantiate once in a .cpp file. + (Similar to the way MFC message maps work.) + + o Put statics in a sub-macro, conditionally defined, + which SSQLS is implemented in terms of. Define the + condition macro in one module within your + program. + + o Redesign the SSQLS mechanism entirely. Instead of + defining SSQLSes by instantiating macros, you could + declare the structure in, say, an XML format, + which could be tranformed (XSLT? Perl + a DOM + parser?) into code very much like in the current + SSQLS macros, except that it would generate + separate .cpp and .h files for each structure. + In addition to solving the static member problem, + it would have other advantages, like side-stepping + the Borland C++ macro size limit. + + o Deprecate sql_create_basic_* ? They have less functionality + and they're no easier to use than sql_create and friends, + so why bother with them? I suppose the code generated + is a bit smaller, but *really*.... Only possible saving + grace is if BC++ can compile them due to the macro code + being shorter. They also don't have the static members, + mentioned in the previous item. + + o Consider whether some of the current boilerplate can be + made into a base class that all SSQLSes derive from. + This may have implications for some templates, like + Query::insert...they might become regular member + functions, taking a reference to the base class. + + o MySQL++ handles automatic quoting and escaping differently + for cout and cerr than for Query streams. This should + probably be simplified so that automatic quoting is only + done for Query streams. No other stream type should be + treated specially. + + o Some field_list() functions use the do_nothing manipulator, + while others use the quote manipulator. Need to pick one. + In the vast majority of cases, quoting won't be necessary, + so make that the default. But, it should be possible to turn + it on, if needed. If all uses of quoting are in template + code, this can be a #define, allowing different programs + built on the same system to get different quoting rules. + Otherwise, it will probably have to be a configure script + flag, which will "burn" the choice into the built binary. + + o User-settable floating-point comparison precisions? + Something like this: http://lists.mysql.com/plusplus/3984 + As it currently stands, sql_cmp(double,double) is foolish. + One shouldn't do exact equality comparison on floating + point values. + + o Consider using MySQL C API enum constants in + mysql_type_info::types definition instead of hard-coded + values. This could potentially break a lot of + infrastructure, though, so do it only with care. + + +Bug Fix/Maintenance Items +------------------------- + + These items could happen in any version. + - http://tangentsoft.net/mysql++/ + o 64-bit integer support has been reported to work, but more + confirmation is wanted. -See the LICENSE file in this directory for the library's license. + o Template ListInsert in lib/myset.h isn't being used within the + library. It could probably be used in place of SetInsert + in the same file, which things like type_info.h do use now, + but it isn't clear how one would go about doing that without + changing the library code. Document it or throw it away. Index: doc/ssqls-pretty ================================================================== --- doc/ssqls-pretty +++ doc/ssqls-pretty @@ -1,83 +1,207 @@ -#!/usr/bin/perl -use FileHandle; -use IPC::Open2; - -if ($ARGV[0] =~ /^--command\=(.+)/) { - $command = $1; -} else { - $command = "g++ -E -I /usr/include/mysql"; -} - -if (-e 'lib/mysql++.h') { - $command .= " -I lib"; -} -else { - $command .= " -I /usr/include/mysql++/"; -} - -$/ = undef; -$orgcode = ; - -($macro) = $orgcode =~ /(sql_create_.+? *\(.+?\))/s; - -$out = << "---"; - -#include - -$macro - ---- - -$/ = "\n"; - -$temp_dir = -d '/tmp' ? '/tmp' : $ENV{TMP} || $ENV{TEMP}; - -#print $out; - -open OUT, ">$temp_dir/${$}.cc"; -print OUT $out; -close OUT; - -system "$command $temp_dir/${$}.cc > $temp_dir/${$}.ii"; - -open IN, "$temp_dir/${$}.ii"; -while () { - next if /^\#/; - $code .= $_; -} -close IN; - -unlink "$temp_dir/${$}.cc","$temp_dir/${$}.ii"; - -$_ = $code; -s/\s+/ /g; -s/ *public: */public:\n/g; -s/ *private: */public:\n/g; -s/ *\; */\;\n/g; -s/ *\{ */ \{\n/g; -s/ *\} */ \}\n\n/g; -s/ *\n */\n/g; -s/\{\s+}/\{\}/g; -s/\}\s+\;/\}\;\n/g; - -$code = ""; -foreach (split /\n/) { - if (/\}/ && !/\{\}/ ) { - $indent -= 2; - $ind = ' 'x$indent; - } - $code .= "$ind$_\n" unless /\:$/; - $code .= "$_\n" if /\:$/; - if (/\{/ && !/\{\}/ ) { - $indent += 2; - $ind = ' 'x$indent; - } -} - -$orgcode =~ s/(sql_create_.+? *\(.+?\))/\n$code\n/s; - -print $orgcode; - - - - +/*********************************************************************** + multiquery.cpp - Example showing how to iterate over result sets upon + execution of a query that returns more than one result set. You can + get multiple result sets when executing multiple separate SQL + statments in a single query, or when dealing with the results of + calling a stored procedure. + + Copyright (c) 1998 by Kevin Atkinson, (c) 1999, 2000 and 2001 by + MySQL AB, (c) 2004, 2005 by Educational Technology Resources, Inc., + and (c) 2005 by Arnon Jalon. 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 "cmdline.h" +#include "printdata.h" + +#include + +#include +#include +#include + +using namespace std; +using namespace mysqlpp; + + +typedef vector IntVectorType; + + +static void +print_header(IntVectorType& widths, StoreQueryResult& res) +{ + cout << " |" << setfill(' '); + for (size_t i = 0; i < res.field_names()->size(); i++) { + cout << " " << setw(widths.at(i)) << res.field_name(i) << " |"; + } + cout << endl; +} + + +static void +print_row(IntVectorType& widths, Row& row) +{ + cout << " |" << setfill(' '); + for (size_t i = 0; i < row.size(); ++i) { + cout << " " << setw(widths.at(i)) << row[i] << " |"; + } + cout << endl; +} + + +static void +print_row_separator(IntVectorType& widths) +{ + cout << " +" << setfill('-'); + for (size_t i = 0; i < widths.size(); i++) { + cout << "-" << setw(widths.at(i)) << '-' << "-+"; + } + cout << endl; +} + + +static void +print_result(StoreQueryResult& res, int index) +{ + // Show how many rows are in result, if any + StoreQueryResult::size_type num_results = res.size(); + if (res && (num_results > 0)) { + cout << "Result set " << index << " has " << num_results << + " row" << (num_results == 1 ? "" : "s") << ':' << endl; + } + else { + cout << "Result set " << index << " is empty." << endl; + return; + } + + // Figure out the widths of the result set's columns + IntVectorType widths; + int size = res.num_fields(); + for (int i = 0; i < size; i++) { + widths.push_back(max( + res.field(i).max_length(), + res.field_name(i).size())); + } + + // Print result set header + print_row_separator(widths); + print_header(widths, res); + print_row_separator(widths); + + // Display the result set contents + for (StoreQueryResult::size_type i = 0; i < num_results; ++i) { + print_row(widths, res[i]); + } + + // Print result set footer + print_row_separator(widths); +} + + +static void +print_multiple_results(Query& query) +{ + // Execute query and print all result sets + StoreQueryResult res = query.store(); + print_result(res, 0); + for (int i = 1; query.more_results(); ++i) { + res = query.store_next(); + print_result(res, i); + } +} + + +int +main(int argc, char *argv[]) +{ + // Get connection parameters from command line + const char* db = 0, *server = 0, *user = 0, *pass = ""; + if (!parse_command_line(argc, argv, &db, &server, &user, &pass)) { + return 1; + } + + try { + // Enable multi-queries. Notice that you almost always set + // MySQL++ connection options before establishing the server + // connection, and options are always set using this one + // interface. If you're familiar with the underlying C API, + // you know that there is poor consistency on these matters; + // MySQL++ abstracts these differences away. + Connection con; + con.set_option(new MultiStatementsOption(true)); + + // Connect to the database + if (!con.connect(db, server, user, pass)) { + return 1; + } + + // Set up query with multiple queries. + Query query = con.query(); + query << "DROP TABLE IF EXISTS test_table; " << + "CREATE TABLE test_table(id INT); " << + "INSERT INTO test_table VALUES(10); " << + "UPDATE test_table SET id=20 WHERE id=10; " << + "SELECT * FROM test_table; " << + "DROP TABLE test_table"; + cout << "Multi-query: " << endl << query << endl; + + // Execute statement and display all result sets. + print_multiple_results(query); + +#if MYSQL_VERSION_ID >= 50000 + // If it's MySQL v5.0 or higher, also test stored procedures, which + // return their results the same way multi-queries do. + query << "DROP PROCEDURE IF EXISTS get_stock; " << + "CREATE PROCEDURE get_stock" << + "( i_item varchar(20) ) " << + "BEGIN " << + "SET i_item = concat('%', i_item, '%'); " << + "SELECT * FROM stock WHERE lower(item) like lower(i_item); " << + "END;"; + cout << "Stored procedure query: " << endl << query << endl; + + // Create the stored procedure. + print_multiple_results(query); + + // Call the stored procedure and display its results. + query << "CALL get_stock('relish')"; + cout << "Query: " << query << endl; + print_multiple_results(query); +#endif + + return 0; + } + catch (const BadOption& err) { + cerr << err.what() << endl; + cerr << "This example requires MySQL 4.1.1 or later." << endl; + return 1; + } + catch (const ConnectionFailed& err) { + cerr << "Failed to connect to database server: " << + err.what() << endl; + return 1; + } + catch (const Exception& er) { + // Catch-all for any other MySQL++ exceptions + cerr << "Error: " << er.what() << endl; + return 1; + } +} Index: doc/userman/LICENSE.txt ================================================================== --- doc/userman/LICENSE.txt +++ doc/userman/LICENSE.txt @@ -1,59 +1,138 @@ -MySQL++ User Manual License -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -I. COPYRIGHT - - The copyright to the MySQL++ User Manual is owned by its authors. - - -II. LICENSE - - The MySQL++ User Manual may be reproduced and distributed in whole - or in part, in any medium physical or electronic, provided that - this license notice is displayed in the reproduction. Commercial - redistribution is permitted and encouraged. Thirty days advance - notice via email to the authors of redistribution is appreciated, - to give the authors time to provide updated documents. - - - A. REQUIREMENTS OF MODIFIED WORKS - - All modified documents, including translations, - anthologies, and partial documents, must meet the - following requirements: - - 1. The modified version must be labeled as such. - - 2. The person making the modifications must be - identified. - - 3. Acknowledgement of the original author must be - retained. - - 4. The location of the original unmodified - document be identified. - - 5. The original authors' names may not be used - to assert or imply endorsement of the - resulting document without the original - authors' permission. - - In addition it is requested that: - - 1. The modifications (including deletions) - be noted. - - 2. The authors be notified by email of the - modification in advance of redistribution, - if an email address is provided in - the document. - - Mere aggregation of the MySQL++ User Manual with other - documents or programs on the same media shall not cause - this license to apply to those other works. - - All translations, derivative documents, or modified - documents that incorporate the MySQL++ User Manual may - not have more restrictive license terms than these, - except that you may require distributors to make the - resulting document available in source format. +/// \file noexceptions.h +/// \brief Declares interface that allows exceptions to be optional +/// +/// A class may inherit from OptionalExceptions, which will add to it +/// a mechanism by which a user can tell objects of that class to +/// suppress exceptions. (They are enabled by default.) This module +/// also declares a NoExceptions class, objects of which take a +/// reference to any class derived from OptionalExceptions. The +/// NoExceptions constructor calls the method that disables exceptions, +/// and the destructor reverts them to the previous state. One uses +/// the NoExceptions object within a scope to suppress exceptions in +/// that block, without having to worry about reverting the setting when +/// the block exits. + +/*********************************************************************** + Copyright (c) 2005 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 +***********************************************************************/ + +#ifndef MYSQLPP_NOEXCEPTIONS_H +#define MYSQLPP_NOEXCEPTIONS_H + +namespace mysqlpp { + +#if !defined(DOXYGEN_IGNORE) +// Make Doxygen ignore this +class MYSQLPP_EXPORT NoExceptions; +#endif + +/// \brief Interface allowing a class to have optional exceptions. +/// +/// A class derives from this one to acquire a standard interface for +/// disabling exceptions, possibly only temporarily. By default, +/// exceptions are enabled. + +class MYSQLPP_EXPORT OptionalExceptions +{ +public: + /// \brief Default constructor + /// + /// \param e if true, exceptions are enabled (this is the default) + OptionalExceptions(bool e = true) : + exceptions_(e) + { + } + + /// \brief Destroy object + virtual ~OptionalExceptions() { } + + /// \brief Enable exceptions from the object + void enable_exceptions() { exceptions_ = true; } + + /// \brief Disable exceptions from the object + void disable_exceptions() { exceptions_ = false; } + + /// \brief Returns true if exceptions are enabled + bool throw_exceptions() const { return exceptions_; } + +protected: + /// \brief Sets the exception state to a particular value + /// + /// This method is protected because it is only intended for use by + /// subclasses' copy constructors and the like. + void set_exceptions(bool e) { exceptions_ = e; } + + /// \brief Declare NoExceptions to be our friend so it can access + /// our protected functions. + friend class NoExceptions; + +private: + bool exceptions_; +}; + + +/// \brief Disable exceptions in an object derived from +/// OptionalExceptions. +/// +/// This class was designed to be created on the stack, taking a +/// reference to a subclass of OptionalExceptions. (We call that our +/// "associate" object.) On creation, we save that object's current +/// exception state, and disable exceptions. On destruction, we restore +/// our associate's previous state. + +class MYSQLPP_EXPORT NoExceptions +{ +public: + /// \brief Constructor + /// + /// Takes a reference to an OptionalExceptions derivative, + /// saves that object's current exception state, and disables + /// exceptions. + NoExceptions(OptionalExceptions& a) : + assoc_(a), + exceptions_were_enabled_(a.throw_exceptions()) + { + assoc_.disable_exceptions(); + } + + /// \brief Destructor + /// + /// Restores our associate object's previous exception state. + ~NoExceptions() + { + assoc_.set_exceptions(exceptions_were_enabled_); + } + +private: + OptionalExceptions& assoc_; + bool exceptions_were_enabled_; + + // Hidden assignment operator and copy ctor, because we should not + // be copied. + NoExceptions(const NoExceptions&); + NoExceptions& operator=(const NoExceptions&); +}; + +} // end namespace mysqlpp + +#endif // MYSQLPP_NOEXCEPTIONS_H + Index: doc/userman/Makefile ================================================================== --- doc/userman/Makefile +++ doc/userman/Makefile @@ -1,66 +1,724 @@ -## ------------------------ -## Input files -## ------------------------ - -HTML_DIR=../html/userman -BASENAME=userman -DOCFILE=$(BASENAME).dbx -PDFFILE=../pdf/$(BASENAME).pdf -FOFILE=$(BASENAME).fo -COMMON_SS=common.xsl -FO_SS=fo.xsl -HTML_SS=html.xsl -EX_TXT=cgi_jpeg.txt cpool.txt deadlock.txt fieldinf.txt for_each.txt \ - load_jpeg.txt multiquery.txt resetdb.txt simple1.txt \ - simple2.txt simple3.txt ssqls1.txt ssqls2.txt ssqls3.txt \ - ssqls4.txt ssqls5.txt ssqls6.txt stock.txt store_if.txt \ - tquery1.txt transaction.txt - - -## ------------------------ -## Major output rules -## ------------------------ - -html: $(EX_TXT) $(HTML_DIR)/index.html - -pdf: $(EX_TXT) $(PDFFILE) - - -## ------------------------ -## Standard Makefile targets -## ------------------------ - -# Notice that this is not the first target in the file, as is standard. -# PDF generation takes longer than HTML generation, so to keep the code- -# test-debug-rebuild cycle short, we generate only the HTML manual by -# default. You can explicitly say "make pdf" or "make all" when you're -# sure the DocBook file's contents are correct. -all: html pdf - -clean: - @rm -f tags *.fo $(HTML_DIR)/*.html *.log *.out *.pdf $(EX_TXT) $(PDFFILE) - - -## ------------------------ -## How to make output files -## ------------------------ - -$(PDFFILE): *.dbx *.in $(FO_SS) $(COMMON_SS) - xsltproc --xinclude $(FO_SS) $(DOCFILE) > $(FOFILE) - mkdir -p ../pdf - ./fo2pdf $(FOFILE) $(PDFFILE) - -$(HTML_DIR)/index.html: *.dbx *.in *.mod *.txt *.xsl - @xmllint --xinclude --nonet --postvalid --noent --noout $(DOCFILE) - xsltproc --xinclude --nonet -o $(HTML_DIR)/ $(HTML_SS) $(DOCFILE) - - -## ------------------------ -## Dependency rules -## ------------------------ - -$(EX_TXT): - @./mktxt $@ - -userman.dbx: userman.dbx.in - ( cd ../.. ; ./config.status ) +# ========================================================================= +# This makefile was generated by +# Bakefile 0.2.9 (http://www.bakefile.org) +# Do not modify, all changes will be overwritten! +# ========================================================================= + + + +# ------------------------------------------------------------------------- +# These are configurable options: +# ------------------------------------------------------------------------- + +# Compiler flags to link shared library +LINK_DLL_FLAGS ?= -shared + +# C++ compiler +CXX = g++ + +# Standard flags for C++ +CXXFLAGS ?= + +# Standard preprocessor flags (common for CC and CXX) +CPPFLAGS ?= + +# Standard linker flags +LDFLAGS ?= + +# Type of compiled binaries [debug,release] +BUILD ?= debug + + + +# ------------------------------------------------------------------------- +# Do not modify the rest of this file! +# ------------------------------------------------------------------------- + +### Variables: ### + +CPPDEPS = -MT$@ -MF$@.d -MD -MP +MYSQLPP_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -mthreads -DUNICODE \ + -D_UNICODE -DMYSQLPP_NO_DLL -DHAVE_MYSQL_SSL_SET -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +MYSQLPP_OBJECTS = \ + mysqlpp_beemutex.o \ + mysqlpp_cmdline.o \ + mysqlpp_connection.o \ + mysqlpp_cpool.o \ + mysqlpp_datetime.o \ + mysqlpp_dbdriver.o \ + mysqlpp_field_names.o \ + mysqlpp_field_types.o \ + mysqlpp_manip.o \ + mysqlpp_myset.o \ + mysqlpp_mysql++.o \ + mysqlpp_mystring.o \ + mysqlpp_null.o \ + mysqlpp_options.o \ + mysqlpp_qparms.o \ + mysqlpp_query.o \ + mysqlpp_result.o \ + mysqlpp_row.o \ + mysqlpp_scopedconnection.o \ + mysqlpp_sql_buffer.o \ + mysqlpp_sqlstream.o \ + mysqlpp_ssqls2.o \ + mysqlpp_stadapter.o \ + mysqlpp_tcp_connection.o \ + mysqlpp_transaction.o \ + mysqlpp_type_info.o \ + mysqlpp_uds_connection.o \ + mysqlpp_utility.o \ + mysqlpp_vallist.o \ + mysqlpp_wnp_connection.o +SSQLS2PARSE_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" -I. $(CPPFLAGS) $(CXXFLAGS) +SSQLS2PARSE_OBJECTS = \ + ssqls2parse_parsev2.o +SSQLSXLAT_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +SSQLSXLAT_OBJECTS = \ + ssqlsxlat_genv2.o \ + ssqlsxlat_main.o +TEST_ARRAY_INDEX_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +TEST_ARRAY_INDEX_OBJECTS = \ + test_array_index_array_index.o +TEST_CPOOL_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +TEST_CPOOL_OBJECTS = \ + test_cpool_cpool.o +TEST_DATETIME_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +TEST_DATETIME_OBJECTS = \ + test_datetime_datetime.o +TEST_INTTYPES_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +TEST_INTTYPES_OBJECTS = \ + test_inttypes_inttypes.o +TEST_INSERTPOLICY_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +TEST_INSERTPOLICY_OBJECTS = \ + test_insertpolicy_insertpolicy.o +TEST_MANIP_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +TEST_MANIP_OBJECTS = \ + test_manip_manip.o +TEST_NULL_COMPARISON_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) \ + -Ilib -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +TEST_NULL_COMPARISON_OBJECTS = \ + test_null_comparison_null_comparison.o +TEST_QUERY_COPY_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +TEST_QUERY_COPY_OBJECTS = \ + test_query_copy_query_copy.o +TEST_QSSQLS_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +TEST_QSSQLS_OBJECTS = \ + test_qssqls_qssqls.o +TEST_QSTREAM_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +TEST_QSTREAM_OBJECTS = \ + test_qstream_qstream.o +TEST_SQLSTREAM_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +TEST_SQLSTREAM_OBJECTS = \ + test_sqlstream_sqlstream.o +TEST_SSQLS2_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +TEST_SSQLS2_OBJECTS = \ + test_ssqls2_ssqls2.o +TEST_STRING_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +TEST_STRING_OBJECTS = \ + test_string_string.o +TEST_TCP_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +TEST_TCP_OBJECTS = \ + test_tcp_tcp.o +TEST_UDS_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +TEST_UDS_OBJECTS = \ + test_uds_uds.o +TEST_WNP_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +TEST_WNP_OBJECTS = \ + test_wnp_wnp.o +EXCOMMON_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +EXCOMMON_OBJECTS = \ + excommon_printdata.o +CGI_JPEG_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +CGI_JPEG_OBJECTS = \ + cgi_jpeg_cgi_jpeg.o +CPOOL_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +CPOOL_OBJECTS = \ + cpool_cpool.o +DBINFO_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +DBINFO_OBJECTS = \ + dbinfo_dbinfo.o +DEADLOCK_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +DEADLOCK_OBJECTS = \ + deadlock_deadlock.o +FIELDINF_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +FIELDINF_OBJECTS = \ + fieldinf_fieldinf.o +FOR_EACH_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +FOR_EACH_OBJECTS = \ + for_each_for_each.o +LOAD_JPEG_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +LOAD_JPEG_OBJECTS = \ + load_jpeg_load_jpeg.o +MULTIQUERY_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +MULTIQUERY_OBJECTS = \ + multiquery_multiquery.o +RESETDB_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +RESETDB_OBJECTS = \ + resetdb_resetdb.o +SIMPLE1_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +SIMPLE1_OBJECTS = \ + simple1_simple1.o +SIMPLE2_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +SIMPLE2_OBJECTS = \ + simple2_simple2.o +SIMPLE3_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +SIMPLE3_OBJECTS = \ + simple3_simple3.o +SSQLS1_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +SSQLS1_OBJECTS = \ + ssqls1_ssqls1.o +SSQLS2_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +SSQLS2_OBJECTS = \ + ssqls2_ssqls2.o +SSQLS3_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +SSQLS3_OBJECTS = \ + ssqls3_ssqls3.o +SSQLS4_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +SSQLS4_OBJECTS = \ + ssqls4_ssqls4.o +SSQLS5_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +SSQLS5_OBJECTS = \ + ssqls5_ssqls5.o +SSQLS6_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +SSQLS6_OBJECTS = \ + ssqls6_ssqls6.o +STORE_IF_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +STORE_IF_OBJECTS = \ + store_if_store_if.o +TQUERY1_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +TQUERY1_OBJECTS = \ + tquery1_tquery1.o +TQUERY2_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +TQUERY2_OBJECTS = \ + tquery2_tquery2.o +TQUERY3_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +TQUERY3_OBJECTS = \ + tquery3_tquery3.o +TQUERY4_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +TQUERY4_OBJECTS = \ + tquery4_tquery4.o +TRANSACTION_CXXFLAGS = -mthreads $(__DEBUGINFO) $(__OPTIMIZE_FLAG) -Ilib \ + -I@MYSQL_C_INC_DIR@ -DUNICODE -D_UNICODE -DMYSQLPP_NO_DLL -I"C:\Program \ + Files\MySQL\MySQL Connector C 6.1\include" $(CPPFLAGS) $(CXXFLAGS) +TRANSACTION_OBJECTS = \ + transaction_transaction.o + +### Conditionally set variables: ### + +ifeq ($(BUILD),debug) +__OPTIMIZE_FLAG = -O0 +endif +ifeq ($(BUILD),release) +__OPTIMIZE_FLAG = -O2 +endif +ifeq ($(BUILD),debug) +__DEBUGINFO = -g +endif +ifeq ($(BUILD),release) +__DEBUGINFO = +endif + + +### Targets: ### + +all: mysqlpp.dll libmysqlpp_ssqls2parse.a ssqlsxlat.exe test_array_index.exe test_cpool.exe test_datetime.exe test_inttypes.exe test_insertpolicy.exe test_manip.exe test_null_comparison.exe test_query_copy.exe test_qssqls.exe test_qstream.exe test_sqlstream.exe test_ssqls2.exe test_string.exe test_tcp.exe test_uds.exe test_wnp.exe libmysqlpp_excommon.a cgi_jpeg.exe cpool.exe dbinfo.exe deadlock.exe fieldinf.exe for_each.exe load_jpeg.exe multiquery.exe resetdb.exe simple1.exe simple2.exe simple3.exe ssqls1.exe ssqls2.exe ssqls3.exe ssqls4.exe ssqls5.exe ssqls6.exe store_if.exe tquery1.exe tquery2.exe tquery3.exe tquery4.exe transaction.exe + +clean: + -if exist .\*.o del .\*.o + -if exist .\*.d del .\*.d + -if exist mysqlpp.dll del mysqlpp.dll + -if exist libmysqlpp.a del libmysqlpp.a + -if exist libmysqlpp_ssqls2parse.a del libmysqlpp_ssqls2parse.a + -if exist ssqlsxlat.exe del ssqlsxlat.exe + -if exist test_array_index.exe del test_array_index.exe + -if exist test_cpool.exe del test_cpool.exe + -if exist test_datetime.exe del test_datetime.exe + -if exist test_inttypes.exe del test_inttypes.exe + -if exist test_insertpolicy.exe del test_insertpolicy.exe + -if exist test_manip.exe del test_manip.exe + -if exist test_null_comparison.exe del test_null_comparison.exe + -if exist test_query_copy.exe del test_query_copy.exe + -if exist test_qssqls.exe del test_qssqls.exe + -if exist test_qstream.exe del test_qstream.exe + -if exist test_sqlstream.exe del test_sqlstream.exe + -if exist test_ssqls2.exe del test_ssqls2.exe + -if exist test_string.exe del test_string.exe + -if exist test_tcp.exe del test_tcp.exe + -if exist test_uds.exe del test_uds.exe + -if exist test_wnp.exe del test_wnp.exe + -if exist libmysqlpp_excommon.a del libmysqlpp_excommon.a + -if exist cgi_jpeg.exe del cgi_jpeg.exe + -if exist cpool.exe del cpool.exe + -if exist dbinfo.exe del dbinfo.exe + -if exist deadlock.exe del deadlock.exe + -if exist fieldinf.exe del fieldinf.exe + -if exist for_each.exe del for_each.exe + -if exist load_jpeg.exe del load_jpeg.exe + -if exist multiquery.exe del multiquery.exe + -if exist resetdb.exe del resetdb.exe + -if exist simple1.exe del simple1.exe + -if exist simple2.exe del simple2.exe + -if exist simple3.exe del simple3.exe + -if exist ssqls1.exe del ssqls1.exe + -if exist ssqls2.exe del ssqls2.exe + -if exist ssqls3.exe del ssqls3.exe + -if exist ssqls4.exe del ssqls4.exe + -if exist ssqls5.exe del ssqls5.exe + -if exist ssqls6.exe del ssqls6.exe + -if exist store_if.exe del store_if.exe + -if exist tquery1.exe del tquery1.exe + -if exist tquery2.exe del tquery2.exe + -if exist tquery3.exe del tquery3.exe + -if exist tquery4.exe del tquery4.exe + -if exist transaction.exe del transaction.exe + +mysqlpp.dll: $(MYSQLPP_OBJECTS) + $(CXX) $(LINK_DLL_FLAGS) -fPIC -o $@ $(MYSQLPP_OBJECTS) -Wl,--out-implib=libmysqlpp.a $(__DEBUGINFO) -mthreads -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lwsock32 -lmysql + +libmysqlpp_ssqls2parse.a: $(SSQLS2PARSE_OBJECTS) mysqlpp.dll mysqlpp.dll + if exist $@ del $@ + ar rcu $@ $(SSQLS2PARSE_OBJECTS) + ranlib $@ + +ssqlsxlat.exe: $(SSQLSXLAT_OBJECTS) mysqlpp.dll libmysqlpp_ssqls2parse.a + $(CXX) -o $@ $(SSQLSXLAT_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysql -lmysqlpp -lmysqlpp_ssqls2parse -lmysqlpp + +test_array_index.exe: $(TEST_ARRAY_INDEX_OBJECTS) mysqlpp.dll + $(CXX) -o $@ $(TEST_ARRAY_INDEX_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysql -lmysqlpp + +test_cpool.exe: $(TEST_CPOOL_OBJECTS) mysqlpp.dll + $(CXX) -o $@ $(TEST_CPOOL_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysql -lmysqlpp + +test_datetime.exe: $(TEST_DATETIME_OBJECTS) mysqlpp.dll + $(CXX) -o $@ $(TEST_DATETIME_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysql -lmysqlpp + +test_inttypes.exe: $(TEST_INTTYPES_OBJECTS) mysqlpp.dll + $(CXX) -o $@ $(TEST_INTTYPES_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysql -lmysqlpp + +test_insertpolicy.exe: $(TEST_INSERTPOLICY_OBJECTS) mysqlpp.dll + $(CXX) -o $@ $(TEST_INSERTPOLICY_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysql -lmysqlpp + +test_manip.exe: $(TEST_MANIP_OBJECTS) mysqlpp.dll + $(CXX) -o $@ $(TEST_MANIP_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysql -lmysqlpp + +test_null_comparison.exe: $(TEST_NULL_COMPARISON_OBJECTS) mysqlpp.dll + $(CXX) -o $@ $(TEST_NULL_COMPARISON_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysql -lmysqlpp + +test_query_copy.exe: $(TEST_QUERY_COPY_OBJECTS) mysqlpp.dll + $(CXX) -o $@ $(TEST_QUERY_COPY_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysql -lmysqlpp + +test_qssqls.exe: $(TEST_QSSQLS_OBJECTS) mysqlpp.dll + $(CXX) -o $@ $(TEST_QSSQLS_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysql -lmysqlpp + +test_qstream.exe: $(TEST_QSTREAM_OBJECTS) mysqlpp.dll + $(CXX) -o $@ $(TEST_QSTREAM_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysql -lmysqlpp + +test_sqlstream.exe: $(TEST_SQLSTREAM_OBJECTS) mysqlpp.dll + $(CXX) -o $@ $(TEST_SQLSTREAM_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysql -lmysqlpp + +test_ssqls2.exe: $(TEST_SSQLS2_OBJECTS) mysqlpp.dll libmysqlpp_ssqls2parse.a + $(CXX) -o $@ $(TEST_SSQLS2_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysql -lmysqlpp -lmysqlpp_ssqls2parse -lmysqlpp + +test_string.exe: $(TEST_STRING_OBJECTS) mysqlpp.dll + $(CXX) -o $@ $(TEST_STRING_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysql -lmysqlpp + +test_tcp.exe: $(TEST_TCP_OBJECTS) mysqlpp.dll + $(CXX) -o $@ $(TEST_TCP_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysql -lmysqlpp + +test_uds.exe: $(TEST_UDS_OBJECTS) mysqlpp.dll + $(CXX) -o $@ $(TEST_UDS_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysql -lmysqlpp + +test_wnp.exe: $(TEST_WNP_OBJECTS) mysqlpp.dll + $(CXX) -o $@ $(TEST_WNP_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysql -lmysqlpp + +libmysqlpp_excommon.a: $(EXCOMMON_OBJECTS) mysqlpp.dll + if exist $@ del $@ + ar rcu $@ $(EXCOMMON_OBJECTS) + ranlib $@ + +cgi_jpeg.exe: $(CGI_JPEG_OBJECTS) libmysqlpp_excommon.a mysqlpp.dll + $(CXX) -o $@ $(CGI_JPEG_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysqlpp_excommon -lmysql -lmysqlpp + +cpool.exe: $(CPOOL_OBJECTS) libmysqlpp_excommon.a mysqlpp.dll + $(CXX) -o $@ $(CPOOL_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysqlpp_excommon -lmysql -lmysqlpp + +dbinfo.exe: $(DBINFO_OBJECTS) libmysqlpp_excommon.a mysqlpp.dll + $(CXX) -o $@ $(DBINFO_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysqlpp_excommon -lmysql -lmysqlpp + +deadlock.exe: $(DEADLOCK_OBJECTS) libmysqlpp_excommon.a mysqlpp.dll + $(CXX) -o $@ $(DEADLOCK_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysqlpp_excommon -lmysql -lmysqlpp + +fieldinf.exe: $(FIELDINF_OBJECTS) libmysqlpp_excommon.a mysqlpp.dll + $(CXX) -o $@ $(FIELDINF_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysqlpp_excommon -lmysql -lmysqlpp + +for_each.exe: $(FOR_EACH_OBJECTS) libmysqlpp_excommon.a mysqlpp.dll + $(CXX) -o $@ $(FOR_EACH_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysqlpp_excommon -lmysql -lmysqlpp + +load_jpeg.exe: $(LOAD_JPEG_OBJECTS) libmysqlpp_excommon.a mysqlpp.dll + $(CXX) -o $@ $(LOAD_JPEG_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysqlpp_excommon -lmysql -lmysqlpp + +multiquery.exe: $(MULTIQUERY_OBJECTS) libmysqlpp_excommon.a mysqlpp.dll + $(CXX) -o $@ $(MULTIQUERY_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysqlpp_excommon -lmysql -lmysqlpp + +resetdb.exe: $(RESETDB_OBJECTS) libmysqlpp_excommon.a mysqlpp.dll + $(CXX) -o $@ $(RESETDB_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysqlpp_excommon -lmysql -lmysqlpp + +simple1.exe: $(SIMPLE1_OBJECTS) libmysqlpp_excommon.a mysqlpp.dll + $(CXX) -o $@ $(SIMPLE1_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysqlpp_excommon -lmysql -lmysqlpp + +simple2.exe: $(SIMPLE2_OBJECTS) libmysqlpp_excommon.a mysqlpp.dll + $(CXX) -o $@ $(SIMPLE2_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysqlpp_excommon -lmysql -lmysqlpp + +simple3.exe: $(SIMPLE3_OBJECTS) libmysqlpp_excommon.a mysqlpp.dll + $(CXX) -o $@ $(SIMPLE3_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysqlpp_excommon -lmysql -lmysqlpp + +ssqls1.exe: $(SSQLS1_OBJECTS) libmysqlpp_excommon.a mysqlpp.dll + $(CXX) -o $@ $(SSQLS1_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysqlpp_excommon -lmysql -lmysqlpp + +ssqls2.exe: $(SSQLS2_OBJECTS) libmysqlpp_excommon.a mysqlpp.dll + $(CXX) -o $@ $(SSQLS2_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysqlpp_excommon -lmysql -lmysqlpp + +ssqls3.exe: $(SSQLS3_OBJECTS) libmysqlpp_excommon.a mysqlpp.dll + $(CXX) -o $@ $(SSQLS3_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysqlpp_excommon -lmysql -lmysqlpp + +ssqls4.exe: $(SSQLS4_OBJECTS) libmysqlpp_excommon.a mysqlpp.dll + $(CXX) -o $@ $(SSQLS4_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysqlpp_excommon -lmysql -lmysqlpp + +ssqls5.exe: $(SSQLS5_OBJECTS) libmysqlpp_excommon.a mysqlpp.dll + $(CXX) -o $@ $(SSQLS5_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysqlpp_excommon -lmysql -lmysqlpp + +ssqls6.exe: $(SSQLS6_OBJECTS) libmysqlpp_excommon.a mysqlpp.dll + $(CXX) -o $@ $(SSQLS6_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysqlpp_excommon -lmysql -lmysqlpp + +store_if.exe: $(STORE_IF_OBJECTS) libmysqlpp_excommon.a mysqlpp.dll + $(CXX) -o $@ $(STORE_IF_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysqlpp_excommon -lmysql -lmysqlpp + +tquery1.exe: $(TQUERY1_OBJECTS) libmysqlpp_excommon.a mysqlpp.dll + $(CXX) -o $@ $(TQUERY1_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysqlpp_excommon -lmysql -lmysqlpp + +tquery2.exe: $(TQUERY2_OBJECTS) libmysqlpp_excommon.a mysqlpp.dll + $(CXX) -o $@ $(TQUERY2_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysqlpp_excommon -lmysql -lmysqlpp + +tquery3.exe: $(TQUERY3_OBJECTS) libmysqlpp_excommon.a mysqlpp.dll + $(CXX) -o $@ $(TQUERY3_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysqlpp_excommon -lmysql -lmysqlpp + +tquery4.exe: $(TQUERY4_OBJECTS) libmysqlpp_excommon.a mysqlpp.dll + $(CXX) -o $@ $(TQUERY4_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysqlpp_excommon -lmysql -lmysqlpp + +transaction.exe: $(TRANSACTION_OBJECTS) libmysqlpp_excommon.a mysqlpp.dll + $(CXX) -o $@ $(TRANSACTION_OBJECTS) -mthreads $(__DEBUGINFO) -L@MYSQL_C_LIB_DIR@ -L. -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -L"C:\Program Files\MySQL\MySQL Connector C 6.1\lib" $(LDFLAGS) -lmysqlpp_excommon -lmysql -lmysqlpp + +mysqlpp_beemutex.o: ./lib/beemutex.cpp + $(CXX) -c -o $@ $(MYSQLPP_CXXFLAGS) $(CPPDEPS) $< + +mysqlpp_cmdline.o: ./lib/cmdline.cpp + $(CXX) -c -o $@ $(MYSQLPP_CXXFLAGS) $(CPPDEPS) $< + +mysqlpp_connection.o: ./lib/connection.cpp + $(CXX) -c -o $@ $(MYSQLPP_CXXFLAGS) $(CPPDEPS) $< + +mysqlpp_cpool.o: ./lib/cpool.cpp + $(CXX) -c -o $@ $(MYSQLPP_CXXFLAGS) $(CPPDEPS) $< + +mysqlpp_datetime.o: ./lib/datetime.cpp + $(CXX) -c -o $@ $(MYSQLPP_CXXFLAGS) $(CPPDEPS) $< + +mysqlpp_dbdriver.o: ./lib/dbdriver.cpp + $(CXX) -c -o $@ $(MYSQLPP_CXXFLAGS) $(CPPDEPS) $< + +mysqlpp_field_names.o: ./lib/field_names.cpp + $(CXX) -c -o $@ $(MYSQLPP_CXXFLAGS) $(CPPDEPS) $< + +mysqlpp_field_types.o: ./lib/field_types.cpp + $(CXX) -c -o $@ $(MYSQLPP_CXXFLAGS) $(CPPDEPS) $< + +mysqlpp_manip.o: ./lib/manip.cpp + $(CXX) -c -o $@ $(MYSQLPP_CXXFLAGS) $(CPPDEPS) $< + +mysqlpp_myset.o: ./lib/myset.cpp + $(CXX) -c -o $@ $(MYSQLPP_CXXFLAGS) $(CPPDEPS) $< + +mysqlpp_mysql++.o: ./lib/mysql++.cpp + $(CXX) -c -o $@ $(MYSQLPP_CXXFLAGS) $(CPPDEPS) $< + +mysqlpp_mystring.o: ./lib/mystring.cpp + $(CXX) -c -o $@ $(MYSQLPP_CXXFLAGS) $(CPPDEPS) $< + +mysqlpp_null.o: ./lib/null.cpp + $(CXX) -c -o $@ $(MYSQLPP_CXXFLAGS) $(CPPDEPS) $< + +mysqlpp_options.o: ./lib/options.cpp + $(CXX) -c -o $@ $(MYSQLPP_CXXFLAGS) $(CPPDEPS) $< + +mysqlpp_qparms.o: ./lib/qparms.cpp + $(CXX) -c -o $@ $(MYSQLPP_CXXFLAGS) $(CPPDEPS) $< + +mysqlpp_query.o: ./lib/query.cpp + $(CXX) -c -o $@ $(MYSQLPP_CXXFLAGS) $(CPPDEPS) $< + +mysqlpp_result.o: ./lib/result.cpp + $(CXX) -c -o $@ $(MYSQLPP_CXXFLAGS) $(CPPDEPS) $< + +mysqlpp_row.o: ./lib/row.cpp + $(CXX) -c -o $@ $(MYSQLPP_CXXFLAGS) $(CPPDEPS) $< + +mysqlpp_scopedconnection.o: ./lib/scopedconnection.cpp + $(CXX) -c -o $@ $(MYSQLPP_CXXFLAGS) $(CPPDEPS) $< + +mysqlpp_sql_buffer.o: ./lib/sql_buffer.cpp + $(CXX) -c -o $@ $(MYSQLPP_CXXFLAGS) $(CPPDEPS) $< + +mysqlpp_sqlstream.o: ./lib/sqlstream.cpp + $(CXX) -c -o $@ $(MYSQLPP_CXXFLAGS) $(CPPDEPS) $< + +mysqlpp_ssqls2.o: ./lib/ssqls2.cpp + $(CXX) -c -o $@ $(MYSQLPP_CXXFLAGS) $(CPPDEPS) $< + +mysqlpp_stadapter.o: ./lib/stadapter.cpp + $(CXX) -c -o $@ $(MYSQLPP_CXXFLAGS) $(CPPDEPS) $< + +mysqlpp_tcp_connection.o: ./lib/tcp_connection.cpp + $(CXX) -c -o $@ $(MYSQLPP_CXXFLAGS) $(CPPDEPS) $< + +mysqlpp_transaction.o: ./lib/transaction.cpp + $(CXX) -c -o $@ $(MYSQLPP_CXXFLAGS) $(CPPDEPS) $< + +mysqlpp_type_info.o: ./lib/type_info.cpp + $(CXX) -c -o $@ $(MYSQLPP_CXXFLAGS) $(CPPDEPS) $< + +mysqlpp_uds_connection.o: ./lib/uds_connection.cpp + $(CXX) -c -o $@ $(MYSQLPP_CXXFLAGS) $(CPPDEPS) $< + +mysqlpp_utility.o: ./lib/utility.cpp + $(CXX) -c -o $@ $(MYSQLPP_CXXFLAGS) $(CPPDEPS) $< + +mysqlpp_vallist.o: ./lib/vallist.cpp + $(CXX) -c -o $@ $(MYSQLPP_CXXFLAGS) $(CPPDEPS) $< + +mysqlpp_wnp_connection.o: ./lib/wnp_connection.cpp + $(CXX) -c -o $@ $(MYSQLPP_CXXFLAGS) $(CPPDEPS) $< + +ssqls2parse_parsev2.o: ./ssx/parsev2.cpp + $(CXX) -c -o $@ $(SSQLS2PARSE_CXXFLAGS) $(CPPDEPS) $< + +ssqlsxlat_genv2.o: ./ssx/genv2.cpp + $(CXX) -c -o $@ $(SSQLSXLAT_CXXFLAGS) $(CPPDEPS) $< + +ssqlsxlat_main.o: ./ssx/main.cpp + $(CXX) -c -o $@ $(SSQLSXLAT_CXXFLAGS) $(CPPDEPS) $< + +test_array_index_array_index.o: ./test/array_index.cpp + $(CXX) -c -o $@ $(TEST_ARRAY_INDEX_CXXFLAGS) $(CPPDEPS) $< + +test_cpool_cpool.o: ./test/cpool.cpp + $(CXX) -c -o $@ $(TEST_CPOOL_CXXFLAGS) $(CPPDEPS) $< + +test_datetime_datetime.o: ./test/datetime.cpp + $(CXX) -c -o $@ $(TEST_DATETIME_CXXFLAGS) $(CPPDEPS) $< + +test_inttypes_inttypes.o: ./test/inttypes.cpp + $(CXX) -c -o $@ $(TEST_INTTYPES_CXXFLAGS) $(CPPDEPS) $< + +test_insertpolicy_insertpolicy.o: ./test/insertpolicy.cpp + $(CXX) -c -o $@ $(TEST_INSERTPOLICY_CXXFLAGS) $(CPPDEPS) $< + +test_manip_manip.o: ./test/manip.cpp + $(CXX) -c -o $@ $(TEST_MANIP_CXXFLAGS) $(CPPDEPS) $< + +test_null_comparison_null_comparison.o: ./test/null_comparison.cpp + $(CXX) -c -o $@ $(TEST_NULL_COMPARISON_CXXFLAGS) $(CPPDEPS) $< + +test_query_copy_query_copy.o: ./test/query_copy.cpp + $(CXX) -c -o $@ $(TEST_QUERY_COPY_CXXFLAGS) $(CPPDEPS) $< + +test_qssqls_qssqls.o: ./test/qssqls.cpp + $(CXX) -c -o $@ $(TEST_QSSQLS_CXXFLAGS) $(CPPDEPS) $< + +test_qstream_qstream.o: ./test/qstream.cpp + $(CXX) -c -o $@ $(TEST_QSTREAM_CXXFLAGS) $(CPPDEPS) $< + +test_sqlstream_sqlstream.o: ./test/sqlstream.cpp + $(CXX) -c -o $@ $(TEST_SQLSTREAM_CXXFLAGS) $(CPPDEPS) $< + +test_ssqls2_ssqls2.o: ./test/ssqls2.cpp + $(CXX) -c -o $@ $(TEST_SSQLS2_CXXFLAGS) $(CPPDEPS) $< + +test_string_string.o: ./test/string.cpp + $(CXX) -c -o $@ $(TEST_STRING_CXXFLAGS) $(CPPDEPS) $< + +test_tcp_tcp.o: ./test/tcp.cpp + $(CXX) -c -o $@ $(TEST_TCP_CXXFLAGS) $(CPPDEPS) $< + +test_uds_uds.o: ./test/uds.cpp + $(CXX) -c -o $@ $(TEST_UDS_CXXFLAGS) $(CPPDEPS) $< + +test_wnp_wnp.o: ./test/wnp.cpp + $(CXX) -c -o $@ $(TEST_WNP_CXXFLAGS) $(CPPDEPS) $< + +excommon_printdata.o: ./examples/printdata.cpp + $(CXX) -c -o $@ $(EXCOMMON_CXXFLAGS) $(CPPDEPS) $< + +cgi_jpeg_cgi_jpeg.o: ./examples/cgi_jpeg.cpp + $(CXX) -c -o $@ $(CGI_JPEG_CXXFLAGS) $(CPPDEPS) $< + +cpool_cpool.o: ./examples/cpool.cpp + $(CXX) -c -o $@ $(CPOOL_CXXFLAGS) $(CPPDEPS) $< + +dbinfo_dbinfo.o: ./examples/dbinfo.cpp + $(CXX) -c -o $@ $(DBINFO_CXXFLAGS) $(CPPDEPS) $< + +deadlock_deadlock.o: ./examples/deadlock.cpp + $(CXX) -c -o $@ $(DEADLOCK_CXXFLAGS) $(CPPDEPS) $< + +fieldinf_fieldinf.o: ./examples/fieldinf.cpp + $(CXX) -c -o $@ $(FIELDINF_CXXFLAGS) $(CPPDEPS) $< + +for_each_for_each.o: ./examples/for_each.cpp + $(CXX) -c -o $@ $(FOR_EACH_CXXFLAGS) $(CPPDEPS) $< + +load_jpeg_load_jpeg.o: ./examples/load_jpeg.cpp + $(CXX) -c -o $@ $(LOAD_JPEG_CXXFLAGS) $(CPPDEPS) $< + +multiquery_multiquery.o: ./examples/multiquery.cpp + $(CXX) -c -o $@ $(MULTIQUERY_CXXFLAGS) $(CPPDEPS) $< + +resetdb_resetdb.o: ./examples/resetdb.cpp + $(CXX) -c -o $@ $(RESETDB_CXXFLAGS) $(CPPDEPS) $< + +simple1_simple1.o: ./examples/simple1.cpp + $(CXX) -c -o $@ $(SIMPLE1_CXXFLAGS) $(CPPDEPS) $< + +simple2_simple2.o: ./examples/simple2.cpp + $(CXX) -c -o $@ $(SIMPLE2_CXXFLAGS) $(CPPDEPS) $< + +simple3_simple3.o: ./examples/simple3.cpp + $(CXX) -c -o $@ $(SIMPLE3_CXXFLAGS) $(CPPDEPS) $< + +ssqls1_ssqls1.o: ./examples/ssqls1.cpp + $(CXX) -c -o $@ $(SSQLS1_CXXFLAGS) $(CPPDEPS) $< + +ssqls2_ssqls2.o: ./examples/ssqls2.cpp + $(CXX) -c -o $@ $(SSQLS2_CXXFLAGS) $(CPPDEPS) $< + +ssqls3_ssqls3.o: ./examples/ssqls3.cpp + $(CXX) -c -o $@ $(SSQLS3_CXXFLAGS) $(CPPDEPS) $< + +ssqls4_ssqls4.o: ./examples/ssqls4.cpp + $(CXX) -c -o $@ $(SSQLS4_CXXFLAGS) $(CPPDEPS) $< + +ssqls5_ssqls5.o: ./examples/ssqls5.cpp + $(CXX) -c -o $@ $(SSQLS5_CXXFLAGS) $(CPPDEPS) $< + +ssqls6_ssqls6.o: ./examples/ssqls6.cpp + $(CXX) -c -o $@ $(SSQLS6_CXXFLAGS) $(CPPDEPS) $< + +store_if_store_if.o: ./examples/store_if.cpp + $(CXX) -c -o $@ $(STORE_IF_CXXFLAGS) $(CPPDEPS) $< + +tquery1_tquery1.o: ./examples/tquery1.cpp + $(CXX) -c -o $@ $(TQUERY1_CXXFLAGS) $(CPPDEPS) $< + +tquery2_tquery2.o: ./examples/tquery2.cpp + $(CXX) -c -o $@ $(TQUERY2_CXXFLAGS) $(CPPDEPS) $< + +tquery3_tquery3.o: ./examples/tquery3.cpp + $(CXX) -c -o $@ $(TQUERY3_CXXFLAGS) $(CPPDEPS) $< + +tquery4_tquery4.o: ./examples/tquery4.cpp + $(CXX) -c -o $@ $(TQUERY4_CXXFLAGS) $(CPPDEPS) $< + +transaction_transaction.o: ./examples/transaction.cpp + $(CXX) -c -o $@ $(TRANSACTION_CXXFLAGS) $(CPPDEPS) $< + +.PHONY: all clean + + +SHELL := $(COMSPEC) + +# Dependencies tracking: +-include ./*.d Index: doc/userman/Makefile.hello.mingw ================================================================== --- doc/userman/Makefile.hello.mingw +++ doc/userman/Makefile.hello.mingw @@ -1,11 +1,55 @@ -SHELL := $(COMSPEC) -MYSQL_DIR := "c:/Program Files/MySQL/MySQL Connector C 6.1" -CXXFLAGS := -I$(MYSQL_DIR)/include -Ic:/MySQL++/include -LDFLAGS := -L$(MYSQL_DIR)/lib -Lc:/MySQL++/lib/MinGW -LDLIBS := -lmysql -lmysqlpp -EXECUTABLE := hello - -all: $(EXECUTABLE) - -clean: - del $(EXECUTABLE) + + +%xinclude; +]> +
+ + MySQL++ v3.2.2 User Manual + + + + Kevin + Atkinson + + + + Sinisa + Milivojevic + + + + Monty + Widenius + + + + Warren + Young + + + + + 1998-2001, 2005-2015 + Kevin Atkinson (original author) + MySQL AB + Educational Technology Resources + + + + + + + + + + + + + + + + + +
Index: doc/userman/Makefile.hello.posix ================================================================== --- doc/userman/Makefile.hello.posix +++ doc/userman/Makefile.hello.posix @@ -1,9 +1,194 @@ -CXXFLAGS := -I/usr/include/mysql -I/usr/local/include/mysql++ -LDFLAGS := -L/usr/local/lib -LDLIBS := -lmysqlpp -lmysqlclient -EXECUTABLE := hello - -all: $(EXECUTABLE) - -clean: - rm -f $(EXECUTABLE) *.o +/// \file common.h +/// \brief This file includes top-level definitions for use both +/// internal to the library, and outside it. Contrast mysql++.h +/// +/// This file mostly takes care of platform differences. + +/*********************************************************************** + Copyright (c) 1998 by Kevin Atkinson, (c) 1999-2001 by MySQL AB, + (c) 2004-2009 by Educational Technology Resources, Inc., and + (c) 2009 by Warren Young. Others may also hold copyrights on code + in this file. See the CREDITS.txt 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 +***********************************************************************/ + +#if !defined(MYSQLPP_COMMON_H) +#define MYSQLPP_COMMON_H + +#if !defined(DOXYGEN_IGNORE) +// Doxygen will not generate documentation for the following stuff. + +// Enable SSQLS by default. Turned off below on platforms where we +// know it doesn't work. +#define MYSQLPP_SSQLS_COMPATIBLE + +// For all platforms but Visual C++ 2003, the following macro is just +// an alias for "*this". It needs a more complicated definition on +// VC++ 2003 to work around an error in the overloaded operator lookup +// logic. For an explanation of the problem, see: +// http://groups.google.com/group/microsoft.public.vc.stl/browse_thread/thread/9a68d84644e64f15 +#define MYSQLPP_QUERY_THISPTR *this + +// Work out major platform-specific stuff here. +#if defined(__WIN32__) || defined(_WIN32) +# define MYSQLPP_PLATFORM_WINDOWS + // Windows compiler support. Tested with Microsoft Visual C++, + // Borland C++ Builder, and MinGW GCC. + + // Don't let windows.h (via Connector/C) #define min/max + #define NOMINMAX + + // Stuff for Visual C++ only +# if defined(_MSC_VER) +# define MYSQLPP_PLATFORM_VISUAL_CPP + // MS *still* doesn't ship stdint.h, through VC++ 2008 at least. + // This means we have to take a wild guess at appropriate + // integer types in lib/sql_types.h. See test/inttypes.cpp for + // tests that check whether we've guessed well. +# define MYSQLPP_NO_STDINT_H +# if _MSC_VER < 1400 + // Workarounds for limitations of VC++ 2003 that are fixed + // in 2005 and later. +# undef MYSQLPP_QUERY_THISPTR +# define MYSQLPP_QUERY_THISPTR dynamic_cast(*this) +# undef MYSQLPP_SSQLS_COMPATIBLE +# elif !defined(_STLP_VERSION) && !defined(_STLP_VERSION_STR) + // VC++ 2005 or newer and not using STLport, so #define + // portability flags indicating features we can use from + // the compiler's native RTL. +# define MYSQLPP_HAVE_LOCALTIME_S +# define MYSQLPP_HAVE_STD__NOINIT +# endif + + // Disable complaints about STL data members: VC++ believes + // these need to be __declspec(dllexport) for some reason. +# pragma warning(disable: 4251) + // Disable complaint that VC++ doesn't grok throw specs +# pragma warning(disable: 4290) + // Disable whining about using 'this' as a member initializer on VC++. +# pragma warning(disable: 4355) + // Disable whining about implicit conversions to bool +# pragma warning(disable: 4800) + // Disable nagging about new "secure" functions like strncpy_s() +# pragma warning(disable: 4996) + // Call _snprintf() for VC++ version of snprintf() function +# define snprintf _snprintf +# endif + + // Define DLL import/export tags for Windows compilers, where we build + // the library into a DLL, for LGPL license compatibility reasons. + // (This is based on a similar mechanism in wxWindows.) + + #ifdef MYSQLPP_MAKING_DLL + // When making the DLL, export tagged symbols, so they appear + // in the import library. + #define MYSQLPP_EXPORT __declspec(dllexport) + #elif !defined(MYSQLPP_NO_DLL) + // We must be _using_ the DLL, so import symbols instead. + #define MYSQLPP_EXPORT __declspec(dllimport) + #else + // Not making a DLL at all, so no-op these declspecs + #define MYSQLPP_EXPORT + #endif + + // We need to use the DOS/Windows path separator here + #define MYSQLPP_PATH_SEPARATOR '\\' +#else + // If not VC++, MinGW, or Xcode, we assume we're on a system using + // autoconf, so bring in the config.h file it wrote containing the + // config test results. Only do this during the library build, and + // even then, not if included from a MySQL++ header file, since + // config.h cannot be safely installed with the other headers. +# if defined(MYSQLPP_NOT_HEADER) && !defined(MYSQLPP_XCODE) +# include "config.h" +# endif + + // Make DLL stuff a no-op on this platform. + #define MYSQLPP_EXPORT + + // Assume POSIX path separator + #define MYSQLPP_PATH_SEPARATOR '/' +#endif + +#if defined(MYSQLPP_MYSQL_HEADERS_BURIED) +# include +#else +# include +#endif + +namespace mysqlpp { + +/// \brief Alias for 'true', to make code requesting exceptions more +/// readable. +const bool use_exceptions = true; + +/// \brief Used to disambiguate overloads of equal_list() in SSQLSes. +enum sql_cmp_type { sql_use_compare }; + +#if !defined(DOXYGEN_IGNORE) +// Figure out how to get large integer support on this system. Suppress +// refman documentation for these typedefs, as they're system-dependent. +#if defined(MYSQLPP_NO_LONG_LONGS) +// Alias "longlong" and "ulonglong" to the regular "long" counterparts +typedef unsigned long ulonglong; +typedef long longlong; +#elif defined(_MSC_VER) +// It's VC++, so we'll use Microsoft's 64-bit integer types +typedef unsigned __int64 ulonglong; +typedef __int64 longlong; +#else +// No better idea, so assume the C99 convention. If your compiler +// doesn't support this, please provide a patch to extend this ifdef, or +// define MYSQLPP_NO_LONG_LONGS. +typedef unsigned long long ulonglong; +typedef long long longlong; +#endif +#endif // !defined(DOXYGEN_IGNORE) + +#if !defined(MYSQLPP_NO_UNSIGNED_INT_TYPES) +/// \brief Contraction for 'unsigned long' +/// +/// This is not to be used within the library or directly by end-user +/// code. It exists to make the MySQL C API headers happy: my_global.h +/// defines it, but we can't use it in MySQL++, so we do it ourselves. +typedef unsigned long ulong; +#endif + +} // end namespace mysqlpp + +// The MySQL headers define these macros, which is completely wrong in a +// C++ project. Undo the damage. +#undef min +#undef max + +#endif // !defined(DOXYGEN_IGNORE) + + +// Now that we've defined all the stuff above, we can pull in the full +// MySQL header. Basically, the above largely replaces MySQL's my_global.h +// while actually working with C++. This is why we disobey the MySQL +// developer docs, which recommend including my_global.h before mysql.h. +#if defined(MYSQLPP_MYSQL_HEADERS_BURIED) +# include +#else +# include +#endif + +#endif // !defined(MYSQLPP_COMMON_H) Index: doc/userman/common.xsl ================================================================== --- doc/userman/common.xsl +++ doc/userman/common.xsl @@ -1,17 +1,244 @@ - - - - - - - - - - - - - - - +/*********************************************************************** + dbdriver.cpp - Implements the DBDriver class. + + Copyright (c) 2005-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 +***********************************************************************/ + +#define MYSQLPP_NOT_HEADER +#include "dbdriver.h" + +#include "exceptions.h" + +#include +#include + +// An argument was added to mysql_shutdown() in MySQL 4.1.3 and 5.0.1. +#if ((MYSQL_VERSION_ID >= 40103) && (MYSQL_VERSION_ID <= 49999)) || (MYSQL_VERSION_ID >= 50001) +# define SHUTDOWN_ARG ,SHUTDOWN_DEFAULT +#else +# define SHUTDOWN_ARG +#endif + +using namespace std; + +namespace mysqlpp { + +DBDriver::DBDriver() : +is_connected_(false) +{ + mysql_init(&mysql_); +} + + +DBDriver::DBDriver(const DBDriver& other) : +is_connected_(false) +{ + copy(other); +} + + +DBDriver::~DBDriver() +{ + if (connected()) { + disconnect(); + } + + OptionList::const_iterator it; + for (it = applied_options_.begin(); it != applied_options_.end(); ++it) { + delete *it; + } +} + + +bool +DBDriver::connect(const char* host, const char* socket_name, + unsigned int port, const char* db, const char* user, + const char* password) +{ + // Drop previous connection, if any + if (connected()) { + disconnect(); + } + + // Set defaults for connection options. User can override these + // by calling set_option() before connect(). + set_option_default(new ReadDefaultFileOption("my")); + + // Establish the connection + return is_connected_ = + mysql_real_connect(&mysql_, host, user, password, db, + port, socket_name, mysql_.client_flag); +} + + +bool +DBDriver::connect(const MYSQL& other) +{ + // Drop previous connection, if any + if (connected()) { + disconnect(); + } + + // Set defaults for connection options. User can override these + // by calling set_option() before connect(). + set_option_default(new ReadDefaultFileOption("my")); + + // Establish the connection + return is_connected_ = + mysql_real_connect(&mysql_, other.host, other.user, + other.passwd, other.db, other.port, other.unix_socket, + other.client_flag); +} + + +void +DBDriver::copy(const DBDriver& other) +{ + if (other.connected()) { + connect(other.mysql_); + } + else { + is_connected_ = false; + } +} + + +void +DBDriver::disconnect() +{ + mysql_close(&mysql_); + is_connected_ = false; +} + + +bool +DBDriver::enable_ssl(const char* key, const char* cert, + const char* ca, const char* capath, const char* cipher) +{ +#if defined(HAVE_MYSQL_SSL_SET) + return mysql_ssl_set(&mysql_, key, cert, ca, capath, cipher) == 0; +#else + return false; +#endif +} + + +DBDriver& +DBDriver::operator=(const DBDriver& rhs) +{ + copy(rhs); + return *this; +} + + +string +DBDriver::query_info() +{ + const char* i = mysql_info(&mysql_); + return i ? string(i) : string(); +} + + +bool +DBDriver::set_option(unsigned int o, bool arg) +{ + // If we get through this loop and n is 1, only one bit is set in + // the option value, which is as it should be. + int n = o; + while (n && ((n & 1) == 0)) { + n >>= 1; + } + + if ((n == 1) && + (o >= CLIENT_LONG_PASSWORD) && + (o <= CLIENT_MULTI_RESULTS)) { + // Option value seems sane, so go ahead and set/clear the flag + if (arg) { + mysql_.client_flag |= o; + } + else { + mysql_.client_flag &= ~o; + } + + return true; + } + else { + // Option value is outside the range we understand, or caller + // erroneously passed a value with multiple bits set. + return false; + } +} + + +std::string +DBDriver::set_option(Option* o) +{ + std::ostringstream os; + std::auto_ptr