Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Difference From d9c6b79b99609eea To c9afe0650e7bf849
2017-10-10
| ||
21:10 | Removed broken symlink check-in: 13f6b59c1e user: tangent tags: v2.3.2-modern | |
2017-09-09
| ||
00:06 | Fixed a dependency declaration in the old 2.3.2 spec file that caused complaints if you tried to install the resulting -devel RPM. check-in: d9c6b79b99 user: tangent tags: v2.3.2-modern | |
2017-09-08
| ||
18:30 | Added a #include needed by Ubuntu 16.04 check-in: be32e63bc1 user: tangent tags: v2.3.2-modern | |
2000-02-06
| ||
23:00 | Version 1.6.0 check-in: 6c378b5890 user: tangent tags: trunk, v1.6.0 | |
2000-01-06
| ||
19:28 | Version 1.5.1 check-in: c9afe0650e user: tangent tags: trunk, v1.5.1 | |
1999-11-25
| ||
14:40 | Version 1.4 check-in: bc5d0a2f8e user: tangent tags: trunk, v1.4 | |
Added AUTHORS.
Deleted Bakefiles.bkgen.
|
| < < < < < < < < < < < < < < < |
Changes to COPYING.
|
| < < < < | < < < < < | 1 | /usr/share/automake/COPYING |
Added COPYRIGHT.
> > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | The Mysql++ API is copyright 1998 by Kevin Atkinson and is released under the LGPL license for now. The intent of doing this is allow developers to use my library to develop commercial programs and to allow it it be distributed with commercial databases. However if you do use it to develop a commercial program a small donation to me would be greatly appreshated. Your donation will will encourage me to continue to work on improving this API and also encourage me to contune to keep it under the LGPL. Please send donations too. Kevin Atkinson 7962 Helmart Dr. Laurel, MD 20723 I reserve the right to change the license to future versions of the library if I do not get suffecent pay-back to my work. However, it is my promise to you that it will never become more restrictive than the GPL (not LGPL) licence. You can contact me at kevinatk@home.com or (301) 498-3290 or at 7962 Helmart Dr./Laurel, MD 20723. |
Deleted CREDITS.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Changes to ChangeLog.
|
| < | < < < < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | < < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | < < | < < < < | < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | < | < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | < < | < < | < < < < | < < < < | < < | < < < | < < < < < < < < | < < < < | < < < < | < < < < < | < < | < < < | < < | < < < < < < < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | < < < | < < | < < | < < < | < < < < | < < | < | | < | < < < < | < < < < < < < | < < < < < < | < < < < < | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | < < < < < | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | 2000-01-06 Dale Hawkins <dhawkins@cdrgts.com> * acconfig.h: New file. Lets me define the library versioning. * autogen.sh: Boilerplate configuration jump-start script. 2000-01-04 Dale Hawkins <dhawkins@cdrgts.com> * sqlplus.spec.in (Packager): Created new spec.in file to work with autoconf/automake and libtool for easier releases of RPMs. (Yes, I am a Linux bigot and I think the world should revolve around RPMs). * configure.in: Reworked this file to work with spec.in and support libtool type versioning. 1999-10-15 Sinisa Milivojevic <sinisa@cytanet.com.cy> * Changed version to 1.2 * 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 <kevinatk@home.com> * 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 <michael@cs.mun.ca> * Sinisa Milivojevic <sinisa@cytanet.com.cy> is now the offical maintainer. 1999-08-02 Sinisa Milivojevic <sinisa@cytanet.com.cy> * Changed version to 1.1 * Added several bug fixes * Fixed memory leak problems and variables overlapping problems. * Added automake and autoconf support by loic@net.fr * 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 * Changed manual * Cheanged README * Many other smaller things 1999-06-09 Michael Widenius <monty@monty.pp.sci.fi> * Changed version to 1.0 * Added patches from Orion Poplawski <orion@bvt.com> to support the UnixWare 7.0 compiler |
Deleted HACKERS.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Changes to INSTALL.
|
| < < | < < < < < < | 1 | /usr/share/automake/INSTALL |
Added LGPL.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 | GNU LIBRARY GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 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 library GPL. It is numbered 2 because it goes with version 2 of the ordinary GPL.] 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 Library General Public License, applies to some specially designated Free Software Foundation software, and to any other libraries whose authors decide to use it. You can use it for your libraries, too. When we speak of free software, we are referring to freedom, 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 or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the 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 a program 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. Our method of protecting your rights has two steps: (1) copyright the library, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the library. Also, for each distributor's protection, we want to make certain that everyone understands that there is no warranty for this free library. If the library is modified by someone else and passed on, we want its recipients to know that what they have is not the original version, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that companies distributing free software will individually obtain patent licenses, thus in effect transforming the program into proprietary software. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License, which was designed for utility programs. This license, the GNU Library General Public License, applies to certain designated libraries. This license is quite different from the ordinary one; be sure to read it in full, and don't assume that anything in it is the same as in the ordinary license. The reason we have a separate public license for some libraries is that they blur the distinction we usually make between modifying or adding to a program and simply using it. Linking a program with a library, without changing the library, is in some sense simply using the library, and is analogous to running a utility program or application program. However, in a textual and legal sense, the linked executable is a combined work, a derivative of the original library, and the ordinary General Public License treats it as such. Because of this blurred distinction, using the ordinary General Public License for libraries did not effectively promote software sharing, because most developers did not use the libraries. We concluded that weaker conditions might promote sharing better. However, unrestricted linking of non-free programs would deprive the users of those programs of all benefit from the free status of the libraries themselves. This Library General Public License is intended to permit developers of non-free programs to use free libraries, while preserving your freedom as a user of such programs to change the free libraries that are incorporated in them. (We have not seen how to achieve this as regards changes in header files, but we have achieved it as regards changes in the actual functions of the Library.) The hope is that this will lead to faster development of free libraries. 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, while the latter only works together with the library. Note that it is possible for a library to be covered by the ordinary General Public License rather than by this special one. GNU LIBRARY GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Library 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 compile 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) 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. c) 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. d) 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 source code 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 to 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 Library 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. <one line to give the library's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 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 Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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. <signature of Ty Coon>, 1 April 1990 Ty Coon, President of Vice That's all there is to it! |
Deleted LICENSE.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Added Makefile.am.
> > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # This includes sqlplus.spec _and_ sqlplus.spec.in # (this way rpm -ta xxxx work) EXTRA_DIST = @PACKAGE@.spec @PACKAGE@.spec.in @PACKAGE@-config.in SUBDIRS = sqlplusint examples doc # devel bin_SCRIPTS = sqlplus-config CONFIG_FILE = @PACKAGE@-config-@SQLPLUS_MAJOR_VERSION@.@SQLPLUS_MINOR_VERSION@ $(CONFIG_FILE): @PACKAGE@-config cp $^ $@ @PACKAGE@-config: @PACKAGE@-config.in |
Added NEWS.
Changes to README.
|
| < < | | < < < < > > > | < < < | > < < < < < < > > | < > | < < < < < < < < < < > > | < < < > | | < | < | < < | < | < < | < | < < < < < | < < > > | | > > | < < | > < < | < | > < < < | < < < > > > < < < | < < < < < < > > < < < < < < > > > < < < < < > > < < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | This is C++ API library for MySQL. Starting based of 1.2, this is now maintained by sinisa@cytanet.com.cy as kevinatk@home.com doesn't have time to support this library anymore. He has made sinisa@cytanet.com.cy a new official maintainer, which will continue to keep mysql++ library under LGPL. Original information from kevinatk@home.com: --------------------------------------------------------------------- After several people commented on how my quickie wrapper would be of little use I decided to go all out and create a full featured version. To my knowledge this library requiures gcc 2.8 or egcc or better and of course the mysql library. To compile the library and modify the file Configure aproprietly and type make. I am working on trying to get this to compile into a library. However I really don't know what I am doing. If you have some experense with this please take a look at my makefile and uncomment the appropriate lines and let me know if I am doing everything right. For more information please see the manual. I developed it using egcc ver 1.02 (I think) from the Debian hamm package with kernel 2.0.33 and a Cryix P150+ cpu. I am also using Mysql 3.21.25 that is in the non-free section of the Debian distribution. Be sure to let me know what you think. I depend on your feedback. Thanks, I can be reached at kevinatk@home.com -------------------------------------------------------------------- End of original README by Kevin Atkinson Since October 1999, all maintenance has been transferred to Sinisa Milivojevic (sinisa@cytanet.com.cy) and Michael Widenius (monty@mysql.com). Send your feedback to any of these addresses, or even better to the mailing list mysql-plusplus@lists.mysql.com. Since versin 1.1, mysql++ has been prepared to be built with automake and autoconf. This will make compilation and installation much easier. You should cd to the root of source directory and run ./configure. If you are running it several times, because you have problems, do delete config.cache. In case of the problem config.log contains more info on it's whereabouts. After configure is run, config.h and Makefiles are generated. If you wish to install mysql++ in a root directory other then /usr/local, you should run configure with --with-prefix=..... Configure contains description of other switches available. After running configure, run make and make install. Libs will be installed in prefix/lib and include files in prefix/include/mysql++. Since version 1.3, mysql++ is fully compliant with latest 2.95.xx series of compilers. |
Deleted README.cygwin.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted README.examples.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted README.mingw.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted README.unix.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted README.vc.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted Wishlist.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Added autogen.sh.
> > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #!/bin/sh libtoolize --automake aclocal autoconf autoheader for fn in AUTHORS ChangeLog NEWS README do if [ ! -e "$fn" ] then touch "$fn" fi done automake -a ./configure $* |
Deleted bootstrap.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted cleanmf.
|
| < < < < |
Added config.cygwin.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | ####### Compiler, tools and options CC = g++ CFLAGS = -DWINDOZE -D_WIN32 -O0 -mno-cygwin -D__cplusplus -Wall -fstrength-reduce -D__WIN32__ -I/cygnus/cygwin-b20/include/g++ -I/cygnus/cygwin-b20/include/g++ -I/my/mysql_src/mysql-3.22.13-beta/include -L/my/mysql_src/mysql-3.22.13-beta/client/.libs -L../sqlplusint -mno-cygwin #CFLAGS += -fkeep-inline-functions # If you have problems when with undefined refrences try uncommenting # the above line when compiling the library. But then recommenting # it when you compile the examples. FPIC =# -fPIC INCPATH = -I/cygnus/cygwin-b20/include/g++ -I/my/mysql_src/mysql-3.22.13-beta/include # make sure you can find mysql.h LINK = g++ LFLAGS = -mno-cygwin # make sure you can find mysqlclinet NLFLAGS = -lmysql++ # this is for the static lib test SLFLAGS = -lmysql++ # this is for shared lib test LIBS = -lmysqlclient -mno-cygwin SOLLIBS = -lnsl -lsocket # extra lib that Solaris needs ARC = ar rc CP_R = cp -a RMDIR = echo #RMDIR = rmdir #uncomment the above line if your sure your rmdir does NOT delete non-empty #directories. If it does make remove could be DISASTORIUS. INSTLIB = /usr/lib INSTHEAD = /usr/include INSTBIN = /usr/bin PERLPATH = /usr/bin/perl #CFLAGS += -D NO_LONG_LONGS #TYPE = objs TYPE = static #TYPE = shared TARGET = linux #TARGET = solaris ## # You should not need to modify anything below this line. If you do # need to modify something below this line please email me at # sinisa@cytanet.com.cy with what you did. ifeq ($(TARGET), solaris) LIBS += $(SOLLIBS) endif OBJSINT = coldata.o connection.o datetime.o field_names.o field_types.o \ manip.o query.o result.o row.o set.o sql_query.o type_info.o vallist.o HEADERS = mysql++ mysql++.h mysql++-custom mysql++-custom.h HEADSINT = mysql++ defs \ define_short coldata1.hh \ type_info1.hh const_string1.hh \ null1.hh compare1.hh row1.hh \ resiter1.hh vallist1.hh manip1.hh \ sql_string1.hh sql_query1.hh \ sql_query0.hh datetime1.hh \ stream2string1.hh tiny_int1.hh \ set1.hh connection1.hh query1.hh \ result1.hh field_names1.hh \ tracker.h field_types1.hh \ fields1.hh connection0.hh \ convert1.hh coldata2.hh \ compare2.hh connection2.hh \ query2.hh const_string2.hh \ convert2.hh datetime2.hh \ stream2string2.hh field_names2.hh \ field_types2.hh fields2.hh \ manip2.hh null2.hh result2.hh \ row2.hh set2.hh stream2string3.hh \ sql_query2.hh sql_string2.hh \ tiny_int2.hh type_info2.hh \ vallist2.hh coldata3.hh \ convert3.hh null3.hh compare3.hh \ connection3.hh const_string3.hh \ datetime3.hh field_names3.hh \ field_types3.hh manip3.hh \ query3.hh result3.hh row3.hh \ set3.hh sql_query3.hh \ sql_string3.hh tiny_int3.hh \ type_info3.hh vallist3.hh \ custom.hh custom-macros.hh ####### Implicit rules .SUFFIXES: %.o: %.cc $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< %.o: %.c $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< %: %.o ifeq ($(TYPE), objs) $(CC) $(CFLAGS) $(LIBS) -o $@ ../sqlplusint/*.o $^ endif ifeq ($(TYPE), static) $(CC) $(CFLAGS) $(NLFLAGS) $(LIBS) -o $@ $^ endif ifeq ($(TYPE), shared) $(CC) $(CFLAGS) $(SLFLAGS) $(LIBS) -o $@ $^ endif |
Added config.h.in.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | /* config.h.in. Generated automatically from configure.in by autoheader. */ /* ** This file has been automatically generated by 'acconfig' from aclocal.m4 ** Copyright (C) 1988 Eleftherios Gkioulekas <lf@amath.washington.edu> ** ** This file is free software; as a special exception the author gives ** unlimited permission to copy and/or distribute it, with or without ** modifications, as long as this notice is preserved. ** ** This program is distributed in the hope that it will be useful, but ** WITHOUT ANY WARRANTY, to the extent permitted by law; without even the ** implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ /* This is the top section */ /* Define to empty if the keyword does not work. */ #undef const /* Define if you have the ANSI C header files. */ #undef STDC_HEADERS #undef SQLPLUS_MAJOR_VERSION #undef SQLPLUS_MINOR_VERSION #undef SQLPLUS_MICRO_VERSION #undef SQLPLUS_INTERFACE_AGE #undef SQLPLUS_BINARY_AGE /* Define if you have the strtol function. */ #undef HAVE_STRTOL /* Define if you have the intl library (-lintl). */ #undef HAVE_LIBINTL /* Define if you have the nsl library (-lnsl). */ #undef HAVE_LIBNSL /* Define if you have the socket library (-lsocket). */ #undef HAVE_LIBSOCKET /* Name of package */ #undef PACKAGE /* Version number of package */ #undef VERSION /* Define if using the dmalloc debugging malloc package */ #undef WITH_DMALLOC /* This is the bottom section */ |
Deleted config/acx_pthread.m4.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted config/libm.m4.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted config/localtime_r.m4.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted config/mysql++.m4.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted config/mysql_loc.m4.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted config/mysql_ssl.m4.
|
| < < < < < < < < < < < < < < < < < |
Deleted config/socket_nsl.m4.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted config/stl_slist.m4.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted configure.ac.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Added configure.in.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | dnl Process this file with autoconf to produce a configure script. # require autoconf 2.13 AC_PREREQ(2.13) AC_INIT(sqlplusint/sqlplus.hh) dnl Much of this was copied from glib's configure.in dnl we need to AC_DIVERT_PUSH/AC_DIVERT_POP these variable definitions so they dnl are available for $ac_help expansion (don't we all *love* autoconf?) AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl # # Making releases: # SQLPLUS_MICRO_VERSION += 1; # SQLPLUS_INTERFACE_AGE += 1; # SQLPLUS_BINARY_AGE += 1; # if any functions have been added, set SQLPLUS_INTERFACE_AGE to 0. # if backwards compatibility has been broken, # set SQLPLUS_BINARY_AGE _and_ SQLPLUS_INTERFACE_AGE to 0. # SQLPLUS_MAJOR_VERSION=1 SQLPLUS_MINOR_VERSION=5 SQLPLUS_MICRO_VERSION=0 SQLPLUS_INTERFACE_AGE=0 SQLPLUS_BINARY_AGE=0 SQLPLUS_VERSION=$SQLPLUS_MAJOR_VERSION.$SQLPLUS_MINOR_VERSION.$SQLPLUS_MICRO_VERSION dnl AC_DIVERT_POP()dnl VERSION=$SQLPLUS_VERSION AC_SUBST(SQLPLUS_MAJOR_VERSION) AC_SUBST(SQLPLUS_MINOR_VERSION) AC_SUBST(SQLPLUS_MICRO_VERSION) AC_SUBST(SQLPLUS_INTERFACE_AGE) AC_SUBST(SQLPLUS_BINARY_AGE) # libtool versioning LT_RELEASE=$SQLPLUS_MAJOR_VERSION.$SQLPLUS_MINOR_VERSION LT_CURRENT=`expr $SQLPLUS_MICRO_VERSION - $SQLPLUS_INTERFACE_AGE` LT_REVISION=$SQLPLUS_INTERFACE_AGE LT_AGE=`expr $SQLPLUS_BINARY_AGE - $SQLPLUS_INTERFACE_AGE` AC_SUBST(LT_RELEASE) AC_SUBST(LT_CURRENT) AC_SUBST(LT_REVISION) AC_SUBST(LT_AGE) dnl Initialize automake AM_INIT_AUTOMAKE(sqlplus, $VERSION) dnl Set definition here AM_CONFIG_HEADER(config.h) dnl Initialize libtool AM_PROG_LIBTOOL dnl Initialize maintainer mode AM_MAINTAINER_MODE dnl This is a little hack to make this work with rpm better (see sqlplus.spec.in) test -z "$CXXFLAGS" && CXXFLAGS="${CFLAGS}" dnl Checks for programs. AC_PROG_CC AC_PROG_CXX AC_PROG_CXXCPP dnl Copied from lf_texidoc.m4 in share/aclocal AC_PATH_PROGS(PERL, perl perl5, nope) if test "$PERL" = nope then AC_MSG_WARN([missing perl. Need perl to build documentation and some headers which should have been included in the distribution.]) fi AC_PROG_LN_S AC_PROG_INSTALL AC_PROG_MAKE_SET dnl These will be set in config.h AC_DEFINE_UNQUOTED(SQLPLUS_MAJOR_VERSION, $SQLPLUS_MAJOR_VERSION) AC_DEFINE_UNQUOTED(SQLPLUS_MINOR_VERSION, $SQLPLUS_MINOR_VERSION) AC_DEFINE_UNQUOTED(SQLPLUS_MICRO_VERSION, $SQLPLUS_MICRO_VERSION) AC_DEFINE_UNQUOTED(SQLPLUS_INTERFACE_AGE, $SQLPLUS_INTERFACE_AGE) AC_DEFINE_UNQUOTED(SQLPLUS_BINARY_AGE, $SQLPLUS_BINARY_AGE) AC_CHECK_LIB(intl, main) AC_CHECK_LIB(socket, main) AC_CHECK_LIB(nsl, main) dnl ######################################################################### dnl Check for MySQL headers and libraries dnl ######################################################################### AC_PACKAGE_MYSQL AM_WITH_DMALLOC() dnl Checks for header files. AC_HEADER_STDC dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST dnl Checks for library functions. AC_CHECK_FUNCS(strtol) AC_OUTPUT([ Makefile sqlplusint/Makefile examples/Makefile doc/Makefile sqlplus-config sqlplus.spec ]) |
Added doc/Makefile.am.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | # This file should cause the manual to be a generated source (i.e., so # that it is build at distribution time since its creation is # non-standard) # This file still needs a lot of work... # SUBDIRS = man-html man-text EXTRA_DIST = \ doc.tex.tmpl html.sty manual.aux manual.dvi manual.log manual.lyx \ manual.ps manual.tex pretty.pl sql++pretty doc-fix.pl doc-trim.pl \ examples-proc.pl html2txt.pl insert-classref.pl default: manual perlclean: -rm -f manual.txt manual.html $(MAKE) -C ../sqlplusint/ perlclean manual: $(MAKE) -C ../sqlplusint/ classref perl insert-classref.pl -rm -f -r man-html -mkdir man-html perl examples-proc.pl latex manual.tex latex manual.tex latex2html \ -split 3 \ -toc_depth 3 \ -dir man-html \ -long_titles 2 \ -local_icons \ -show_section_numbers \ manual.tex -rm -f -r man-text -mkdir man-text perl html2txt.pl |
Deleted doc/README.devel.
|
| < < < < < < < < < < < |
Deleted doc/README.manuals.
|
| < < < < < |
Added doc/doc-fix.pl.
> > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | $/ = undef; open F, $ARGV[0]; $_=<F>; s~\\begin_inset LatexCommand \\ref.+ \\end_inset (.+) \\begin_inset LatexDel .+ \\end_inset .+ \\begin_inset LatexDel .+ \\end_inset ~\\begin_inset LatexCommand \\ref\{$1\} \\end_inset ~g; open F, ">$ARGV[0]"; print F $_; |
Added doc/doc-trim.pl.
> > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 | $/ = undef; open F, $ARGV[0]; $_=<F>; /(\\layout Section.+)\\the_end/s; open F, ">$ARGV[0]"; print F $1; |
Added doc/doc.tex.tmpl.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 | #ptags [ ] [!autolink] [foreach class] \section{[class]} \label{[filter ref][class dont_filter][endfilter]} [if templ]template [endif] \ [if struct]struct[endif][else][if union]union[endif][else]class[endelse][endelse] \ \textbf{[class]}[templ] [if parents]\textbf{Parents:} [parents][endif] [if with_class][if with_class != [class]] \textbf{Related to:} [with_class] \ (\ref{[filter ref][with_class dont_filter][endfilter]}) [endif][endif] [if brief]\textit{[brief]}[endif] [detail] \subsection{Synopses} [if public] \textbf{Public members:} \begin{itemize} [foreach public] \item [if pure]pure [endif][type] \textbf{[mname]} \ [if func] \ ([args]) [if const] const [endif] \ [if throws] throws [throwclass]([throwargs])[endif] \ [endif] \ [if enum] [lb][args][rb] [endif] \ [if detail] (\ref{[filter ref][class dont_filter]::[member dont_filter][endfilter]}) [endif] \ [if brief] - \textit{[brief]}[endif] \ [next] \end{itemize} [endif] [if protected] \textbf{Protected members:} \begin{itemize} [foreach protected] \item [if pure]pure [endif][type] \textbf{[mname]} \ [if func] \ ([args]) [if const] const [endif] \ [if throws] throws [throwclass]([throwargs])[endif] \ [endif] \ [if enum] [lb][args][rb] [endif] \ [if detail] (\ref{[filter ref][class dont_filter]::[member dont_filter][endfilter]}) [endif] \ [if brief] - \textit{[brief]}[endif] \ [next] \end{itemize} [endif] [nobreak] [foreach func] [if with_class == [class]] [if !l1][def l1] \textbf{Related Functions} [n] [n] \begin{itemize} [n] [endif] \item [type] \textbf{[name]} ([args]) [if throws] throws [throwclass]([throwargs]) [endif] [if brief] - \textit{[brief]}[endif] [n] [endif] [next] [if l1] [undef l1] \end{itemize} [n] [endif] [endnobreak] [nobreak] [foreach typedef] [if with_class == [class]] [if !l1] [def l1] \textbf{Related Types} [n] [n] \begin{itemize} [n] [endif] \item [if typedef]typedef [endif][if enum]enum [endif][type] \textbf{[name]} [if enum] [lb][args][rb] [endif] [if brief] - \textit{[brief]}[endif] [n] [endif] [next] [if l1] [undef l1] \end{itemize} [n] [endif] [endnobreak] [nobreak] [def pclass [class]] [foreach class] [if with_class == [pclass]] [if with_class != [class]] [if !l1] [def l1] \textbf{Related Classes} [n] [n] \begin{itemize} [n] [endif] \item [if templ]template [endif] [if struct]struct[endif][else][if union]union[endif][else]class[endelse][endelse] \textbf{[class]}[templ] (\ref{[filter ref][class dont_escape][endfilter]}) [if brief] - \textit{[brief]} [endif] [n] [endif] [endif] [next] [if l1] [undef l1] \end{itemize} [n] [endif] [undef pclass] [endnobreak] [foreach public] [if detail] \subsection{[member]} \label{[filter ref][class dont_filter]::[member dont_filter][endfilter]} [if pure]pure [endif][type] \textbf{[mname]} \ [if func] \ ([args]) [if const] const [endif] \ [if throws] throws [throwclass]([throwargs])[endif] \ [endif] \ [if enum] [lb][args][rb] [endif] [if brief]\textit{[brief]}[endif] [detail] [endif] [next] [foreach func][if with_class == [class]][// ][if detail] \subsection{[name]} [type] \textbf{[name]} ([args]) \ [if throws] throws [throwclass]([throwargs]) [endif] [if brief]\textit{[brief]}[endif] [detail] [endif][endif][next] [next] \section{Misc Non Members} [foreach func][if !with_class] [if !f1] [def f1] \textbf{Functions:} \begin{itemize} [endif] \item [type] \textbf{[name]} ([args]) \ [if throws] throws [throwclass]([throwargs]) [endif] \ [if brief] - \textit{[brief]}[endif] [endif][next] [if f1] [undef f1] \end{itemize} [endif] [foreach typedef][if !with_class] [if !tl] [def tl] \textbf{Types:} \begin{itemize} [endif] \item [if typedef]typedef [endif][if enum]enum [endif][type] \textbf{[name]} [if enum] [lb][args][rb] [endif] [if brief] - \textit{[brief]}[endif] [endif][next] [if tl] [undef tl] \end{itemize} [endif] [foreach func] [if detail][if !with_class] \subsection{[name]} [type] \textbf{[name]} ([args]) \ [if throws] throws [throwclass]([throwargs]) [endif] [if brief]\textit{[brief]}[endif] [detail] [endif][endif] [next] |
Added doc/examples-proc.pl.
> > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | $/ = undef; open IN, "manual.tex"; $_ = <IN>; s/\\begin\{comment\}[\n\s]+example:(\S+)[\n\s]*\\end\{comment\}[\n\s]*/${\(&ie($1))}/sg; open IN, ">manual.tex"; print IN; sub ie { my $return; $return = "\n"; $return .= "\\begin{verbatim}\n"; open EIN, "examples/$_[0]"; local $/ = undef; $return .= <EIN>; $return .= "\\end{verbatim}\n\n"; return $return; } |
Added doc/html2txt.pl.
> > > > > > > | 1 2 3 4 5 6 7 | opendir DIR, "man-html"; foreach (readdir(DIR)) { next unless /(.+?)\.html$/; print "lynx -dump man-html/$_ > man-text/$1.txt\n" ; system "lynx -dump man-html/$_ > man-text/$1.txt" ; } |
Added doc/insert-classref.pl.
> > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | $/ = undef; open F, "manual.tex"; open CR, "../sqlplusint/doc.tex"; $_=<F>; $classref=<CR>; s~\\begin{comment}[\s\n]*Begin Class Ref[\s\n]*\\end{comment}.+?\\begin{comment}[\s\n]*End Class Ref[\s\n]*\\end{comment}~ \\begin{comment} Begin Class Ref \\end{comment} $classref \\begin{comment} End Class Ref \\end{comment} ~s || die "Could not insert classref\n"; open F, ">manual.tex"; print F $_; |
Added doc/manual.lyx.
more than 10,000 changes
Added doc/pretty.pl.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | use FileHandle; use IPC::Open2; if ($ARGV[0] =~ /^--command\=(.+)/) { $command = $1; } else { $command = "g++ -E"; } $/ = undef; $orgcode = <STDIN>; ($macro) = $orgcode =~ /(sql_create_.+? *\(.+?\))/s; $out = << "---"; #include <sqlplusint/custom-macros.hh> $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 (<IN>) { 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; |
Added doc/sql++pretty.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | use FileHandle; use IPC::Open2; if ($ARGV[0] =~ /^--command\=(.+)/) { $command = $1; } else { $command = "g++ -E"; } $/ = undef; $orgcode = <STDIN>; ($macro) = $orgcode =~ /(sql_create_.+? *\(.+?\))/s; $out = << "---"; #include <sqlplusint/custom-macros.hh> $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 (<IN>) { 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; |
Deleted doc/ssqls-pretty.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted doc/userman/LICENSE.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted doc/userman/Makefile.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted doc/userman/README.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted doc/userman/common.xsl.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted doc/userman/fo.xsl.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted doc/userman/html.xsl.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted doc/userman/mktxt.
|
| < < < < < < < < < < < < < < < < < < < |
Deleted doc/userman/userman.dbx.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Added examples/Makefile.am.
> > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | noinst_PROGRAMS = resetdb simple1 custom1 custom2 custom3 custom4 complic1 fieldinf1 noinst_HEADERS = util.hh LDADD = $(top_builddir)/sqlplusint/libsqlplus.la @MYSQL_LIBS@ INCLUDES = -I$(top_srcdir)/sqlplusint @MYSQL_CFLAGS@ simple1_SOURCES = simple1.cc # sinisa_ex_SOURCES = sinisa_ex.cc resetdb_SOURCES = resetdb.cc util.cc custom1_SOURCES = custom1.cc custom2_SOURCES = custom2.cc util.cc custom3_SOURCES = custom3.cc util.cc custom4_SOURCES = custom4.cc complic1_SOURCES = complic1.cc fieldinf1_SOURCES = fieldinf1.cc |
Deleted examples/cgi_jpeg.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Added examples/complic1.cc.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | #include <iostream> #include <iomanip> #include <sqlplus.hh> int main() { try { // its in one big try block Connection con(use_exceptions); con.connect("mysql_cpp_data"); // Here I broke making the connection into two calls. // The first one creates the Connection object with the // use exceptions option turned on and the second one // makes the connection Query query = con.query(); query << "select * from stock"; Result res = query.store(); cout << "Query: " << query.preview() << endl; cout << "Records Found: " << res.size() << endl << endl; Row row; cout.setf(ios::left); cout << setw(17) << "Item" << setw(4) << "Num" << setw(7) << "Weight" << setw(7) << "Price" << "Date" << endl << endl; Result::iterator i; cout.precision(3); for (i = res.begin(); i != res.end(); i++) { row = *i; cout << setw(17) << row["item"] << setw(4) << row[1] << setw(7) << (double)row[2] // This is converting the row to a double so that we // can set the precision of it. // ColData has the nice feature that it will convert to // any of the basic c++ types. if there is a problem // in the conversion it will throw an exception (which I // cache below). To test it try changing the 2 in row[2] // to row[0] << setw(7) << (double)row[3]; Date date = row["sdate"]; // The ColData is implicitly converted to a date here. cout.setf(ios::right); cout.fill('0'); cout << setw(2) << date.month << "-" << setw(2) << date.day << endl; cout.fill(' '); cout.unsetf(ios::right); } return 0; } catch (BadQuery er) { // handle any connection or // query errors that may come up cerr << "Error: " << er.error << endl; return -1; } catch (BadConversion er) { // handle bad conversions cerr << "Error: Tried to convert \"" << er.data << "\" to a \"" << er.type_name << "\"." << endl; return -1; } } |
Added examples/custom1.cc.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | #include <iostream> #include <iomanip> #include <vector> #include <sqlplus.hh> #include <custom.hh> sql_create_5 (stock, // struct name, 1, 5, // I'll explain these latter string, item, // type, id int, num, double, weight, double, price, Date, sdate) // this is calling a very complex macro which will create a custom // struct "stock" which has the variables: // string item // int num // ... // Date sdate // defined as well methods to help populate the class from a mysql row // among other things that I'll get too in a latter example int main () { try { // its in one big try block Connection con (use_exceptions); con.connect ("mysql_cpp_data"); Query query = con.query (); query << "select * from stock"; vector < stock > res; query.storein (res); // this is storing the results into a vector of the custom struct // "stock" which was created my the macro above. cout.setf (ios::left); cout << setw (17) << "Item" << setw (4) << "Num" << setw (7) << "Weight" << setw (7) << "Price" << "Date" << endl << endl; // Now we we iterate through the vector using an iterator and // produce output similar to that using Row // Notice how we call the actual variables in i and not an index // offset. This is because the macro at the begging of the file // set up an *actual* struct of type stock which contains the // variables item, num, weight, price, and data. cout.precision(3); vector <stock>::iterator i; for (i = res.begin (); i != res.end (); i++) { cout << setw (17) << i->item.c_str () // unfortunally the gnu string class does not respond to format // modifers so I have to convert it to a conat char *. << setw (4) << i->num << setw (7) << i->weight << setw (7) << i->price << i->sdate << endl; } return 0; } catch (BadQuery er){ // handle any connection // or query errors that may come up cerr << "Error: " << er.error << endl; return -1; } catch (BadConversion er) { // we still need to cache bad conversions incase something goes // wrong when the data is converted into stock cerr << "Error: Tried to convert \"" << er.data << "\" to a \"" << er.type_name << "\"." << endl; return -1; } } |
Deleted examples/custom1.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Added examples/custom2.cc.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | #include <iostream> #include <vector> #include <sqlplus.hh> #include <custom.hh> #include "util.hh" // util.hh/cc contains the print_stock_table function sql_create_5(stock, 1, 5, string, item, int, num, double, weight, double, price, Date, sdate) int main() { try { // its in one big try block Connection con(use_exceptions); con.connect("mysql_cpp_data"); Query query = con.query(); stock row; // create an empty stock object /* row.item = "Hot Dogs"; row.num = 100; row.weight = 1.5; row.price = 1.75; row.sdate = "1998-09-25"; */ row.set("Hot Dogs", 100, 1.5, 1.75, "1998-09-25"); // populate stock query.insert(row); // form the query to insert the row // the table name is the name of the struct by default cout << "Query : " << query.preview() << endl; // show the query about to be executed query.execute(); // execute a query that does not return a result set print_stock_table(query); // now print the new table; } catch (BadQuery er) { cerr << "Error: " << er.error << endl; return -1; } catch (BadConversion er) { cerr << "Error: Tried to convert \"" << er.data << "\" to a \"" << er.type_name << "\"." << endl; return -1; } } |
Deleted examples/custom2.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Added examples/custom3.cc.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | #include <iostream> #include <vector> #include <sqlplus.hh> #include <custom.hh> #include "util.hh" // util.hh/cc contains the print_stock_table function sql_create_5(stock, 1, 5, string, item, int, num, double, weight, double, price, Date, sdate) int main() { try { // its in one big try block Connection con(use_exceptions); con.connect("mysql_cpp_data"); Query query = con.query(); query << "select * from stock where item = \"Hotdogs' Buns\" "; Result res = query.store(); if (res.empty()) throw BadQuery("Hotdogs' Buns not found in table, run reset-db"); // here we are testing if the query was successful, if not throw a bad query stock row = res[0]; // because there should only be one row in this query we don't // need to use a vector. Just store the first row directly in // "row". We can do this because one of the constructors for // stock takes a Row as an parameter. stock row2 = row; // Now we need to create a copy so that the replace query knows // what the original values are. row.item = "Hotdog Buns"; // now change item query.update(row2, row); // form the query to replace the row // the table name is the name of the struct by default cout << "Query : " << query.preview() << endl; // show the query about to be executed query.execute(); // execute a query that does not return a result set print_stock_table(query); // now print the new table; } catch (BadQuery er) { cerr << "Error: " << er.error << endl; return -1; } catch (BadConversion er) { cerr << "Error: Tried to convert \"" << er.data << "\" to a \"" << er.type_name << "\"." << endl; return -1; } } |
Deleted examples/custom3.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Added examples/custom4.cc.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | #include <iostream> #include <iomanip> #include <vector> #include <sqlplus.hh> #include <custom.hh> sql_create_5(stock, 1, // This number is used to make a SSQLS less-than-comparable. // If this number is n then if the first n elements are the // same the two SSQLS are the same. // In this case if two two stock's "item" are the same then // the two stock are the same. 5, // this number should generally be the same as the number of // elements in the list unless you have a good reason not to. string,item, int,num, double,weight, double,price, Date,sdate) int main() { try { // its in one big try block Connection con(use_exceptions); con.connect("mysql_cpp_data"); Query query = con.query(); query << "select * from stock"; set<stock> res; query.storein(res); // here we are storing the elements in a set not a vector. cout.setf (ios::left); cout << setw (17) << "Item" << setw (4) << "Num" << setw (7) << "Weight" << setw (7) << "Price" << "Date" << endl << endl; // Now we we iterate through the set. Since it is a set the list will // naturally be in order. set<stock>::iterator i; cout.precision(3); for (i = res.begin (); i != res.end (); i++) { cout << setw (17) << i->item.c_str () << setw (4) << i->num << setw (7) << i->weight << setw (7) << i->price << i->sdate << endl; } i = res.find(stock("Hamburger Buns")); if (i != res.end()) cout << "Hamburger Buns found. Currently " << i->num << " in stock.\n"; else cout << "Sorry no Hamburger Buns found in stock\n"; // Now we are using the set's find method to find out how many // Hamburger Buns are in stock. return 0; } catch (BadQuery er) { cerr << "Error: " << er.error << endl; return -1; } catch (BadConversion er) { cerr << "Error: Tried to convert \"" << er.data << "\" to a \"" << er.type_name << "\"." << endl; return -1; } } |
Deleted examples/custom4.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted examples/custom5.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted examples/custom6.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted examples/dbinfo.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Added examples/fieldinf1.cc.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | #include <iostream> #include <iomanip> #include <sqlplus.hh> int main() { try { // its in one big try block Connection con(use_exceptions); con.connect("mysql_cpp_data"); Query query = con.query(); query << "select * from stock"; Result res = query.store(); cout << "Query: " << query.preview() << endl; cout << "Records Found: " << res.size() << endl << endl; cout << "Query Info:\n"; cout.setf(ios::left); for (unsigned int i = 0; i < res.names().size(); i++) { cout << setw(2) << i << setw(15) << res.names(i).c_str() // this is the name of the field << setw(15) << res.types(i).sql_name() // this is the SQL identifier name // Result::types(unsigned int) returns a mysql_type_info which in many // ways is like type_info except that it has additional sql type // information in it. (with one of the methods being sql_name()) << setw(20) << res.types(i).name() // this is the C++ identifier name which most closely resembles // the sql name (its is implementation defined and often not very readable) << endl; } cout << endl; if (res.types(0) == typeid(string)) cout << "Field 'item' is of an sql type which most closely resembles a\n" << "the c++ string type\n"; // this is demonstrating how a mysql_type_info can be compared with a c++ // type_info. if (res.types(1) == typeid(short int)) cout << "Field 'num' is of an sql type which most closely resembles a\n" << "the c++ short int type\n"; else if (res.types(1).base_type() == typeid(short int)) cout << "Field 'num' base type is of an sql type which most closely \n" << "resembles a the c++ short int type\n"; // However you have to be careful as if it can be null the actual type is // Null<TYPE> not TYPE. So you should always use the base_type method // to get at the underlying type. If the type is not null than this base // type would be the same as its type. return 0; } catch (BadQuery er) { cerr << "Error: " << er.error << endl; return -1; } catch (BadConversion er) { // handle bad conversions cerr << "Error: Tried to convert \"" << er.data << "\" to a \"" << er.type_name << "\"." << endl; return -1; } } |
Deleted examples/fieldinf1.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted examples/for_each.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted examples/load_jpeg.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted examples/logo.jpg.
cannot compute difference between binary files
Deleted examples/multiquery.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Added examples/resetdb.cc.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | #include <iostream> #include <sqlplus.hh> int main (int argc, char *argv[]) { Connection connection(use_exceptions); try { // the entire main block is one big try block; if (argc == 1) connection.connect(""); else if (argc == 2) connection.connect("",argv[1]); else if (argc == 3) connection.connect("",argv[1],argv[2]); else if (argc <= 4) connection.connect("",argv[1],argv[2],argv[3]); // create a new object and connect based on any (if any) arguments // passed to main(); try { connection.select_db("mysql_cpp_data"); } catch (BadQuery er) { // if it couldn't connect to the database assume that it doesn't exist // and try created it. If that does not work exit with an error. connection.create_db("mysql_cpp_data"); connection.select_db("mysql_cpp_data"); } Query query = connection.query(); // create a new query object try { // ignore any errors here // I hope to make this simpler soon query.execute("drop table stock"); } catch (BadQuery er) {} query << "create table stock (item char(20) not null, num smallint," << "weight double, price double, sdate date)"; query.execute(RESET_QUERY); // send the query to create the table and execute it. The // RESET_QUERY tells the query object to reset it self after // execution query << "insert into %5:table values (%0q, %1q, %2, %3, %4q)"; query.parse(); // set up the template query I will use to insert the data. The // parse method call is important as it is what lets the query // know that this is a template and not a literal string query.def["table"] = "stock"; // This is setting the parameter named table to stock. query.execute ("Hamburger Buns", 56, 1.25, 1.1, "1998-04-26"); query.execute ("Hotdogs' Buns" ,65, 1.1 , 1.1, "1998-04-23"); query.execute ("Dinner Roles" , 75, .95, .97, "1998-05-25"); query.execute ("White Bread" , 87, 1.5, 1.75, "1998-09-04"); // The last parameter "table" is not specified here. Thus // the default value for "table" is used which is "stock". } catch (BadQuery er) { // handle any errors that may come up cerr << "Error: " << er.error << endl; return -1; } } |
Deleted examples/resetdb.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Added examples/simple1.cc.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | #include <iostream> #include <iomanip> #include <sqlplus.hh> int main() { Connection con("mysql_cpp_data"); // The full format for the Connection constructor is // Connection(cchar *db, cchar *host="", // cchar *user="", cchar *passwd="") // You may need to specify some of them if the database is not on // the local machine or you database username is not the same as your // login name, etc.. Query query = con.query(); // This creates a query object that is bound to con. query << "select * from stock"; // You can write to the query object like you would any other ostrem Result res = query.store(); // Query::store() executes the query and returns the results cout << "Query: " << query.preview() << endl; // Query::preview() simply returns a string with the current query // string in it. cout << "Records Found: " << res.size() << endl << endl; Row row; cout.setf(ios::left); cout << setw(17) << "Item" << setw(4) << "Num" << setw(7) << "Weight" << setw(7) << "Price" << "Date" << endl << endl; Result::iterator i; // The Result class has a read-only Random Access Iterator for (i = res.begin(); i != res.end(); i++) { row = *i; cout << setw(17) << row[0] << setw(4) << row[1] << setw(7) << row["weight"] // you can use either the index number or column name when // retrieving the colume data as demonstrated above. << setw(7) << row[3] << row[4] << endl; } return 0; } |
Deleted examples/simple1.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted examples/simple2.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted examples/simple3.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Added examples/sinisa_ex.cc.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | #include <vector> #include <string> vector<string> yy; #include <iostream> #include <iomanip> #include <mysql++> int main() { Connection con(use_exceptions); try { con.real_connect ("","localhost","root","",3306,(int)0,60,NULL); cout << con.clinet_info() << endl << endl; Query query = con.query(); query << "show databases"; Result res = query.store(); cout << "Query: " << query.preview() << endl; cout << "Records Found: " << res.size() << endl << endl; Row row; cout.setf(ios::left); cout << setw(17) << "Databases" << endl << endl; Result::iterator i; for (i = res.begin(); i != res.end(); i++) { row = *i; cout << setw(17) << row[0] << endl; } char database [] = "mysql"; con.select_db (database); query << "show tables"; res = query.store(); cout << "Query: " << query.preview() << endl; cout << "Records Found: " << res.size() << endl << endl; cout.setf(ios::left); cout << setw(17) << "Tables" << endl << endl; for (i = res.begin(); i != res.end(); i++) { row = *i; string xx(row[0]); cout << setw(17) << row[0] << endl; yy.insert(yy.end(),xx); } for (unsigned int j = 0; j < yy.size();j++) { query << "describe " << yy[j] << ""; cout << query.preview() << endl << endl; res = query.store(); unsigned int columns = res.num_fields(), counter; cout << setw(15) << endl; for (counter = 0; counter < columns; counter++) { cout << setw(15) << res.names(counter) << " "; } cout << endl << endl; for (i = res.begin(); i!=res.end();i++) { row = *i; for (counter = 0; counter < columns; counter++) { cout << row[counter] << " "; } cout << endl; } } query << "select * from user"; res = query.store(); int columns = res.num_fields(); cout << query.preview() << endl << endl; cout << "fields = " << res.num_fields() << "rows = " << res.size() << endl; for (i = res.begin(); i!=res.end();i++) { row = *i; for (int counter = 0; counter < columns; counter++) { cout << row[counter] << " "; } cout << endl; } } catch (BadQuery er){ // handle any connection // or query errors that may come up cerr << "Error: " << er.error << " " << con.errnum() << endl; return -1; } catch (BadConversion er) { // we still need to cache bad conversions incase something goes // wrong when the data is converted into stock cerr << "Error: Tried to convert \"" << er.data << "\" to a \"" << er.type_name << "\"." << endl; return -1; } } |
Deleted examples/stock.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted examples/store_if.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted examples/tquery.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted examples/usequery.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Added examples/util.cc.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | #include <iostream> #include <iomanip> #include "util.hh" void print_stock_table(Query& query) { query.reset(); query << "select * from stock"; // You can write to the query object like you would any other ostrem Result res = query.store(); // Query::store() executes the query and returns the results cout << "Query: " << query.preview() << endl; // Query::preview() simply returns a string with the current query // string in it. cout << "Records Found: " << res.size() << endl << endl; Row row; cout.setf(ios::left); cout << setw(17) << "Item" << setw(4) << "Num" << setw(7) << "Weight" << setw(7) << "Price" << "Date" << endl << endl; Result::iterator i; // The Result class has a read-only Random Access Iterator for (i = res.begin(); i != res.end(); i++) { row = *i; cout << setw(17) << row[0] << setw(4) << row[1] << setw(7) << row["weight"] // you can use either the index number or column name when // retrieving the colume data as demonstrated above. << setw(7) << row[3] << row[4] << endl; } } |
Deleted examples/util.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted examples/util.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Added examples/util.hh.
> > > > > > > > | 1 2 3 4 5 6 7 8 | #ifndef _util_hh_ #define _util_hh_ #include <sqlplus.hh> void print_stock_table(Query& query); #endif |
Deleted examples/vstudio/mfc/mfc.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted examples/vstudio/mfc/mfc.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted examples/vstudio/mfc/mfc.rc.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted examples/vstudio/mfc/mfc_dlg.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted examples/vstudio/mfc/mfc_dlg.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted examples/vstudio/mfc/resource.h.
|
| < < < < < < < < < < < < < < < < < < < < < < |
Deleted examples/vstudio/mfc/stdafx.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted examples/vstudio/wforms/AssemblyInfo.cpp.
|
| < < < < < < < < < < < < < < < < < < |
Deleted examples/vstudio/wforms/MainForm.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted examples/vstudio/wforms/MainForm.resX.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted examples/vstudio/wforms/resource.h.
|
| < < < |
Deleted examples/vstudio/wforms/wforms.cpp.
|
| < < < < < < < < < < < < < < < < < |
Deleted examples/xaction.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted exrun.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted exrun.bat.
|
| < < < < < < < |
Deleted install.bat.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/Doxyfile.in.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/autoflag.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/coldata.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/coldata.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/common.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/connection.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/connection.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/const_string.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/convert.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/custom-macros.h.
more than 10,000 changes
Deleted lib/custom.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/custom.pl.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/datetime.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/datetime.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/exceptions.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/field_names.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/field_names.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/field_types.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/field_types.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/fields.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/fields.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/lockable.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/manip.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/manip.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/myset.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/myset.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/mysql++.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/mysql++.h.in.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/noexceptions.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/null.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/qparms.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/qparms.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/query.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/query.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/querydef.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/querydef.pl.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/resiter.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/result.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/result.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/row.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/row.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/sql_string.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/sql_string.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/sql_types.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/stream2string.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/string_util.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/string_util.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/tiny_int.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/transaction.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/transaction.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/type_info.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/type_info.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/vallist.cpp.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted lib/vallist.h.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted libmysqlclient.def.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted mysql++.bkl.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted mysql++.ebuild.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted mysql++.spec.in.
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted osver.
|
| < < < < < < < < < < < < < < < < |
Deleted rebake.
|
| < < < < |
Deleted reconf.
|
| < < |
Added sqlplus-config.in.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | #!/bin/sh prefix=@prefix@ exec_prefix=@exec_prefix@ exec_prefix_set=no usage() { cat <<EOF Usage: $0 [OPTIONS] [LIBRARIES] Options: [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cxxflags] Libraries: sqlplus EOF exit $1 } if test $# -eq 0; then usage 1 1>&2 fi while test $# -gt 0; do case "$1" in -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac case $1 in --prefix=*) prefix=$optarg if test $exec_prefix_set = no ; then exec_prefix=$optarg fi ;; --prefix) echo_prefix=yes ;; --exec-prefix=*) exec_prefix=$optarg exec_prefix_set=yes ;; --exec-prefix) echo_exec_prefix=yes ;; --version) echo @SQLPLUS_VERSION@ exit 0 ;; --cxxflags) includes="" if test "@includedir@" != /usr/include ; then includes="-I@includedir@" fi includes="${includes} -I@includedir@/@PACKAGE@" echo_cxxflags=yes ;; --libs) echo_libs=yes ;; sqlplus) lib_sqlplus=yes ;; *) usage 1 1>&2 ;; esac shift done if test "$echo_prefix" = "yes"; then echo $prefix fi if test "$echo_exec_prefix" = "yes"; then echo $exec_prefix fi if test "$echo_lock_dir" = "yes"; then echo $lock_dir fi if test "$echo_cxxflags" = "yes"; then cxxflags="" echo $includes $cxxflags fi if test "$echo_libs" = "yes"; then libsp="" libsa="" if test "$lib_sqlplus" = "yes"; then libsp="$libsp --lsqlplus" fi echo -L@libdir@ $libsp $libsa fi |
Added sqlplus.spec.in.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | # -*- Mode:rpm-spec -*- # mysql++.spec.in Summary: C++ interface to MySQL database %define rel 2 %define version @VERSION@ %define pkgname @PACKAGE@ %define prefix /usr %define lt_release @LT_RELEASE@ %define lt_version @LT_CURRENT@.@LT_REVISION@.@LT_AGE@ Name: %{pkgname} Version: %{version} Release: %{rel} Copyright: LGPL Group: Applications/Databases Source: %{pkgname}-%{version}.tar.gz Requires: MySQL-server Buildroot: /tmp/%{pkgname}-root URL: http://mysql.com Prefix: %{prefix} Packager: Dale K. Hawkins <dhawkins@cdrgts.com> %description A C++ interface to the MySQL API. %changelog * Tue Jan 4 2000 Dale Hawkins <dhawkins@cdrgts.com> - Added a spec.in file to work with autoconf and to support libtool's release mechanism %prep %setup #%patch %build %GNUconfigure # This is why we copy the CFLAGS to the CXXFLAGS in configure.in # CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} make %install # To make things work with BUILDROOT if [ "$RPM_BUILD_ROOT" != "/tmp/%{pkgname}-root" ] then echo echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ echo @ @ echo @ RPM_BUILD_ROOT is not what I expected. Please clean it yourself. @ echo @ @ echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ echo else echo Cleaning RPM_BUILD_ROOT: "$RPM_BUILD_ROOT" rm -rf "$RPM_BUILD_ROOT" fi make DESTDIR="$RPM_BUILD_ROOT" install %clean # Call me paranoid, but I do not want to be responsible for nuking # someone's harddrive! if [ "$RPM_BUILD_ROOT" != "/tmp/%{pkgname}-root" ] then echo echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ echo @ @ echo @ RPM_BUILD_ROOT is not what I expected. Please clean it yourself. @ echo @ @ echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ echo else echo Cleaning RPM_BUILD_ROOT: "$RPM_BUILD_ROOT" rm -rf "$RPM_BUILD_ROOT" fi %files %defattr(-, root, root) %{prefix}/lib/libsqlplus*.so* %doc COPYRIGHT ChangeLog README AUTHORS NEWS %doc doc/* %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %package devel Summary: Development files for %{pkgname} Group: Applications/Databases %description devel Development files for %{pkgname}. %files devel %defattr(-, root, root) %{prefix}/lib/lib*.so %{prefix}/lib/*a %defattr(0775, root, root) %{prefix}/bin/%{pkgname}-config %dir %{prefix}/include/%{pkgname} # IMHO, the examples should be installed as well %doc examples/*.cc %doc examples/*.hh |
Added sqlplusint/Makefile.am.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | EXTRA_DIST = custom.pl lib_LTLIBRARIES = libsqlplus.la libsqlplus_la_SOURCES = coldata.cc connection.cc datetime.cc field_names.cc \ field_types.cc manip.cc query.cc result.cc row.cc set.cc sql_query.cc \ type_info.cc vallist.cc libsqlplus_la_LDFLAGS = \ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ -release $(LT_RELEASE) noinst_HEADERS = magic.h tracker.h # a little automake magic here; puts the headers in # $(prefix)/include/$(package) good for projects such as this. Let # mysql++-config sort things out... pkginclude_HEADERS = sqlplus.hh coldata1.hh coldata2.hh coldata3.hh coldata4.hh \ compare1.hh compare2.hh compare3.hh connection0.hh connection1.hh \ connection2.hh connection3.hh const_string1.hh const_string2.hh const_string3.hh \ convert1.hh convert2.hh convert3.hh custom-macros.hh custom.hh datetime1.hh \ datetime2.hh datetime3.hh field_names1.hh field_names2.hh field_names3.hh \ field_types1.hh field_types2.hh field_types3.hh fields1.hh fields2.hh \ manip1.hh manip2.hh manip3.hh null1.hh null2.hh null3.hh query1.hh query2.hh \ query3.hh resiter1.hh result1.hh result2.hh result3.hh row1.hh row2.hh \ row3.hh set1.hh set2.hh set3.hh sql_query0.hh sql_query1.hh sql_query2.hh \ sql_query3.hh sql_string1.hh sql_string2.hh sql_string3.hh stream2string1.hh \ stream2string2.hh stream2string3.hh tiny_int1.hh tiny_int2.hh tiny_int3.hh \ type_info1.hh type_info2.hh type_info3.hh vallist1.hh vallist2.hh vallist3.hh \ define_short defs undef_short BUILT_SOURCES = custom.hh custom-macros.hh custom.hh custom-macros.hh: custom.pl @PERL@ custom.pl # These files should be removed by invoking maintainer-clean # all-local: custom.hh custom-macros.hh # distclean-local: # rm -f custom.hh custom-macros.hh |
Added sqlplusint/Makefile.in.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 | # Makefile.in generated automatically by automake 1.4 from Makefile.am # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include DESTDIR = pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_alias = @host_alias@ host_triplet = @host@ AS = @AS@ CC = @CC@ CXX = @CXX@ CXXCPP = @CXXCPP@ DLLTOOL = @DLLTOOL@ LD = @LD@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ NM = @NM@ OBJDUMP = @OBJDUMP@ PACKAGE = @PACKAGE@ PERL = @PERL@ RANLIB = @RANLIB@ SQLPLUS_BINARY_AGE = @SQLPLUS_BINARY_AGE@ SQLPLUS_INTERFACE_AGE = @SQLPLUS_INTERFACE_AGE@ SQLPLUS_MAJOR_VERSION = @SQLPLUS_MAJOR_VERSION@ SQLPLUS_MICRO_VERSION = @SQLPLUS_MICRO_VERSION@ SQLPLUS_MINOR_VERSION = @SQLPLUS_MINOR_VERSION@ VERSION = @VERSION@ EXTRA_DIST = custom.pl lib_LTLIBRARIES = libsqlplus.la libsqlplus_la_SOURCES = coldata.cc connection.cc datetime.cc field_names.cc field_types.cc manip.cc query.cc result.cc row.cc set.cc sql_query.cc type_info.cc vallist.cc libsqlplus_la_LDFLAGS = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -release $(LT_RELEASE) noinst_HEADERS = magic.h tracker.h # a little automake magic here; puts the headers in # $(prefix)/include/$(package) good for projects such as this. Let # mysql++-config sort things out... pkginclude_HEADERS = sqlplus.hh coldata1.hh coldata2.hh coldata3.hh coldata4.hh compare1.hh compare2.hh compare3.hh connection0.hh connection1.hh connection2.hh connection3.hh const_string1.hh const_string2.hh const_string3.hh convert1.hh convert2.hh convert3.hh custom-macros.hh custom.hh datetime1.hh datetime2.hh datetime3.hh field_names1.hh field_names2.hh field_names3.hh field_types1.hh field_types2.hh field_types3.hh fields1.hh fields2.hh manip1.hh manip2.hh manip3.hh null1.hh null2.hh null3.hh query1.hh query2.hh query3.hh resiter1.hh result1.hh result2.hh result3.hh row1.hh row2.hh row3.hh set1.hh set2.hh set3.hh sql_query0.hh sql_query1.hh sql_query2.hh sql_query3.hh sql_string1.hh sql_string2.hh sql_string3.hh stream2string1.hh stream2string2.hh stream2string3.hh tiny_int1.hh tiny_int2.hh tiny_int3.hh type_info1.hh type_info2.hh type_info3.hh vallist1.hh vallist2.hh vallist3.hh define_short defs undef_short BUILT_SOURCES = custom.hh custom-macros.hh mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../config.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(lib_LTLIBRARIES) DEFS = @DEFS@ -I. -I$(srcdir) -I.. CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ libsqlplus_la_LIBADD = libsqlplus_la_OBJECTS = coldata.lo connection.lo datetime.lo \ field_names.lo field_types.lo manip.lo query.lo result.lo row.lo set.lo \ sql_query.lo type_info.lo vallist.lo CXXFLAGS = @CXXFLAGS@ CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ HEADERS = $(noinst_HEADERS) $(pkginclude_HEADERS) DIST_COMMON = README Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = gtar GZIP_ENV = --best DEP_FILES = .deps/coldata.P .deps/connection.P .deps/datetime.P \ .deps/field_names.P .deps/field_types.P .deps/manip.P .deps/query.P \ .deps/result.P .deps/row.P .deps/set.P .deps/sql_query.P \ .deps/type_info.P .deps/vallist.P SOURCES = $(libsqlplus_la_SOURCES) OBJECTS = $(libsqlplus_la_OBJECTS) all: all-redirect .SUFFIXES: .SUFFIXES: .S .c .cc .lo .o .s $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --gnu sqlplusint/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status mostlyclean-libLTLIBRARIES: clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) distclean-libLTLIBRARIES: maintainer-clean-libLTLIBRARIES: install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(libdir) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \ $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) list='$(lib_LTLIBRARIES)'; for p in $$list; do \ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \ done .s.o: $(COMPILE) -c $< .S.o: $(COMPILE) -c $< mostlyclean-compile: -rm -f *.o core *.core clean-compile: distclean-compile: -rm -f *.tab.c maintainer-clean-compile: .s.lo: $(LIBTOOL) --mode=compile $(COMPILE) -c $< .S.lo: $(LIBTOOL) --mode=compile $(COMPILE) -c $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: maintainer-clean-libtool: libsqlplus.la: $(libsqlplus_la_OBJECTS) $(libsqlplus_la_DEPENDENCIES) $(CXXLINK) -rpath $(libdir) $(libsqlplus_la_LDFLAGS) $(libsqlplus_la_OBJECTS) $(libsqlplus_la_LIBADD) $(LIBS) .cc.o: $(CXXCOMPILE) -c $< .cc.lo: $(LTCXXCOMPILE) -c $< install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(pkgincludedir) @list='$(pkginclude_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(pkgincludedir)/$$p"; \ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(pkgincludedir)/$$p; \ done uninstall-pkgincludeHEADERS: @$(NORMAL_UNINSTALL) list='$(pkginclude_HEADERS)'; for p in $$list; do \ rm -f $(DESTDIR)$(pkgincludedir)/$$p; \ done tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ here=`pwd` && cd $(srcdir) \ && mkid -f$$here/ID $$unique $(LISP) TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) mostlyclean-tags: clean-tags: distclean-tags: -rm -f TAGS ID maintainer-clean-tags: distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = sqlplusint distdir: $(DISTFILES) here=`cd $(top_builddir) && pwd`; \ top_distdir=`cd $(top_distdir) && pwd`; \ distdir=`cd $(distdir) && pwd`; \ cd $(top_srcdir) \ && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu sqlplusint/Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :) -include $(DEP_FILES) mostlyclean-depend: clean-depend: distclean-depend: -rm -rf .deps maintainer-clean-depend: %.o: %.c @echo '$(COMPILE) -c $<'; \ $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $< @-cp .deps/$(*F).pp .deps/$(*F).P; \ tr ' ' '\012' < .deps/$(*F).pp \ | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ >> .deps/$(*F).P; \ rm .deps/$(*F).pp %.lo: %.c @echo '$(LTCOMPILE) -c $<'; \ $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $< @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \ < .deps/$(*F).pp > .deps/$(*F).P; \ tr ' ' '\012' < .deps/$(*F).pp \ | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ >> .deps/$(*F).P; \ rm -f .deps/$(*F).pp %.o: %.cc @echo '$(CXXCOMPILE) -c $<'; \ $(CXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $< @-cp .deps/$(*F).pp .deps/$(*F).P; \ tr ' ' '\012' < .deps/$(*F).pp \ | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ >> .deps/$(*F).P; \ rm .deps/$(*F).pp %.lo: %.cc @echo '$(LTCXXCOMPILE) -c $<'; \ $(LTCXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $< @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \ < .deps/$(*F).pp > .deps/$(*F).P; \ tr ' ' '\012' < .deps/$(*F).pp \ | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ >> .deps/$(*F).P; \ rm -f .deps/$(*F).pp info-am: info: info-am dvi-am: dvi: dvi-am check-am: all-am check: check-am installcheck-am: installcheck: installcheck-am install-exec-am: install-libLTLIBRARIES install-exec: install-exec-am install-data-am: install-pkgincludeHEADERS install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am uninstall-am: uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS uninstall: uninstall-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(pkgincludedir) mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) mostlyclean-am: mostlyclean-libLTLIBRARIES mostlyclean-compile \ mostlyclean-libtool mostlyclean-tags mostlyclean-depend \ mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-libLTLIBRARIES clean-compile clean-libtool clean-tags \ clean-depend clean-generic mostlyclean-am clean: clean-am distclean-am: distclean-libLTLIBRARIES distclean-compile \ distclean-libtool distclean-tags distclean-depend \ distclean-generic clean-am -rm -f libtool distclean: distclean-am maintainer-clean-am: maintainer-clean-libLTLIBRARIES \ maintainer-clean-compile maintainer-clean-libtool \ maintainer-clean-tags maintainer-clean-depend \ maintainer-clean-generic distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." maintainer-clean: maintainer-clean-am .PHONY: mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \ clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \ uninstall-libLTLIBRARIES install-libLTLIBRARIES mostlyclean-compile \ distclean-compile clean-compile maintainer-clean-compile \ mostlyclean-libtool distclean-libtool clean-libtool \ maintainer-clean-libtool uninstall-pkgincludeHEADERS \ install-pkgincludeHEADERS tags mostlyclean-tags distclean-tags \ clean-tags maintainer-clean-tags distdir mostlyclean-depend \ distclean-depend clean-depend maintainer-clean-depend info-am info \ dvi-am dvi check check-am installcheck-am installcheck install-exec-am \ install-exec install-data-am install-data install-am install \ uninstall-am uninstall all-redirect all-am all installdirs \ mostlyclean-generic distclean-generic clean-generic \ maintainer-clean-generic clean mostlyclean distclean maintainer-clean custom.hh custom-macros.hh: custom.pl @PERL@ custom.pl # These files should be removed by invoking maintainer-clean # all-local: custom.hh custom-macros.hh # distclean-local: # rm -f custom.hh custom-macros.hh # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: |
Added sqlplusint/README.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | All of the header files in this directory (sqlplusint) are internal. This means that you should never include any of these directly in your programs as they are subject to change from one releases to another. For those interesting in improving the code the files are laid out in the following fashion: name0.hh: Header files ending in a 0.hh generally contains macro definitions and other messy stuff. name1.hh: Header files ending in 1.hh contain just the class as functions declarations and really simple inline functions. A 1.hh header file should never include anything but other 1.hh header files. name2.hh: Header files ending in 2.hh contain inline functions and methods. They should generally only include other 1.hh or 2.hh header files however they may also include 3.hh and 4.hh header files if, for example, they want to instantiate the necessary template functions. name3.hh: Header files ending in 3.hh contain non-inline template functions and methods. name4.hh: Header files ending in 4.hh contain template functions in which are the necessary instances should already be instantiated. Thus these should never be included in the end users program. Only within other 4.hh or .cc files in this directory. name.cc: These contain the actual functions and methods corresponding the the appropriate header file. They may include templates provided that the necessary instances will all be instantiated by the end of the .cc file The name1.hh, name2.hh, and name3.hh are all guaranteed to exists if at least one of them exists so that I don't have to worry about checking if they exists. However, they files may contain nothing but #include"name<prev number.hh" I chose this format to minimize interdependencies and to help better organize my code. |
Added sqlplusint/coldata.cc.
> > > > > > | 1 2 3 4 5 6 | #include <string> #include "const_string3.hh" #include "coldata4.hh" template class mysql_ColData<string>; template class mysql_ColData<const_string>; |
Added sqlplusint/coldata1.hh.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | #ifndef __coldata1_hh__ #define __coldata1_hh__ #include <typeinfo> #include <string> #include "defs" #include "type_info1.hh" #include "const_string1.hh" #include "null1.hh" //! with_class = mysql_ColData //: Exception structure thrown when a bad conversion takes place struct BadConversion { const char* type_name; //: const string data; //: size_t retrieved; //: size_t actual_size;//: BadConversion(const char* tn, const char* d, size_t r, size_t a) : type_name(tn), data(d), retrieved(r), actual_size(a) {}; }; //: Base class for auto-converting column data. Do not use directly. // // A smart string. It will automatically convert it self to any of the // basic C types. // // When used with binary operators it will // automatically convert it self to the type used on the other side of // the operator if it is a basic type. // // However, be careful when using it with binary operators as. // // MysqlStr("12.86") + 2 // // will return 14 because 2 is an integer. What you wanted to say was // // MysqlStr("12.86") + 2.0 // // If this type of thing scares you define the micro NO_BINARY_OPERS // to turn of this behavior. // // This class also has some basic information about the type of data // stored in it. // // <bf>Do not use this class directly.</bf> // Use the typedef ColData or MutableColData instead. template <class Str> class mysql_ColData : public Str { private: mysql_type_info _type; string buf; public: mysql_ColData (mysql_type_info t = mysql_type_info::string_type) : _type(t) {} mysql_ColData (const char *str, mysql_type_info t = mysql_type_info::string_type) : Str(str), _type(t) {buf=(string)str;} mysql_type_info type() {return _type;} //: Returns the current mysql type of current item bool quote_q() const {return _type.quote_q();} //: Returns true or false depending on if the data is of a type that //: should be quoted bool escape_q() const {return _type.escape_q();} //: Returns true of false depending on if the data is of a type that //: should be escaped template<class Type> Type conv (Type dummy) const; //!dummy: operator TYPE() const; //: Converts the column data to TYPE. // If all the charters are not read during the conversion to TYPE it // will through BadConversion. // // TYPE is defined for all the build in types. // // (Note, This is not an actual template) operator cchar*() const {return buf.c_str();} operator signed char() const {return conv((signed char)0);} operator unsigned char() const {return conv((unsigned char)0);} operator int() const {return conv((int)0);} operator unsigned int() const {return conv((unsigned int)0);} operator short int() const {return conv((short int)0);} operator unsigned short int() const {return conv((unsigned short int)0);} operator long int() const {return conv((long int)0);} operator unsigned long int() const {return conv((unsigned long int)0);} #ifndef NO_LONG_LONGS operator long long int() const {return conv((long long int)0);} operator unsigned long long int() const {return conv((unsigned long long int)0);} #endif operator float() const {return conv((float)0);} operator double() const {return conv((double)0);} template <class T, class B> operator Null<T,B> () const; }; //: The Type that is returned by constant rows typedef mysql_ColData<const_string> ColData; //: The Type that is returned by mutable rows typedef mysql_ColData<string> MutableColData; //: For backwards compatibility. Do not use. typedef ColData MysqlString; //: For backwards compatibility. Do not use. typedef ColData MysqlStr; #endif |
Added sqlplusint/coldata2.hh.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | #ifndef __coldata2_hh__ #define __coldata2_hh__ #include <stdlib.h> #include "coldata1.hh" #ifndef NO_BINARY_OPERS #define oprsw(opr, other, conv) \ template<class Str> \ inline other operator opr (mysql_ColData<Str> x, other y) \ {return (conv)x opr y;} \ template<class Str> \ inline other operator opr (other x, mysql_ColData<Str> y) \ {return x opr (conv)y;} #define operator_binary(other, conv) \ oprsw(+, other, conv) \ oprsw(-, other, conv) \ oprsw(*, other, conv) \ oprsw(/, other, conv) #define operator_binary_int(other, conv) \ operator_binary(other, conv) \ oprsw(%, other, conv) \ oprsw(&, other, conv) \ oprsw(^, other, conv) \ oprsw(|, other, conv) \ oprsw(<<, other, conv) \ oprsw(>>, other, conv) operator_binary(float, double) operator_binary(double, double) operator_binary_int(char,long int) operator_binary_int(int, long int) operator_binary_int(short int, long int) operator_binary_int(long int, long int) operator_binary_int(unsigned char, unsigned long int) operator_binary_int(unsigned int, unsigned long int) operator_binary_int(unsigned short int, unsigned long int) operator_binary_int(unsigned long int, unsigned long int) #ifndef NO_LONG_LONGS operator_binary_int(long long int, long long int) operator_binary_int(unsigned long long int, unsigned long long int) #endif #endif // NO_BINARY_OPERS #endif |
Added sqlplusint/coldata3.hh.
> > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | #ifndef __coldata3_hh__ #define __coldata3_hh__ #ifdef __WIN32__ #include <Windows32/Base.h> #include <Windows32/Defines.h> #include <Windows32/Structures.h> #include <winsock.h> #define errno WSAGetLastError() #endif #include <mysql.h> #include <string> #include "coldata2.hh" #include "convert3.hh" #include "null3.hh" template <class Str> template <class T, class B> mysql_ColData<Str>::operator Null<T,B> () const { if ((*this)[0] == 'N' && (*this)[1] == 'U' && (*this)[2] == 'U' && (*this)[3] == 'L' && size() == 4) return Null<T,B>(null); else return Null<T,B>(conv(T())); } #endif |
Added sqlplusint/coldata4.hh.
> > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | #ifndef __coldata4_h__ #define __coldata4_h__ #include "convert3.hh" #include "coldata3.hh" template <class Str> template<class Type> Type mysql_ColData<Str>::conv (Type dummy) const { size_t len = size(); const char *str = c_str(); const char *end = str; Type num = mysql_convert<Type>(str, end); if (*end == '.') { end++; for (;*end == '0'; end++); } if (*end != '\0' && end != NULL ) { throw BadConversion (typeid(Type).name(), c_str(), end - str, len); } return num; } #endif |
Added sqlplusint/compare1.hh.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | #ifndef __compare1_hh__ #define __compare1_hh__ #include <function.h> #include "row1.hh" template <class BinaryPred, class CmpType> class MysqlCmp : public unary_function<const MysqlRow&, bool> { 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 BinaryPred> class MysqlCmpCStr : public MysqlCmp<BinaryPred, const char *> { public: MysqlCmpCStr(uint i, const BinaryPred &f, const char* c) : MysqlCmp<BinaryPred, const char *> (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 <class BinaryPred, class CmpType> MysqlCmp <BinaryPred, CmpType> mysql_cmp(uint i, const BinaryPred &func, const CmpType &cmp2) { return MysqlCmp<BinaryPred, CmpType>(i, func, cmp2); } typedef binary_function<const char*, const char*, bool> 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 <class BinaryPred> MysqlCmpCStr <BinaryPred> mysql_cmp_cstr (uint i, const BinaryPred &func, const char *cmp2) { return MysqlCmpCStr<BinaryPred>(i, func, cmp2); } #endif |
Added sqlplusint/compare2.hh.
> > | 1 2 | #include "compare1.hh" |
Added sqlplusint/compare3.hh.
> > | 1 2 | #include "compare2.hh" |
Added sqlplusint/connection.cc.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | #include "connection3.hh" #include "result3.hh" // pointer_tracker<MYSQL,Connection> Connection::others = pointer_tracker<MYSQL, Connection>(); Connection::Connection (const char *db, const char *host, const char *user, const char *passwd, bool te) : throw_exceptions(te), locked(false) { mysql_init(&mysql); if (connect (db, host, user, passwd)) { locked = false; Success = is_connected = true; } else { locked = false; Success = is_connected = false; if (throw_exceptions) throw BadQuery(error()); } // others.insert(&mysql,this); } Connection::Connection (const char *db, const char *host, const char *user, const char *passwd, uint port, my_bool compress, unsigned int connect_timeout, bool te, const char *socket_name) : throw_exceptions(te), locked(false) { mysql_init(&mysql); if (real_connect (db, host, user, passwd, port, compress, connect_timeout,socket_name)) { locked = false; Success = is_connected = true; } else { locked = false; Success = is_connected = false; if (throw_exceptions) throw BadQuery(error()); } // others.insert(&mysql,this); } bool Connection::real_connect (cchar *db, cchar *host, cchar *user, cchar *passwd, uint port, my_bool compress, unsigned int connect_timeout, const char *socket_name) { if (socket_name && socket_name[0]) mysql.options.unix_socket = (char *)socket_name; else mysql.options.unix_socket=NULL; mysql.options.port = port; mysql.options.compress = compress; mysql.options.connect_timeout=connect_timeout; locked = true; if (mysql_connect(&mysql, host, user, passwd)) { locked = false; Success = is_connected = true; } else { locked = false; Success = is_connected = false; if (throw_exceptions) throw BadQuery(error()); } if (!Success) return Success; if (db[0]) // if db is not empty Success = select_db(db); return Success; } Connection::~Connection () { for (set<MysqlChild*>::iterator i = children.begin(); i != children.end(); i++) { (*i)->parent_leaving(); } mysql_close(&mysql); // others.remove(&mysql,this); } bool Connection::select_db (const char *db) { bool suc = !(mysql_select_db(&mysql, db)); if (throw_exceptions && !suc) throw MysqlBadQuery(error()); else return suc; } bool Connection::reload() { bool suc = !mysql_reload(&mysql); if (throw_exceptions && !suc) throw MysqlBadQuery(error()); else return suc; } bool Connection::shutdown () { bool suc = !(mysql_shutdown(&mysql)); if (throw_exceptions && !suc) throw MysqlBadQuery(error()); else return suc; } bool Connection::connect (cchar *db, cchar *host, cchar *user, cchar *passwd) { locked = true; if (mysql_connect(&mysql, host, user, passwd)) { locked = false; Success = is_connected = true; } else { locked = false; if (throw_exceptions) throw BadQuery(error()); Success = is_connected = false; } if (!Success) return Success; if (db[0]) // if db is not empty Success = select_db(db); return Success; } string Connection::info () { char *i = mysql_info(&mysql); if (!i) return string(); else return string(i); } ResNSel Connection::execute(const string &str, bool throw_excptns) { Success = false; if (lock()) if (throw_excptns) throw BadQuery(error()); else return ResNSel(); Success = !mysql_query(&mysql, str.c_str()); unlock(); if (!Success) if (throw_excptns) throw BadQuery(error()); else return ResNSel(); return ResNSel(this); } Result Connection::store(const string &str, bool throw_excptns) { Success = false; if (lock()) if (throw_excptns) throw BadQuery(error()); else return Result(); Success = !mysql_query(&mysql, str.c_str()); unlock(); if (!Success) if (throw_excptns) throw BadQuery(error()); else return Result(); return Result(mysql_store_result(&mysql)); } ResUse Connection::use(const string &str, bool throw_excptns) { Success = false; if (lock()) if (throw_excptns) throw BadQuery(error()); else return ResUse(); Success = !mysql_query(&mysql, str.c_str()); if (!Success) if (throw_excptns) throw BadQuery(error()); else return ResUse(); return ResUse(mysql_use_result(&mysql), this); } void Connection::storein(MutableRes& con, const string &s) { con = use(s); } |
Added sqlplusint/connection0.hh.
> > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 | #ifndef __connection0_hh__ #define __connection0_hh__ class MysqlChild { public: virtual void parent_leaving() = 0; virtual ~MysqlChild() {} }; #endif |
Added sqlplusint/connection1.hh.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | #ifndef __connection1_hh__ #define __connection1_hh__ #ifdef __WIN32__ #include <Windows32/Base.h> #include <Windows32/Defines.h> #include <Windows32/Structures.h> #include <winsock.h> #define errno WSAGetLastError() #endif #include <mysql.h> #include <vector.h> #include <deque.h> #include <list.h> #include <slist.h> #include <set.h> #include <map.h> #include <multiset.h> #include "define_short" #include "query1.hh" #include "result1.hh" #include "connection0.hh" #include "tracker.h" //: Exception thrown when a BadQuery is encountered struct BadQuery { BadQuery(string er) : error(er) {} string error; //: The error message }; class MutableRes; //: The main database handle class Connection { friend ResNSel; friend ResUse; friend Query; private: set<MysqlChild*> children; // static pointer_tracker<MYSQL, Connection> others; bool throw_exceptions; MYSQL mysql; bool is_connected; bool locked; bool Success; int affected_rows() {return mysql_affected_rows((MYSQL*) &mysql);} int insert_id () {return mysql_insert_id(&mysql);} public: Connection () : throw_exceptions(false), locked(false) //: {/* others.insert(&mysql,this);*/ mysql_init(&mysql);} Connection (bool te) : throw_exceptions(te), is_connected(false), locked(false), Success(false) //: {/*others.insert(&mysql,this);*/ mysql_init(&mysql);} Connection (const char *db, const char *host = "", const char *user = "", const char *passwd = "", bool te = false); Connection (const char *db, const char *host, const char *user, const char *passwd = "", uint port = 3306, my_bool compress = 1, unsigned int connect_timeout = 5, bool te = false, cchar *socket_name = ""); bool real_connect (cchar *db = "", cchar *host = "", cchar *user = "", cchar *passwd = "", uint port = 0, my_bool compress = 0, unsigned int connect_timeout = 60, cchar *socket_name= ""); ~Connection (); //: void close() {mysql_close(&mysql);} string info (); bool connected() const {return is_connected;} //: returns true if a successful connection was made bool success() {return Success;} //: returns true of the last query was successful bool connect (cchar *db = "", cchar *host = "", cchar *user = "", cchar *passwd = ""); //: bool lock() {if (locked) return true; locked = true; return false;} void unlock() {locked = false;} void purge (MYSQL *m) {mysql_close(&mysql); } //: void add_child(MysqlChild *child) {children.insert(child);} //: void remove_child(MysqlChild *child) {children.erase(child); } //: inline Query query(); //: operator bool () {return success();} //: returns success() string error () {return string(mysql_error(&mysql));} //: last error message() int errnum () {return mysql_errno(&mysql);} int refresh (unsigned int refresh_options){ return mysql_refresh (&mysql,refresh_options); } int ping (void) { return mysql_ping(&mysql);} int kill (unsigned long pid) { return mysql_kill (&mysql,pid);} string clinet_info () {return string(mysql_get_client_info());} //: string host_info () {return string(mysql_get_host_info(&mysql));} //: int proto_info () {return mysql_get_proto_info(&mysql);} //: string server_info () {return string(mysql_get_server_info(&mysql));} //: string stat() {return string(mysql_stat(&mysql));} //: Result store(const string &str) {return store(str, throw_exceptions);} //: ResUse use(const string &str) {return use(str, throw_exceptions);} //: ResNSel execute(const string &str) {return execute(str, throw_exceptions);} //: Result store(const string &str, bool te); //: ResUse use(const string &str, bool te); //: ResNSel execute(const string &str, bool te); //: bool create_db (string db) {return !(execute( "CREATE DATABASE " + db ));} //: bool drop_db (string db) {return !(execute( "DROP DATABASE " + db ));} //: bool select_db (string db) {return select_db(db.c_str());} //: bool select_db (const char *db); //: bool reload(); //: bool shutdown (); //: string infoo (void) {return info ();} st_mysql_options get_options (void) const {return mysql.options;} int read_options(enum mysql_option option,const char *arg) {return mysql_options(&mysql, option,arg);} template <class Sequence> void storein_sequence(Sequence &, const string &); //: template <class Set> void storein_set(Set &, const string &); //: //!dummy: void storein(TYPE &con, const string &s); //: Stores the results in TYPE. // Stores the result in TYPE. TYPE must be some sort of STL container. void storein(MutableRes &con, const string &s); template <class T> void storein(vector<T> &con, const string &s) {storein_sequence(con,s);} template <class T> void storein(deque<T> &con, const string &s) {storein_sequence(con,s);} template <class T> void storein(list<T> &con, const string &s) {storein_sequence(con,s);} template <class T> void storein(slist<T> &con, const string &s) {storein_sequence(con,s);} template <class T> void storein(set<T> &con, const string &s) {storein_set(con,s);} template <class T> void storein(multiset<T> &con, const string &s) {storein_set(con,s);} }; //! with_class = Connection //: For backwards companablity, don't use typedef Connection Mysql; #endif |
Added sqlplusint/connection2.hh.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | #ifndef __connection2_hh__ #define __connection2_hh__ #include "connection1.hh" #include "query2.hh" inline Query Connection::query() {return Query(this, throw_exceptions);} template <class Sequence> void Connection::storein_sequence (Sequence &seq, const string &str) { ResUse result = use(str); while (1) { MYSQL_ROW d = mysql_fetch_row(result.mysql_res); if (!d) break; Row row(d,&result,true); if (!row) break; seq.push_back(typename Sequence::value_type(row)); } } template <class Set> void Connection::storein_set (Set &sett, const string &str) { ResUse result = use(str); while (1) { MYSQL_ROW d = mysql_fetch_row(result.mysql_res); if (!d) return; Row row(d,&result,true); if (!row) break; sett.insert(typename Set::value_type(row)); } } #endif |
Added sqlplusint/connection3.hh.
> > | 1 2 | #include "connection2.hh" |
Added sqlplusint/const_string1.hh.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | #ifndef __const_string1_hh__ #define __const_string1_hh__ #include <stdexcept> #include <string> #include <iostream> //: A special string that is created from a existing const char * // It contains a small subset of the standard string class. When an // object is created only a link to the const char * is created. The // data is NOT copied. thus the const char * needs to stick around // for the life of the class. class const_string { private: const char *str_data; public: typedef const char value_type; //: typedef unsigned int size_type; //: typedef int difference_type; //: typedef const char& const_reference; //: typedef const_reference reference; //: typedef const char* const_pointer; //: typedef const_pointer pointer; //: typedef const char* const_iterator; //: typedef const_iterator iterator; //: The same as const_iterator because the data can not be changed. const_string() : str_data("") {} //: const_string(const char *str) : str_data(str) {} //: const_string& operator = (const char *str) //: {str_data = str; return *this;} size_type size() const //: { register int i = 0; while (str_data[i]) i++; return i; } const_iterator begin() const {return str_data;} //: const_iterator end() const {return str_data + size();} //: size_type length() const {return size();} //: size_type max_size() const {return size();} //: const_reference operator[](size_type pos) const {return str_data[pos];} //: const_reference at(size_type pos) const //: { if (pos >= size()) throw out_of_range(""); else return str_data[pos]; } const char* c_str() const {return str_data;} //: const char* data() const {return str_data;} //: int compare(const const_string& str) const //: { const char* str1 = str_data; const char* str2 = str.str_data; while (*str1 == *str2 && (*str1 || *str2)) {str1++; str2++;} return *str1-*str2; } }; //! with_class = const_string //: inline ostream& operator << (ostream &o, const const_string &str) { return o << str.c_str(); } //: inline int compare (const const_string &lhs, const const_string &rhs) { return lhs.compare(rhs); } //: inline bool operator == (const_string &lhs, const_string &rhs) { return compare(lhs,rhs) == 0; } //: inline bool operator != (const_string &lhs, const_string &rhs) { return compare(lhs,rhs) != 0; } //: inline bool operator < (const_string &lhs, const_string &rhs) { return compare(lhs,rhs) < 0; } //: inline bool operator <= (const_string &lhs, const_string &rhs) { return compare(lhs,rhs) <= 0; } //: inline bool operator > (const_string &lhs, const_string &rhs) { return compare(lhs,rhs) > 0; } //: inline bool operator >= (const_string &lhs, const_string &rhs) { return compare(lhs,rhs) >= 0; } #endif |
Added sqlplusint/const_string2.hh.
> > | 1 2 | #include "const_string1.hh" |
Added sqlplusint/const_string3.hh.
> > | 1 2 | #include "const_string2.hh" |
Added sqlplusint/convert1.hh.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | #ifndef __convert1_hh__ #define __convert1_hh__ #include <stdlib.h> template <class Type> class mysql_convert; #define mysql__convert(TYPE, FUNC) \ template <> \ class mysql_convert<TYPE> {\ private:\ TYPE num;\ public:\ mysql_convert(const char* str, const char *& end) { \ num = FUNC(str, const_cast<char **>(&end));}\ operator TYPE () {return num;}\ };\ mysql__convert(float, strtod) mysql__convert(double, strtod) #undef mysql__convert #define mysql__convert(TYPE, FUNC) \ template <> \ class mysql_convert<TYPE> {\ private:\ TYPE num;\ public:\ mysql_convert(const char* str, const char *& end) { \ num = FUNC(str, const_cast<char **>(&end),10);}\ operator TYPE () {return num;}\ };\ mysql__convert(char, strtol) mysql__convert(signed char, strtol) mysql__convert(int, strtol) mysql__convert(short int, strtol) mysql__convert(long int, strtol) mysql__convert(unsigned char, strtoul) mysql__convert(unsigned int, strtoul) mysql__convert(unsigned short int, strtoul) mysql__convert(unsigned long int, strtoul) #ifndef NO_LONG_LONGS mysql__convert(long long int, strtoll) mysql__convert(unsigned long long int, strtoull) #endif #endif |
Added sqlplusint/convert2.hh.
> > | 1 2 | #include "convert1.hh" |
Added sqlplusint/convert3.hh.
> > | 1 2 | #include "convert2.hh" |
Added sqlplusint/custom.pl.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 | open (OUT0, ">custom.hh"); open (OUT, ">custom-macros.hh"); print OUT0 << "---"; // This file is generated from the perl script custom.pl, please do // not modify this file directly. #ifndef __sql_custom_h__ #define __sql_custom_h__ enum sql_dummy_type {sql_dummy}; enum sql_cmp_type {sql_use_compare}; inline int sql_cmp(const string &a, const string &b) { return a.compare(b); } --- @types = ("char", "unsigned char", "tiny_int", "int", "unsigned int", "short int", "unsigned short int"); foreach $type (@types) { print OUT0 << "---"; inline int sql_cmp($type a,$type b) { return a-b; } --- } @types = ("double", "float"); foreach $type (@types) { print OUT0 << "---"; inline int sql_cmp($type a,$type b) { if (a == b) return 0; if (a < b) return -1; return 1; } --- } print OUT0 << "---"; #ifndef NO_LONG_LONGS --- @types = ("long long", "unsigned long long"); foreach $type (@types) { print OUT0 << "---"; inline int sql_cmp($type a,$type b) { if (a == b) return 0; if (a < b) return -1; return 1; } --- } print OUT0 << "---"; #endif // NO_LONG_LONGS #include "custom-macros.hh" #endif --- print OUT << "---"; // This file is generated from the perl script custom.pl, please do // not modify this file directly unless you wish to cut out unnessary // macros. // --------------------------------------------------- // Begin Mandatory Compare // --------------------------------------------------- #define sql_compare_define(NAME) \\ bool operator == (const NAME &other) const \\ {return sql_compare_##NAME##<sql_dummy>(*this,other) == 0;} \\ bool operator != (const NAME &other) const \\ {return sql_compare_##NAME##<sql_dummy>(*this,other) != 0;} \\ bool operator > (const NAME &other) const \\ {return sql_compare_##NAME##<sql_dummy>(*this,other) > 0;} \\ bool operator < (const NAME &other) const \\ {return sql_compare_##NAME##<sql_dummy>(*this,other) < 0;} \\ bool operator >= (const NAME &other) const \\ {return sql_compare_##NAME##<sql_dummy>(*this,other) >= 0;} \\ bool operator <= (const NAME &other) const \\ {return sql_compare_##NAME##<sql_dummy>(*this,other) <= 0;} \\ int cmp (const NAME &other) const \\ {return sql_compare_##NAME##<sql_dummy>(*this,other);} \\ int compare (const NAME &other) const \\ {return sql_compare_##NAME##<sql_dummy>(*this,other);} --- foreach $j (1..26) { $parm0 .= "T$j, C$j"; $parm0 .= ", " unless $j == 26; $parm1 .= "C$j"; $parm1 .= ", " unless $j == 26; } print OUT << "---"; #define sql_compare_define_0(NAME, $parm0) #define sql_construct_define_0(NAME, $parm0) #define sql_COMPARE__0(NAME, $parm1) #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 // --------------------------------------------------- --- foreach $i (1..26) { $compr = ""; $parm2 = ""; $define = ""; $compr = " int cmp; \\\n" unless $i == 1; $compp = ""; foreach $j (1..$i) { $compr .= " if (cmp = sql_cmp(x.##C$j , y.##C$j )) return cmp; \\\n" unless $j == $i; $compr .= " return sql_cmp(x.##C$j , y.##C$j );" if $j == $i; $parm2 .= "const T$j &p$j"; $parm2 .= ", " unless $j == $i; $define.= "C$j (p$j)"; $define.= ", " unless $j == $i; $set .= " C$j = p$j;\\\n"; $compp .= "true"; $compp .= ", " unless $j == $i; } print OUT << "---"; // --------------------------------------------------- // Begin Compare $i // --------------------------------------------------- #define sql_compare_define_$i(NAME, $parm0) \\ NAME ($parm2) : $define {} \\ void set ($parm2) { \\ $set \\ } \\ sql_compare_define(NAME) #define sql_construct_define_$i(NAME, $parm0) \\ void set ($parm2) { \\ $set \\ } \\ NAME ($parm2) : $define {} #define sql_compare_type_def_$i(NAME, WHAT, NUM) \\ return WHAT##_list(d, m, $compp) #define sql_compare_type_defe_$i(NAME, WHAT, NUM) \\ return WHAT##_list(d, c, m, $compp) #define sql_COMPARE__$i(NAME, $parm1) \\ template <sql_dummy_type dummy> \\ int sql_compare_##NAME (const NAME &x, const NAME &y) { \\ $compr \\ } \\ template <sql_dummy_type dummy> \\ int compare (const NAME &x, const NAME &y) { \\ $compr \\ } // --------------------------------------------------- // End Compare $i // --------------------------------------------------- --- } print OUT << "---"; --- foreach $i (1..26) { $parm_complete = ""; $parm_order = ""; $parm_order2c = ""; $parm_simple = ""; $parm_simple2c = ""; $parm_simple_b = ""; $parm_simple2c_b = ""; $parm_names = ""; $parm_names2c = ""; $defs = ""; $popul = ""; $parmc = ""; $parmC = ""; $value_list = ""; $field_list = ""; $equal_list = ""; $value_list_cus = ""; $cus_field_list = ""; $cus_equal_list = ""; $create_bool = ""; $create_list = ""; $cusparms1 = ""; $cusparms2 = ""; $cusparmsv = ""; $cusparms11 = ""; $cusparms22 = ""; $names = "";$enums = ""; foreach $j (1 .. $i) { $parm_complete .= "T$j, I$j, N$j, O$j"; $parm_complete .= ", " unless $j == $i; $parm_order .= "T$j, I$j, O$j"; $parm_order .= ", " unless $j == $i; $parm_order2c .= "T$j, I$j, #I$j, O$j"; $parm_order2c .= ", " unless $j == $i; $parm_names .= "T$j, I$j, N$j"; $parm_names .= ", " unless $j == $i; $parm_names2c .= "T$j, I$j, N$j, ". ($j-1); $parm_names2c .= ", " unless $j == $i; $parm_simple .= "T$j, I$j"; $parm_simple .= ", " unless $j == $i; $parm_simple2c .= "T$j, I$j, #I$j, ". ($j-1); $parm_simple2c .= ", " unless $j == $i; $parm_simple_b .= "T$j, I$j"; $parm_simple_b .= ", " unless $j == $i; $parm_simple2c_b .= "T$j, I$j, ". ($j-1); $parm_simple2c_b .= ", " unless $j == $i; $defs .= " T$j I$j;"; $defs .= "\n" unless $j == $i; $popul .= " s->##I$j = row[ O$j ];"; $popul .= "\n" unless $j == $i; $names .= " N$j "; $names .= ",\n" unless $j == $i; $enums .= " NAME##_##I$j"; $enums .= ",\n" unless $j == $i; $field_list .= " s << obj.manip << obj.obj->names[".($j-1)."]"; $field_list .= " << obj.delem;\n" unless $j == $i; $value_list .= " s << obj.manip << obj.obj->##I$j"; $value_list .= " << obj.delem;\n" unless $j == $i; $create_bool .= " if (i$j) (*include)[".($j-1)."]=true;\n"; $create_list .= " if (i$j == NAME##_NULL) return;\n" unless $i == 1; $create_list .= " (*include)[i$j]=true;\n"; $value_list_cus .= " if ((*obj.include)[".($j-1)."]) { \n"; $value_list_cus .= " if (before) s << obj.delem;\n" unless $j == 1; $value_list_cus .= " s << obj.manip << obj.obj->##I$j;\n"; $value_list_cus .= " before = true; \n" unless $j == $i; $value_list_cus .= " } \n"; $cus_field_list .= " if ((*obj.include)[".($j-1)."]) { \n"; $cus_field_list .= " if (before) s << obj.delem;\n" unless $j == 1; $cus_field_list .= " s << obj.manip << obj.obj->names[".($j-1)."];\n"; $cus_field_list .= " before = true; \n" unless $j == $i; $cus_field_list .= " } \n"; $cus_equal_list .= " if ((*obj.include)[".($j-1)."]) { \n"; $cus_equal_list .= " if (before) s << obj.delem;\n" unless $j == 1; $cus_equal_list .= " s << obj.obj->names[".($j-1)."] << obj.comp"; $cus_equal_list .= " << obj.manip << obj.obj->##I$j;\n"; $cus_equal_list .= " before = true; \n" unless $j == $i; $cus_equal_list .= " } \n"; $equal_list .= " s << obj.obj->names[".($j-1)."] << obj.comp"; $equal_list .= " << obj.manip << obj.obj->##I$j"; $equal_list .= " << obj.delem;\n" unless $j == $i; $cusparms1 .= "bool i$j" if $j == 1; $cusparms1 .= "bool i$j = false" unless $j == 1; $cusparms1 .= ", " unless $j == $i; $cusparms11 .= "bool i$j" ; $cusparms11 .= ", " unless $j == $i; $cusparms2 .= "##NAME##_enum i$j" if $j == 1; $cusparms2 .= "##NAME##_enum i$j = ##NAME##_NULL" unless $j == 1; $cusparms2 .= ", " unless $j == $i; $cusparms22 .= "##NAME##_enum i$j"; $cusparms22 .= ", " unless $j == $i; $cusparmsv .= "i$j"; $cusparmsv .= ", " unless $j == $i; $parmC .= "T$j, I$j"; $parmC .= ", " unless $j == 26; $parmc .= "I$j"; $parmc .= ", " unless $j == 26; } foreach $j ($i+1 .. 26) { $parmC .= "0, 0"; $parmC .= ", " unless $j == 26; $parmc .= "0"; $parmc .= ", " unless $j == 26; } print OUT << "---"; // --------------------------------------------------- // Begin Create $i // --------------------------------------------------- --- $out = <<"---"; #define sql_create_basic_c_order_$i(NAME, CMP, CONTR, $parm_order) struct NAME; template <sql_dummy_type dummy> int sql_compare_##NAME (const NAME &, const NAME &); struct NAME { $defs NAME () {} NAME (const MysqlRow &row); sql_compare_define_##CMP(NAME, $parmC) }; template <sql_dummy_type dummy> void populate_##NAME (NAME *s, const MysqlRow &row) { $popul } inline NAME##::##NAME (const MysqlRow &row) {populate_##NAME##<sql_dummy>(this, row);} sql_COMPARE__##CMP##(NAME, $parmc ) --- print OUT &prepare($out); $out = <<"---"; #define sql_create_complete_$i(NAME, CMP, CONTR, $parm_complete) struct NAME; enum NAME##_enum { $enums ,NAME##_NULL }; template <class Manip> class NAME##_value_list { /*friend ostream& operator << <> (ostream&, const NAME##_value_list&); */ public: const NAME *obj; cchar *delem; Manip manip; public: NAME##_value_list (const NAME *o, cchar *d, Manip m) : obj(o), delem(d), manip(m) {} }; template <class Manip> class NAME##_##field_list { /* friend ostream& operator << <> (ostream&, const NAME##_field_list&); */ public: const NAME *obj; cchar *delem; Manip manip; public: NAME##_field_list (const NAME *o, cchar *d, Manip m) : obj(o), delem(d), manip(m) {} }; template <class Manip> class NAME##_equal_list { /* friend ostream& operator << <> (ostream&, const NAME##_equal_list&); */ public: const NAME *obj; cchar *delem; cchar *comp; Manip manip; public: NAME##_equal_list (const NAME *o, cchar *d, cchar *c, Manip m) : obj(o), delem(d), comp(c), manip(m) {} }; template <class Manip> class NAME##_cus_value_list { /* friend ostream& operator << <> (ostream&, const NAME##_cus_value_list<Manip>&); */ public: const NAME *obj; cchar *delem; Manip manip; vector<bool> *include; bool del_vector; public: ~##NAME##_cus_value_list () {if (del_vector) delete include;} NAME##_cus_value_list (const NAME *o, cchar *d, Manip m, $cusparms11); NAME##_cus_value_list (const NAME *o, cchar *d, Manip m, $cusparms22); NAME##_cus_value_list (const NAME *o, cchar *d, Manip m ,vector<bool>) : obj(o), include(i), del_vector(false), delem(d), manip(m) {} }; template <class Manip> class NAME##_cus_field_list { /* friend ostream& operator << <> (ostream&, const NAME##_cus_field_list<Manip>&); */ public: const NAME *obj; cchar *delem; Manip manip; vector<bool> *include; bool del_vector; public: ~##NAME##_cus_field_list () {if (del_vector) delete include;} NAME##_cus_field_list (const NAME *o, cchar *d, Manip m, $cusparms11); NAME##_cus_field_list (const NAME *o, cchar *d, Manip m, $cusparms22); NAME##_cus_field_list (const NAME *o, cchar *d, Manip m, vector<bool> *i) : obj(o), include(i), del_vector(false), delem(d), manip(m) {} }; template <class Manip> class NAME##_cus_equal_list { /* friend ostream& operator << <> (ostream&, const NAME##_cus_equal_list<Manip>&); */ public: const NAME *obj; vector<bool> *include; bool del_vector; cchar *delem; cchar *comp; Manip manip; public: ~##NAME##_##cus_equal_list () {if (del_vector) delete include;} NAME##_##cus_equal_list (const NAME *o, cchar *d, cchar *c, Manip m, $cusparms11); NAME##_##cus_equal_list (const NAME *o, cchar *d, cchar *c, Manip m, $cusparms22); NAME##_##cus_equal_list (const NAME *o, cchar *d, cchar *c, Manip m, vector<bool> *i) : obj(o), include(i), del_vector(false), delem(d), comp(c), manip(m) {} }; template <sql_dummy_type dummy> int sql_compare_##NAME (const NAME &, const NAME &); struct NAME { $defs NAME () {} NAME (const MysqlRow &row); void set (const MysqlRow &row); sql_compare_define_##CMP(NAME, $parmC) sql_construct_define_##CONTR(NAME, $parmC) static char *names[]; static char *_table; static char *& table() {return _table;} NAME##_value_list<quote_type0> value_list() const { return value_list(",", mysql_quote);} NAME##_value_list<quote_type0> value_list(cchar *d) const { return value_list(d, mysql_quote);} template <class Manip> NAME##_value_list<Manip> value_list(cchar *d, Manip m) const; NAME##_field_list<do_nothing_type0> field_list() const { return field_list(",", mysql_do_nothing);} NAME##_field_list<do_nothing_type0> field_list(cchar *d) const { return field_list(d, mysql_do_nothing);} template <class Manip> NAME##_field_list<Manip> field_list(cchar *d, Manip m) const; NAME##_equal_list<quote_type0> equal_list(cchar *d = ",", cchar *c = " = ") const{ return equal_list(d, c, mysql_quote);} template <class Manip> NAME##_equal_list<Manip> equal_list(cchar *d, cchar *c, Manip m) const; /* cus_data */ NAME##_cus_value_list<quote_type0> value_list($cusparms1) const { return value_list(",", mysql_quote, $cusparmsv); } NAME##_cus_value_list<quote_type0> value_list($cusparms2) const { return value_list(",", mysql_quote, $cusparmsv); } NAME##_cus_value_list<quote_type0> value_list(vector<bool> *i) const { return value_list(",", mysql_quote, i); } NAME##_cus_value_list<quote_type0> value_list(sql_cmp_type sc) const { return value_list(",", mysql_quote, sc); } NAME##_cus_value_list<quote_type0> value_list(cchar *d, $cusparms1) const { return value_list(d, mysql_quote, $cusparmsv); } NAME##_cus_value_list<quote_type0> value_list(cchar *d, $cusparms2) const { return value_list(d, mysql_quote, $cusparmsv); } NAME##_cus_value_list<quote_type0> value_list(cchar *d, vector<bool> *i) const { return value_list(d, mysql_quote, i); } NAME##_cus_value_list<quote_type0> value_list(cchar *d, sql_cmp_type sc) const { return value_list(d, mysql_quote, sc); } template <class Manip> NAME##_cus_value_list<Manip> value_list(cchar *d, Manip m, $cusparms1) const; template <class Manip> NAME##_cus_value_list<Manip> value_list(cchar *d, Manip m, $cusparms2) const; template <class Manip> NAME##_cus_value_list<Manip> value_list(cchar *d, Manip m, vector<bool> *i) const; template <class Manip> NAME##_cus_value_list<Manip> value_list(cchar *d, Manip m, sql_cmp_type sc) const; /* cus field */ NAME##_cus_field_list<do_nothing_type0> field_list($cusparms1) const { return field_list(",", mysql_do_nothing, $cusparmsv); } NAME##_cus_field_list<do_nothing_type0> field_list($cusparms2) const { return field_list(",", mysql_do_nothing, $cusparmsv); } NAME##_cus_field_list<do_nothing_type0> field_list(vector<bool> *i) const { return field_list(",", mysql_do_nothing, i); } NAME##_cus_field_list<do_nothing_type0> field_list(sql_cmp_type sc) const { return field_list(",", mysql_do_nothing, sc); } NAME##_cus_field_list<do_nothing_type0> field_list(cchar *d, $cusparms1) const { return field_list(d, mysql_do_nothing, $cusparmsv); } NAME##_cus_field_list<do_nothing_type0> field_list(cchar *d, $cusparms2) const { return field_list(d, mysql_do_nothing, $cusparmsv); } NAME##_cus_field_list<do_nothing_type0> field_list(cchar *d, vector<bool> *i) const { return field_list(d, mysql_do_nothing, i); } NAME##_cus_field_list<do_nothing_type0> field_list(cchar *d, sql_cmp_type sc) const { return field_list(d, mysql_do_nothing, sc); } template <class Manip> NAME##_cus_field_list<Manip> field_list(cchar *d, Manip m, $cusparms1) const; template <class Manip> NAME##_cus_field_list<Manip> field_list(cchar *d, Manip m, $cusparms2) const; template <class Manip> NAME##_cus_field_list<Manip> field_list(cchar *d, Manip m, vector<bool> *i) const; template <class Manip> NAME##_cus_field_list<Manip> field_list(cchar *d, Manip m, sql_cmp_type sc) const; /* cus equal */ NAME##_cus_equal_list<quote_type0> equal_list($cusparms1) const { return equal_list(",", " = ", mysql_quote, $cusparmsv); } NAME##_cus_equal_list<quote_type0> equal_list($cusparms2) const { return equal_list(",", " = ", mysql_quote, $cusparmsv); } NAME##_cus_equal_list<quote_type0> equal_list(vector<bool> *i) const { return equal_list(",", " = ", mysql_quote, i); } NAME##_cus_equal_list<quote_type0> equal_list(sql_cmp_type sc) const { return equal_list(",", " = ", mysql_quote, sc); } NAME##_cus_equal_list<quote_type0> equal_list(cchar *d, $cusparms1) const { return equal_list(d, " = ", mysql_quote, $cusparmsv); } NAME##_cus_equal_list<quote_type0> equal_list(cchar *d, $cusparms2) const { return equal_list(d, " = ", mysql_quote, $cusparmsv); } NAME##_cus_equal_list<quote_type0> equal_list(cchar *d, vector<bool> *i) const { return equal_list(d, " = ", mysql_quote, i); } NAME##_cus_equal_list<quote_type0> equal_list(cchar *d, sql_cmp_type sc) const { return equal_list(d, " = ", mysql_quote, sc); } NAME##_cus_equal_list<quote_type0> equal_list(cchar *d, cchar *c, $cusparms1) const { return equal_list(d, c, mysql_quote, $cusparmsv); } NAME##_cus_equal_list<quote_type0> equal_list(cchar *d, cchar *c, $cusparms2) const { return equal_list(d, c, mysql_quote, $cusparmsv); } NAME##_cus_equal_list<quote_type0> equal_list(cchar *d, cchar *c, vector<bool> *i) const { return equal_list(d, c, mysql_quote, i); } NAME##_cus_equal_list<quote_type0> equal_list(cchar *d, cchar *c, sql_cmp_type sc) const { return equal_list(d, c, mysql_quote, sc); } template <class Manip> NAME##_cus_equal_list<Manip> equal_list(cchar *d, cchar *c, Manip m, $cusparms1) const; template <class Manip> NAME##_cus_equal_list<Manip> equal_list(cchar *d, cchar *c, Manip m, $cusparms2) const; template <class Manip> NAME##_cus_equal_list<Manip> equal_list(cchar *d, cchar *c, Manip m, vector<bool> *i) const; template <class Manip> NAME##_cus_equal_list<Manip> equal_list(cchar *d, cchar *c, Manip m, sql_cmp_type sc) const; }; char *##NAME##::names[] = { $names }; char *##NAME##::_table = #NAME ; template <class Manip> NAME##_cus_value_list<Manip>::NAME##_cus_value_list (const NAME *o, cchar *d, Manip m, $cusparms11) { delem = d; manip = m; del_vector = true; obj = o; include = new vector<bool>($i, false); $create_bool } template <class Manip> NAME##_cus_value_list<Manip>::NAME##_cus_value_list (const NAME *o, cchar *d, Manip m, $cusparms22) { delem = d; manip = m; del_vector = true; obj = o; include = new vector<bool>($i, false); $create_list } template <class Manip> NAME##_cus_field_list<Manip>::NAME##_cus_field_list (const NAME *o, cchar *d, Manip m, $cusparms11) { delem = d; manip = m; del_vector = true; obj = o; include = new vector<bool>($i, false); $create_bool } template <class Manip> NAME##_cus_field_list<Manip>::NAME##_cus_field_list (const NAME *o, cchar *d, Manip m, $cusparms22) { delem = d; manip = m; del_vector = true; obj = o; include = new vector<bool>($i, false); $create_list } template <class Manip> NAME##_cus_equal_list<Manip>::NAME##_cus_equal_list (const NAME *o, cchar *d, cchar *c, Manip m, $cusparms11) { delem = d; comp = c; manip = m; del_vector = true; obj = o; include = new vector<bool>($i, false); $create_bool } template <class Manip> NAME##_cus_equal_list<Manip>::NAME##_cus_equal_list (const NAME *o, cchar *d, cchar *c, Manip m, $cusparms22) { delem = d; comp = c; manip = m; del_vector = true; obj = o; include = new vector<bool>($i, false); $create_list } template <class Manip> ostream& operator << (ostream& s, const NAME##_value_list<Manip>& obj) { $value_list; return s; } template <class Manip> ostream& operator << (ostream& s, const NAME##_field_list<Manip>& obj) { $field_list; return s; } template <class Manip> ostream& operator << (ostream& s, const NAME##_equal_list<Manip>& obj) { $equal_list; return s; } template <class Manip> ostream& operator << (ostream& s, const NAME##_cus_value_list<Manip>& obj) { bool before = false; $value_list_cus return s; } template <class Manip> ostream& operator << (ostream& s, const NAME##_cus_field_list<Manip>& obj) { bool before = false; $cus_field_list return s; } template <class Manip> ostream& operator << (ostream& s, const NAME##_cus_equal_list<Manip>& obj) { bool before = false; $cus_equal_list return s; } template <class Manip> inline NAME##_value_list<Manip> NAME##::value_list(cchar *d, Manip m) const { return NAME##_value_list<Manip> (this, d, m); } template <class Manip> inline NAME##_field_list<Manip> NAME##::field_list(cchar *d, Manip m) const { return NAME##_field_list<Manip> (this, d, m); } template <class Manip> inline NAME##_equal_list<Manip> NAME##::equal_list(cchar *d, cchar *c, Manip m) const { return NAME##_equal_list<Manip> (this, d, c, m); } template <class Manip> inline NAME##_cus_value_list<Manip> NAME##::value_list(cchar *d, Manip m, $cusparms11) const { return NAME##_cus_value_list<Manip> (this, d, m, $cusparmsv); } template <class Manip> inline NAME##_cus_field_list<Manip> NAME##::field_list(cchar *d, Manip m, $cusparms11) const { return NAME##_cus_field_list<Manip> (this, d, m, $cusparmsv); } template <class Manip> inline NAME##_cus_equal_list<Manip> NAME##::equal_list(cchar *d, cchar *c, Manip m, $cusparms11) const { return NAME##_cus_equal_list<Manip> (this, d, c, m, $cusparmsv); } template <class Manip> inline NAME##_cus_value_list<Manip> NAME##::value_list(cchar *d, Manip m, $cusparms22) const { return NAME##_cus_value_list<Manip> (this, d, m, $cusparmsv); } template <class Manip> inline NAME##_cus_field_list<Manip> NAME##::field_list(cchar *d, Manip m, $cusparms22) const { return NAME##_cus_field_list<Manip> (this, d, m, $cusparmsv); } template <class Manip> inline NAME##_cus_equal_list<Manip> NAME##::equal_list(cchar *d, cchar *c, Manip m, $cusparms22) const { return NAME##_cus_equal_list<Manip> (this, d, c, m, $cusparmsv); } template <class Manip> inline NAME##_cus_value_list<Manip> NAME##::value_list(cchar *d, Manip m, sql_cmp_type sc) const { sql_compare_type_def_##CMP (NAME, value, NUM); } template <class Manip> inline NAME##_cus_field_list<Manip> NAME##::field_list(cchar *d, Manip m, sql_cmp_type sc) const { sql_compare_type_def_##CMP (NAME, field, NUM); } template <class Manip> inline NAME##_cus_equal_list<Manip> NAME##::equal_list(cchar *d, cchar *c, Manip m, sql_cmp_type sc) const { sql_compare_type_defe_##CMP (NAME, equal, NUM); } template <sql_dummy_type dummy> void populate_##NAME (NAME *s, const MysqlRow &row) { $popul } inline NAME##::##NAME (const MysqlRow &row) {populate_##NAME##<sql_dummy>(this, row);} inline void NAME##::set (const MysqlRow &row) {populate_##NAME##<sql_dummy>(this, row);} sql_COMPARE__##CMP##(NAME, $parmc ) --- print OUT &prepare($out); # # short cut defs # print OUT << "---"; #define sql_create_basic_$i(NAME, CMP, CONTR, $parm_simple_b) \\ sql_create_basic_c_order_$i(NAME, CMP, CONTR, $parm_simple2c_b) #define sql_create_$i(NAME, CMP, CONTR, $parm_simple) \\ sql_create_complete_$i(NAME, CMP, CONTR, $parm_simple2c) \\ #define sql_create_c_order_$i(NAME, CMP, CONTR, $parm_order) \\ sql_create_complete_$i(NAME, CMP, CONTR, $parm_order2c) #define sql_create_c_names_$i(NAME, CMP, CONTR, $parm_names) \\ sql_create_complete_$i(NAME, CMP, CONTR, $parm_names2c) // --------------------------------------------------- // End Create $i // --------------------------------------------------- --- } sub prepare { local $_ = @_[0]; s/\n+$//; s/\n[\n ]*\n/\n/g; s/\n+/\\\n/g; $_ .= "\n\n"; return $_; } |
Added sqlplusint/datetime.cc.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | #include "datetime3.hh" #include <iomanip.h> ostream& mysql_date::out_stream (ostream& s) const { char fill = s.fill('0'); #ifdef __USLC__ long flags = s.setf(ios::right); #else ios::fmtflags flags = s.setf(ios::right); #endif s << setw(4) << year << '-' << setw(2) << month << '-' << setw(2) << day; s.flags(flags); s.fill(fill); return s; } ostream& mysql_time::out_stream (ostream& s) const { char fill = s.fill('0'); #ifdef __USLC__ long flags = s.setf(ios::right); #else ios::fmtflags flags = s.setf(ios::right); #endif s << setw(2) << hour << ':' << setw(2) << minute << ':' << setw(2) << second; s.flags(flags); s.fill(fill); return s; } ostream& MysqlDateTime::out_stream (ostream& s) const { mysql_date::out_stream(s); s << " "; mysql_time::out_stream(s); return s; } cchar* mysql_date::convert (cchar* str) { char num[5]; num[0] =*str++; num[1] =*str++; num[2] =*str++; num[3] =*str++; num[4] = 0; year = strtol(num,0,10); if (*str == '-') str++; num[0] = *str++; num[1] = *str++; num[2] = 0; month = strtol(num,0,10); if (*str == '-') str++; num[0] = *str++; num[1] = *str++; num[2] = 0; day = strtol(num,0,10); return str; } cchar* mysql_time::convert (cchar* str) { char num[5]; num[0] = *str++; num[1] = *str++; num[2] = 0; hour = strtol(num,0,10); if (*str == ':') str++; num[0] = *str++; num[1] = *str++; num[2] = 0; minute = strtol(num,0,10); if (*str == ':') str++; num[0] = *str++; num[1] = *str++; num[2] = 0; second = strtol(num,0,10); return str; } cchar* MysqlDateTime::convert (cchar* str) { str = mysql_date::convert(str); if (*str == ' ') str++; str = mysql_time::convert(str); return str; } short int mysql_date::compare(const mysql_date* other) const { if (year != other->year) return year - other->year; if (month != other->month) return month - other->month; return day - other->day; } short int mysql_time::compare(const mysql_time* other) const { if (hour != other->hour) return hour - other->hour; if (minute != other->minute) return minute - other->minute; return minute - other->minute; } short int MysqlDateTime::compare(const MysqlDateTime &other) const { int x; x = mysql_date::compare(&other); if (x) return x; return mysql_time::compare(&other); } |
Added sqlplusint/datetime1.hh.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | #ifndef __datatime1_hh__ #ifndef __datetime1_hh__ // for some strange strange reason when I just use one #ifndef it // doesn't work. If anyone has any idea what is going on please let // me know #define __datetime1_hh__ #include <string> #include <strstream.h> #include <iostream.h> #include "defs" #include "define_short" #include "coldata1.hh" #include "stream2string1.hh" #include "tiny_int1.hh" struct mysql_dt_base { virtual ostream& out_stream(ostream&) const = 0; operator string (); }; template <class T> struct MysqlDTbase { virtual short int compare(const T &other) const = 0; bool operator == (const T &other) const {return !compare(other);} bool operator != (const T &other) const {return compare(other);} bool operator < (const T &other) const {return compare(other) < 0;} bool operator <= (const T &other) const {return compare(other) <= 0;} bool operator > (const T &other) const {return compare(other) > 0;} bool operator >= (const T &other) const {return compare(other) >= 0;} }; struct mysql_date : virtual public mysql_dt_base { short int year; tiny_int month; tiny_int day; ostream& out_stream(ostream&) const; cchar* convert (cchar*); protected: short int compare(const mysql_date *other) const; }; //: A special type for holding mysql Dates. // Date, a comparable data structures for holding mysql Dates. It also // responds to the stream extraction and insertion operator. /*!dummy: struct Date { short int year; //: The year in 4 digit form tiny_int month; //: The month number tiny_int day; //: The day of the month Date (); //: Date (cchar* str); //: Date (const ColData &str); //: Date (const string &str); //: short int compare(const Date& other) const; //: Compare two dates // Returns 0 if *this == other, <0 if *this < *other, >0 if *this > other }; */ struct Date : public mysql_date, public MysqlDTbase<Date> { Date () {}; Date (cchar* str) {convert(str);} Date (const ColData &str); Date (const string &str); short int compare(const Date& other) const {return mysql_date::compare(&other);} }; inline ostream& operator << (ostream& s, const Date& d) {return d.out_stream(s);} struct mysql_time : virtual public mysql_dt_base { tiny_int hour; tiny_int minute; tiny_int second; ostream& out_stream(ostream&) const; cchar* convert (cchar*); protected: short int compare(const mysql_time *other) const; }; //: A special type for holding mysql Dates. // Time, a comparable data structures for holding mysql Times. It also // responds to the stream extraction and insertion operator. /*!dummy: struct Time { tiny_int hour; //: Hour in military time tiny_int minute; //: tiny_int second; //: Time () {}; //: Time (cchar* str); //: Time (const ColData &str); //: Time (const string &str); //: short int compare(const Time& other) const; //: Compare two times // Returns 0 if *this == other, <0 if *this < *other, >0 if *this > other }; */ struct Time : public mysql_time, public MysqlDTbase<Time> { Time () {}; Time (cchar* str) {convert(str);} Time (const ColData &str); Time (const string &str); short int compare(const Time& other) const {return mysql_time::compare(&other);} }; inline ostream& operator << (ostream& s, const Time& d) {return d.out_stream(s);} //: A combinate of Date and Time for holding mysql DateTime's //!dummy: struct DateTime {}; struct DateTime : public mysql_date, public mysql_time, public MysqlDTbase<DateTime> { DateTime () {} DateTime (cchar* str) {convert(str);} DateTime (const ColData &str); DateTime (const string &str); short int compare(const DateTime& other) const; ostream& out_stream(ostream&) const; cchar* convert (cchar*); }; inline ostream& operator << (ostream& s, const DateTime& d) {return d.out_stream(s);} #endif #endif //__datetime1_hh__ |
Added sqlplusint/datetime2.hh.
> > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | #ifndef __datetime2_hh__ #define __datetime2_hh__ #include "datetime1.hh" #include "coldata2.hh" #include "stream2string2.hh" inline mysql_dt_base::operator string () { return stream2string<string>(*this); } inline Date::Date (const ColData &str) {convert(str.c_str());} inline Date::Date (const string &str) {convert(str.c_str());} inline Time::Time (const ColData &str) {convert(str.c_str());} inline Time::Time (const string &str) {convert(str.c_str());} inline DateTime::DateTime (const ColData &str) {convert(str.c_str());} inline DateTime::DateTime (const string &str) {convert(str.c_str());} #endif |
Added sqlplusint/datetime3.hh.
> > > | 1 2 3 | #include "datetime2.hh" |
Added sqlplusint/define_short.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | // defs.h #ifndef __define_short_h__ #define __define_short_h__ #define use_exceptions mysql_use_exceptions // base.h #define BadQuery MysqlBadQuery #define MysqlCon MysqlConnection #define Connection MysqlConnection // result.h #define ResNSel MysqlResNSel #define ResUse MysqlResUse #define Result MysqlRes #define Field MysqlField #define Fields MysqlFields // resiter.h #define ResIter MysqlResIter #define ResultIter MysqlResIter // row.h #define Row MysqlRow #define MutableRow MysqlMutableRow // field_names.h #define FieldNames MysqlFieldNames //query.h #define Query MysqlQuery //string.h #define BadConversion MysqlBadConversion #define ColData MysqlColData #define MutableColData MysqlMutableColData // manip.h #define quote mysql_quote #define quote_only mysql_quote_only #define quote_double_only mysql_quote_double_only #define escape mysql_escape #define do_nothing mysql_do_nothing #define ignore mysql_ignore // datetime.h #define Date MysqlDate #define Time MysqlTime #define DateTime MysqlDateTime // set.h #define Set MysqlSet // null.h #define Null MysqlNull #define null_type mysql_null_type #define null mysql_null #define NullisNull MysqlNullisNull #define NullisZero MysqlNullisZero #define NullisBlank MysqlNullisBlank #endif |
Added sqlplusint/defs.
> > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | #ifndef __mysql_defs_h_ #define __mysql_defs_h_ #include <mysql.h> #include "define_short" typedef MYSQL_FIELD MysqlField; typedef const char cchar; typedef long long int longgint; class Connection; class ResUse; class Result; class FieldNames; const bool use_exceptions = true; #endif |
Added sqlplusint/field_names.cc.
> > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 | #include "field_names3.hh" #include "result2.hh" void FieldNames::init(const ResUse *res) { int num = res->num_fields(); reserve(num); for (int i = 0; i < num; i++) { push_back(res->fields()[i].name); } } |
Added sqlplusint/field_names1.hh.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | #ifndef __field_names1_hh__ #define __field_names1_hh__ #include <vector.h> #include <algo.h> #include "defs" #include "define_short" #include "coldata1.hh" //: A vector of the field names. class FieldNames : public vector<string> { private: void init (const ResUse *res); public: FieldNames () {} FieldNames (const ResUse *res) {init(res);} FieldNames (int i) : vector<string>(i) {} FieldNames& operator = (const ResUse *res) {init(res); return *this;} //: Creates a new list from the data in res. FieldNames& operator = (int i) {insert(begin(), i, ""); return *this;} //: Creates a new list with i field names. string& operator [] (int i) {return vector<string>::operator [] (i);} //: returns the field name of the field with that index number const string& operator [] (int i) const {return vector<string>::operator [] (i);} //: returns the field name of the field with that index number uint operator [] (string i) const {return find(begin(),end(), i) - begin();} //: returns the index number of the field with that name }; #endif |
Added sqlplusint/field_names2.hh.
> > | 1 2 | #include "field_names1.hh" |
Added sqlplusint/field_names3.hh.
> > | 1 2 | #include "field_names2.hh" |
Added sqlplusint/field_types.cc.
> > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 | #include "field_types3.hh" #include "result2.hh" void FieldTypes::init(const ResUse *res) { int num = res->num_fields(); reserve(num); for (int i = 0; i < num; i++) { push_back(res->fields(i)); } } |
Added sqlplusint/field_types1.hh.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | #ifndef __field_types1_hh__ #define __field_types1_hh__ #include <vector.h> #include "defs" #include "define_short" #include "type_info1.hh" //: A vector of the field types. class FieldTypes : public vector<mysql_type_info> { private: void init (const ResUse *res); public: FieldTypes () {} FieldTypes (const ResUse *res) {init(res);} FieldTypes (int i) : vector<mysql_type_info>(i) {} FieldTypes& operator = (const ResUse *res) {init(res); return *this;} //: Creates a new list based on the info in res FieldTypes& operator = (int i) {insert(begin(), i, mysql_type_info()); return *this;} //: Creates a new list with i fields. mysql_type_info& operator [] (int i) {return vector<mysql_type_info> ::operator [] (i);} //: Returns the field type for the field with an offset of i. const mysql_type_info& operator [] (int i) const {return vector<mysql_type_info>::operator[] (i);} //: Returns the field type for the field with an offset of i. }; #endif |
Added sqlplusint/field_types2.hh.
> > | 1 2 | #include "field_types1.hh" |
Added sqlplusint/field_types3.hh.
> > | 1 2 | #include "field_types2.hh" |
Added sqlplusint/fields1.hh.
> > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | #ifndef __fields1_hh__ #define __fields1_hh__ #include "resiter1.hh" class ResUse; //: A vector like container with the raw mysql field info. class Fields : public const_subscript_container<Fields, Field> { private: mutable ResUse *res; public: Fields() {} Fields(ResUse *r) : res(r) {} size_type size() const; //: the number of fields. //: Returns the field with an offset of i; const Field& operator [] (size_type i) const; const Field& operator [] (int i) const {return operator [](size_type(i));} }; #endif |
Added sqlplusint/fields2.hh.
> > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 | #ifndef __fields2_hh__ #define __fields2_hh__ inline Fields::size_type Fields::size() const {return res->num_fields();} inline const Field& Fields::operator [] (Fields::size_type i) const { res->field_seek(i); return res->fetch_field(); } #endif |
Added sqlplusint/magic.h.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | #define virtual_def (oper) \ virtual operator oper () const = 0; \ virtual holder* create(const &oper) = 0 #define virtual_int_def (oper) \ virtual_def (oper); \ vortual_def (unsigned oper) class MagicType { class holder_base { public: virtual_int_def (char); virtual_int_def (short int); virtual_int_def (long ing); virtual_int_def (long long int); virtual_def (float); virtual_def (double); virtual_def (string); } template <class Type, const char* Name, tiny_int Id, unsigned short int Id2, unsigned short int Mask> class holder : public holder_base { public: Type value; static const name = Name; static const tiny_int id = Id; static const unsigned short int id2 = Id2; static const unsigned short int mask = Mask; } |
Added sqlplusint/manip.cc.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | #include "manip3.hh" // quote manipulator SQLQueryParms& operator << (quote_type2 p, SQLString &in) { if (in.is_string) { if (in.dont_escape) { SQLString in2 = "'" + in + "'"; in2.processed = true; return *p.qparms << in2; } else { char* s = new char[in.size()*2+1]; mysql_escape_string(s, const_cast<char *>(in.c_str()), in.size() ); SQLString in2 = SQLString("'") + s + "'"; in2.processed = true; *p.qparms << in2; delete s; return *p.qparms; } } else { in.processed = true; return *p.qparms << in; } } template <> ostream& operator << (quote_type1 o, const string &in) { char* s = new char[in.size()*2+1]; mysql_escape_string(s, const_cast<char *>(in.c_str()), in.size() ); *o.ostr << "'" << s << "'"; delete s; return *o.ostr; } template <> ostream& operator << (quote_type1 o, const char* const &in) { unsigned int size; for (size=0; in[size]; size++); char* s = new char[size*2]; mysql_escape_string(s, const_cast<char *>(in), size); *o.ostr << "'" << s << "'"; delete s; return *o.ostr; } template <class Str> inline ostream& _manip (quote_type1 o, const mysql_ColData<Str>& in) { if (in.escape_q()) { char *s = new char[in.size()*2+1]; mysql_escape_string(s, const_cast<char *>(in.c_str()), in.size() ); if (in.quote_q()) *o.ostr << "'" << s << "'"; else *o.ostr << s; delete s; } else if (in.quote_q()) { *o.ostr << "'" << in << "'"; } else { *o.ostr << in; } return *o.ostr; } template <> ostream& operator << (quote_type1 o, const mysql_ColData<string>& in) { return _manip(o,in); } template <> ostream& operator << (quote_type1 o, const mysql_ColData<const_string>& in) { return _manip(o,in); } // quote only manipulator SQLQueryParms & operator << (quote_only_type2 p, SQLString &in) { if (in.is_string) { SQLString in2 = "'" + in + "'"; in2.processed = true; return *p.qparms << in2; } else { in.processed = true; return *p.qparms << in; } } template <> ostream& operator << (quote_only_type1 o, const mysql_ColData<string>& in) { if (in.quote_q()) { *o.ostr << "'" << in << "'"; } else { *o.ostr << in; } return *o.ostr; } template <> ostream& operator << (quote_only_type1 o, const mysql_ColData<const_string>& in) { if (in.quote_q()) { *o.ostr << "'" << in << "'"; } else { *o.ostr << in; } return *o.ostr; } // quote double only manipulator SQLQueryParms & operator << (quote_double_only_type2 p, SQLString &in) { if (in.is_string) { SQLString in2 = "\"" + in + "\""; in2.processed = true; return *p.qparms << in2; } else { in.processed = true; return *p.qparms << in; } } template <> ostream& operator << (quote_double_only_type1 o, const mysql_ColData<string>& in) { if (in.quote_q()) { *o.ostr << "'" << in << "'"; } else { *o.ostr << in; } return *o.ostr; } template <> ostream& operator << (quote_double_only_type1 o, const mysql_ColData<const_string>& in) { if (in.quote_q()) { *o.ostr << "'" << in << "'"; } else { *o.ostr << in; } return *o.ostr; } // escape manipulator SQLQueryParms & operator << (escape_type2 p, SQLString &in) { if (in.is_string) { if (in.dont_escape) { in.processed = true; return *p.qparms << in; } else { char* s = new char[in.size()*2+1]; mysql_escape_string(s, const_cast<char *>(in.c_str()), in.size() ); SQLString in2 = s; in2.processed = true; *p.qparms << in2; delete s; return *p.qparms; } } else { in.processed = true; return *p.qparms << in; } } template <> ostream& operator << (escape_type1 o, const string &in) { char* s = new char[in.size()*2+1]; mysql_escape_string(s, const_cast<char *>(in.c_str()), in.size()); *o.ostr << s; delete s; return *o.ostr; } template <> ostream& operator << (escape_type1 o, const char* const &in) { unsigned int size; for (size=0; in[size]; size++); char* s = new char[size*2]; mysql_escape_string(s, const_cast<char *>(in), size); *o.ostr << s; delete s; return *o.ostr; } template <class Str> inline ostream& _manip (escape_type1 o, const mysql_ColData<Str>& in) { if (in.escape_q()) { char *s = new char[in.size()*2+1]; mysql_escape_string(s, const_cast<char *>(in.c_str()), in.size() ); delete s; } else { *o.ostr << in; } return *o.ostr; } template <> ostream& operator << (escape_type1 o, const mysql_ColData<string>& in) { return _manip(o,in); } template <> ostream& operator << (escape_type1 o, const mysql_ColData<const_string>& in) { return _manip(o,in); } |
Added sqlplusint/manip1.hh.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 | #ifndef __manip1_hh__ #define __manip1_hh__ #ifdef __WIN32__ #include <Windows32/Base.h> #include <Windows32/Defines.h> #include <Windows32/Structures.h> #include <winsock.h> #define errno WSAGetLastError() #endif #include <mysql.h> #include <iostream> #include "define_short" #include "sql_string1.hh" #include "sql_query1.hh" #include "datetime1.hh" #include "set1.hh" //quote manipulaor class SQLQueryParms; enum quote_type0 {mysql_quote}; struct quote_type1 { ostream *ostr; quote_type1(ostream *o) : ostr(o) {} }; inline quote_type1 operator << (ostream &o, quote_type0 esc) { return quote_type1(&o); } struct quote_type2 { SQLQueryParms *qparms; quote_type2(SQLQueryParms *p) : qparms(p) {} }; inline quote_type2 operator << (SQLQueryParms &p, quote_type0 esc) { return quote_type2(&p); } SQLQueryParms& operator << (quote_type2 p, SQLString &in); template <class T> inline ostream& operator << (quote_type1 o, const T &in) { return *o.ostr << in; } template <> ostream& operator << (quote_type1 o, const string &in); template <> ostream& operator << (quote_type1 o, const char* const &in); template <> ostream& operator << (quote_type1 o, const mysql_ColData<string>& in); template <> ostream& operator << (quote_type1 o, const mysql_ColData<const_string>& in); template <> inline ostream& operator << (quote_type1 o, char* const &in) { return operator << (o, const_cast<const char* const &>(in)); } template <> inline ostream& operator << (quote_type1 o, const Date &in) { return *o.ostr << "'" << in << "'"; } template <> inline ostream& operator << (quote_type1 o, const Time &in) { return *o.ostr << "'" << in << "'"; } template <> inline ostream& operator << (quote_type1 o, const DateTime &in) { return *o.ostr << "'" << in << "'"; } template <class ST> inline ostream& operator << (quote_type1 o, const MysqlSet<ST> &in) { return *o.ostr << "'" << in << "'"; } // quote only manipulator enum quote_only_type0 {mysql_quote_only}; struct quote_only_type1 { ostream *ostr; quote_only_type1(ostream *o) : ostr(o) {} }; inline quote_only_type1 operator << (ostream &o, quote_only_type0 esc) { return quote_only_type1(&o); } struct quote_only_type2 { SQLQueryParms *qparms; quote_only_type2(SQLQueryParms *p) : qparms(p) {} }; inline quote_only_type2 operator << (SQLQueryParms &p, quote_only_type0 esc) { return quote_only_type2(&p); } SQLQueryParms & operator << (quote_only_type2 p, SQLString &in); template <class T> inline ostream& operator << (quote_only_type1 o, const T &in) { return *o.ostr << in; } template <> inline ostream& operator << (quote_only_type1 o, const string &in) { return *o.ostr << "'" << in << "'"; } template <> ostream& operator << (quote_only_type1 o, const mysql_ColData<string>& in); template <> ostream& operator << (quote_only_type1 o, const mysql_ColData<const_string>& in); template <> inline ostream& operator << (quote_only_type1 o, const Date &in) { return *o.ostr << "'" << in << "'"; } template <> inline ostream& operator << (quote_only_type1 o, const Time &in) { return *o.ostr << "'" << in << "'"; } template <> inline ostream& operator << (quote_only_type1 o, const DateTime &in) { return *o.ostr << "'" << in << "'"; } template <class ST> inline ostream& operator << (quote_only_type1 o, const MysqlSet<ST> &in) { return *o.ostr << "'" << in << "'"; } // quote double (") only manipulator enum quote_double_only_type0 {mysql_quote_double_only}; struct quote_double_only_type1 { ostream *ostr; quote_double_only_type1(ostream *o) : ostr(o) {} }; inline quote_double_only_type1 operator << (ostream &o, quote_double_only_type0 esc) { return quote_double_only_type1(&o); } struct quote_double_only_type2 { SQLQueryParms *qparms; quote_double_only_type2(SQLQueryParms *p) : qparms(p) {} }; inline quote_double_only_type2 operator << (SQLQueryParms &p, quote_double_only_type0 esc) { return quote_double_only_type2(&p); } SQLQueryParms & operator << (quote_double_only_type2 p, SQLString &in); template <class T> inline ostream& operator << (quote_double_only_type1 o, const T &in) { return *o.ostr << in; } template <> inline ostream& operator << (quote_double_only_type1 o, const string &in) { return *o.ostr << "\"" << in << "\""; } template <> ostream& operator << (quote_double_only_type1 o, const mysql_ColData<string>& in); template <> ostream& operator << (quote_double_only_type1 o, const mysql_ColData<const_string>& in); template <> inline ostream& operator << (quote_double_only_type1 o, const Date &in) { return *o.ostr << "\"" << in << "\""; } template <> inline ostream& operator << (quote_double_only_type1 o, const Time &in) { return *o.ostr << "\"" << in << "\""; } template <> inline ostream& operator << (quote_double_only_type1 o, const DateTime &in) { return *o.ostr << "\"" << in << "\""; } template <class ST> inline ostream& operator << (quote_double_only_type1 o, const MysqlSet<ST> &in) { return *o.ostr << "\"" << in << "\""; } // escape manipulator enum escape_type0 {mysql_escape}; struct escape_type1 { ostream *ostr; escape_type1(ostream *o) : ostr(o) {} }; inline escape_type1 operator << (ostream &o, escape_type0 esc) { return escape_type1(&o); } struct escape_type2 { SQLQueryParms *qparms; escape_type2(SQLQueryParms *p) : qparms(p) {} }; inline escape_type2 operator << (SQLQueryParms &p, escape_type0 esc) { return escape_type2(&p); } SQLQueryParms & operator << (escape_type2 p, SQLString &in); template <class T> inline ostream& operator << (escape_type1 o, const T &in) { return *o.ostr << in; } template <> ostream& operator << (escape_type1 o, const string &in); template <> ostream& operator << (escape_type1 o, const char* const &in); template <> ostream& operator << (escape_type1 o, const mysql_ColData<string>& in); template <> ostream& operator << (escape_type1 o, const mysql_ColData<const_string>& in); template <> inline ostream& operator << (escape_type1 o, char* const &in) { return operator << (o, const_cast<const char* const &>(in)); } //do nothing manipulator enum do_nothing_type0 {mysql_do_nothing}; struct do_nothing_type1 { ostream *ostr; do_nothing_type1(ostream *o) : ostr(o) {} }; inline do_nothing_type1 operator << (ostream &o, do_nothing_type0 esc) { return do_nothing_type1(&o); } template <class T> inline ostream& operator << (do_nothing_type1 o, const T &in) { return *o.ostr << in; } struct do_nothing_type2 { SQLQueryParms *qparms; do_nothing_type2(SQLQueryParms *p) : qparms(p) {} }; inline do_nothing_type2 operator << (SQLQueryParms &p, do_nothing_type0 esc) { return do_nothing_type2(&p); } inline SQLQueryParms & operator << (do_nothing_type2 p, SQLString &in) { in.processed = true; return *p.qparms << in; } enum ignore_type0 {mysql_ignore}; struct ignore_type2 { SQLQueryParms *qparms; ignore_type2(SQLQueryParms *p) : qparms(p) {} }; inline ignore_type2 operator << (SQLQueryParms &p, ignore_type0 esc) { return ignore_type2(&p); } inline SQLQueryParms & operator << (ignore_type2 p, SQLString &in) { return *p.qparms << in; } #endif |
Added sqlplusint/manip2.hh.
> > | 1 2 | #include "manip1.hh" |
Added sqlplusint/manip3.hh.
> > | 1 2 | #include "manip2.hh" |
Added sqlplusint/mysql++.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | #include "defs" #include "define_short" #include "coldata1.hh" #include "compare1.hh" #include "connection1.hh" #include "const_string1.hh" #include "convert1.hh" #include "datetime1.hh" #include "field_names1.hh" #include "field_types1.hh" #include "fields1.hh" #include "manip1.hh" #include "null1.hh" #include "query1.hh" #include "resiter1.hh" #include "result1.hh" #include "row1.hh" #include "set1.hh" #include "sql_query1.hh" #include "sql_string1.hh" #include "stream2string1.hh" #include "tiny_int1.hh" #include "type_info1.hh" #include "vallist1.hh" #include "coldata2.hh" #include "compare2.hh" #include "connection2.hh" #include "const_string2.hh" #include "convert2.hh" #include "datetime2.hh" #include "field_names2.hh" #include "field_types2.hh" #include "fields2.hh" #include "manip2.hh" #include "null2.hh" #include "query2.hh" #include "result2.hh" #include "row2.hh" #include "set2.hh" #include "sql_query2.hh" #include "sql_string2.hh" #include "stream2string2.hh" #include "tiny_int2.hh" #include "type_info2.hh" #include "vallist2.hh" #include "coldata3.hh" #include "compare3.hh" #include "connection3.hh" #include "const_string3.hh" #include "convert3.hh" #include "datetime3.hh" #include "field_names3.hh" #include "field_types3.hh" #include "manip3.hh" #include "null3.hh" #include "query3.hh" #include "result3.hh" #include "row3.hh" #include "set3.hh" #include "sql_query3.hh" #include "sql_string3.hh" #include "stream2string3.hh" #include "tiny_int3.hh" #include "type_info3.hh" #include "vallist3.hh" #ifdef MYSQL_NO_SHORT_NAMES #include "undef_short" #endif |
Added sqlplusint/null1.hh.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | #ifndef __null1_hh__ #define __null1_hh__ #include <ostream.h> #include "define_short" //! with_class = Null //: Thrown when a *Null* value is trying to be converted into a type //: it can't convert to. class BadNullConversion {}; class null_type { public: template <class Type> operator Type () {throw BadNullConversion();} }; //: const null_type null = null_type(); //: Type to use for the behavior parameter for *Null<>* struct NullisNull { static null_type null_is() {return null_type();} static ostream& null_ostr(ostream& o) {o << "(NULL)"; return o;} }; //: Type to use for the behavior parameter for *Null<>* struct NullisZero { static int null_is() {return 0;} static ostream& null_ostr(ostream &o) {o << 0; return o;} }; //: Type to use for the behavior parameter for *Null<>* struct NullisBlank { static const char * null_is() {return "";} static ostream& null_ostr(ostream &o) {o << ""; return o;} }; //: Container class for holding null types. template <class Type, class Behavior = NullisNull> class Null { public: Type data; bool is_null; typedef Type value_type; public: Null () {} //: Null (Type x) : data(x), is_null(false) {} //: Null (const null_type &n) : is_null(true) {} //: Gives Null the null value // Note: the global const *null* (not NULL) is of value null_type thus // you can say something like *Null<Type> x = null*. operator Type& () { if (is_null) return data = Behavior::null_is(); else return data; } //: Null& operator = (const Type &x) {data = x; is_null = false; return *this;} //: Null& operator = (const null_type &n) {is_null = true; return *this;} //: }; //: OEP - Specialization for <void> template <> class Null<void> { public: bool is_null; typedef void value_type; public: Null () : is_null(false) {} //: Null (const null_type &n) : is_null(true) {} //: Gives Null the null value // Note: the global const *null* (not NULL) is of value null_type thus // you can say something like *Null<Type> x = null*. //: Null& operator = (const null_type &n) {is_null = true; return *this;} //: }; #endif |
Added sqlplusint/null2.hh.
> > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 | #ifndef __null2_hh__ #define __null2_hh__ #include "null1.hh" template <class Type, class Behavior> inline ostream& operator << (ostream &o, const Null<Type,Behavior> &n) { if (n.is_null) return Behavior::null_ostr(o); else return o << n.data; } #endif |
Added sqlplusint/null3.hh.
> > | 1 2 | #include "null2.hh" |
Added sqlplusint/query.cc.
> > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | #include "query3.hh" MysqlQuery::MysqlQuery(const MysqlQuery &q) : SQLQuery(q) { throw_exceptions = q.throw_exceptions; mysql = q.mysql; } MysqlQuery& MysqlQuery::operator = (const MysqlQuery &q) { throw_exceptions = q.throw_exceptions; mysql = q.mysql; SQLQuery::operator = (q); return *this; } |
Added sqlplusint/query1.hh.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | #ifndef __query1_hh__ #define __query1_hh__ #ifdef __WIN32__ #include <Windows32/Base.h> #include <Windows32/Defines.h> #include <Windows32/Structures.h> #include <winsock.h> #define errno WSAGetLastError() #endif #include <mysql.h> #include "define_short" #include "sql_query1.hh" #include "result1.hh" #include "connection1.hh" //: A Query class suitable for executing queries. // This is the class is subclassed from SQLQuery. This class unlike // SQLQuery is loosely attached to a Mysql object so that it can // execute queries. class Query : public SQLQuery { private: Connection *mysql; bool throw_exceptions; int affected_rows() const; int insert_id (); string info (); bool lock(); void unlock(); public: Query(Connection *m, bool te = false) {mysql = m;errmsg=NULL;Success = true;throw_exceptions=te;} //: Create a new query object attached to a connection. Query(const Query &q); //: Query& operator = (const Query &q); //: string error (); //: The error message if the query was not successful. bool success(); //: Displays the string currently in the buffer. // Same thing as string(). string preview () {return str(def);} //: string preview (parms &p) {return str(p);} //: //!dummy: MysqlResNSel execute (...); //: Executes the query in the string buffer. // Executes the query in the string buffer and returns a structure // that contains the information of the success of the query. Use // this for queries that don't return a result set such as INSERT, // UPDATE, etc. // // The parameters can be anything in a valid SQLQuery::str. //!dummy: MysqlRes store (...); //: Executes the query in the string buffer. // Executes a query in the string buffer and returns the result. // // The parameters can be anything in a valid SQLQuery::str. //!dummy: MysqlResUse use (...); //: Executes the query in the string buffer. // Executes the query in the string buffer and returns the // results. This method used the mysql_use_result(MYSQL_RES) // function and thus should be used sparingly. Also the Result set is // a lot more limited and DOES NOT have an iterator. // // The parameters can be anything in a valid SQLQuery::str. mysql_query_define0(string,preview) mysql_query_define1(ResNSel, execute) mysql_query_define1(ResUse, use) mysql_query_define1(Result, store) mysql_query_define2(storein_sequence) mysql_query_define2(storein_set) mysql_query_define2(storein) template <class T> Query& update(const T &o, const T &n) { SQLQuery::update(o,n); return *this; } template <class T> Query& insert(const T &v) { SQLQuery::insert(v); return *this; } template <class T> Query& replace(const T &v) { SQLQuery::replace(v); return *this; } }; #endif |
Added sqlplusint/query2.hh.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | #ifndef __query2_hh__ #define __query2_hh__ #include "query1.hh" #include "connection2.hh" #include "coldata2.hh" inline bool Query::success() { if (!Success) return false; return mysql->success(); } inline ResNSel Query::execute(const char* str) { return mysql->execute(str); } inline ResNSel Query::execute(parms &p, query_reset r) { r = (parsed.size()) ? DONT_RESET : RESET_QUERY; return mysql->execute(str(p,r)); } inline ResUse Query::use(const char* str) { return mysql->use(str); } inline ResUse Query::use(parms &p, query_reset r) { r = (parsed.size()) ? DONT_RESET: RESET_QUERY; return mysql->use(str(p,r)); } inline Result Query::store(const char* str) { return mysql->store(str); } inline Result Query::store(parms &p, query_reset r) { r = (parsed.size()) ? DONT_RESET: RESET_QUERY; return mysql->store(str(p,r)); } inline int Query::affected_rows() const { return mysql->affected_rows(); } inline int Query::insert_id () { return mysql->insert_id(); } inline string Query::info() { return mysql->info(); } inline string Query::error () { if (errmsg) return string(errmsg); return mysql->error(); } inline void Query::unlock() { mysql->unlock(); } template <class Seq> inline void Query::storein_sequence (Seq &seq,parms &p, query_reset r) { r = (parsed.size()) ? DONT_RESET : RESET_QUERY; mysql->storein_sequence (seq, str(p,r)); } template <class Set> inline void Query::storein_set (Set &sett, parms &p, query_reset r) { r = (parsed.size()) ? DONT_RESET : RESET_QUERY; mysql->storein_set (sett, str(p,r)); } template <class Sequence> inline void Query::storein_sequence (Sequence &seq, const char *s) { mysql->storein_sequence (seq, s); } template <class Set> inline void Query::storein_set (Set &sett, const char * s) { mysql->storein_set (sett, s); } template <class T> inline void Query::storein (T &con, parms &p, query_reset r) { r = (parsed.size()) ? DONT_RESET : RESET_QUERY; mysql->storein (con, str(p,r)); } template <class T> inline void Query::storein (T &con, const char *s) { mysql->storein (con, s); } #endif |
Added sqlplusint/query3.hh.
> > | 1 2 | #include "query2.hh" |
Added sqlplusint/resiter1.hh.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | #ifndef __resiter1_hh__ #define __resiter1_hh__ #include "defs" #include "row1.hh" #include <iterator.h> template <class OnType, class ReturnType, class SizeType, class DiffType> class subscript_iterator; //: A container adapter to make a container into a Random Access Container. // The requirements are that the container has the member functions // *operator[] (SizeType)* _and_ *size()* defined. template <class OnType, class ValueType, class ReturnType = const ValueType&, class SizeType = unsigned int, class DiffType = int> class const_subscript_container { public: typedef const_subscript_container<OnType,ValueType,ReturnType,SizeType,DiffType> this_type; //: typedef subscript_iterator<const this_type, ReturnType, SizeType, DiffType> iterator; //: typedef iterator const_iterator; //: typedef const ::reverse_iterator<iterator> reverse_iterator; //: typedef const ::reverse_iterator<const_iterator> const_reverse_iterator; //: typedef ValueType value_type; //: typedef value_type& reference; //: typedef value_type& const_reference; //: typedef value_type* pointer; //: typedef value_type* const_pointer; //: typedef DiffType difference_type; //: typedef SizeType size_type; //: virtual size_type size() const = 0; //: virtual ReturnType operator[] (SizeType i) const = 0; //: size_type max_size() const {return size();} //: bool empty() const {return size()==0;} //: iterator begin() const {return iterator(this, 0);} //: iterator end() const {return iterator(this, size());} //: reverse_iterator rbegin() const {return reverse_iterator(end());} //: reverse_iterator rend() const {return reverse_iterator(begin());} //: }; //: template <class OnType, class ReturnType, class SizeType, class DiffType> class subscript_iterator : public random_access_iterator<ReturnType, SizeType> { private: SizeType i; OnType *d; public: subscript_iterator() {}; subscript_iterator(OnType *what, SizeType pos) {d=what; i=pos;} bool operator == (const subscript_iterator &j) const {if (d == j.d && i==j.i) return true; return false;} bool operator != (const subscript_iterator &j) const {if (d == j.d && i!=j.i) return true; return false;} bool operator < (const subscript_iterator &j) const {if (d == j.d && i < j.i) return true; return false;} bool operator > (const subscript_iterator &j) const {if (d == j.d && i > j.i) return true; return false;} bool operator <= (const subscript_iterator &j) const {if (d == j.d && i<=j.i) return true; return false;} bool operator >= (const subscript_iterator &j) const {if (d == j.d && i>=j.i) return true; return false;} ReturnType operator -> () const {return &((*d)[i]);} ReturnType operator * () const {return (*d)[i];} ReturnType operator [] (SizeType n) const {return (*d)[n];} subscript_iterator& operator ++ () {i++; return *this;} subscript_iterator operator ++ (int) {subscript_iterator tmp = *this; i++; return tmp;} subscript_iterator& operator -- () {i--; return *this;} subscript_iterator operator -- (int) {subscript_iterator tmp = *this; i--; return tmp;} subscript_iterator& operator += (SizeType n) {i=i+n; return *this;} subscript_iterator operator + (SizeType n) const {subscript_iterator tmp = *this; tmp.i+=n; return tmp;} subscript_iterator& operator -= (SizeType n) {i=i-n; return *this;} subscript_iterator operator - (SizeType n) const {subscript_iterator tmp = *this; tmp.i-=n; return tmp;} DiffType operator - (const subscript_iterator &j) const {if (d == j.d) return (SizeType)i - j.i; return 0;} }; template <class OnType, class ReturnType, class SizeType, class DiffType> inline subscript_iterator<OnType,ReturnType,SizeType,DiffType> operator + (SizeType x, const subscript_iterator <OnType,ReturnType,SizeType,DiffType>& y) { return y + x; } #endif |
Added sqlplusint/result.cc.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | #include "result3.hh" pointer_tracker<MYSQL_RES, ResUse> ResUse::others = pointer_tracker<MYSQL_RES, ResUse>(); ResUse::ResUse (MYSQL_RES *result, Connection *m, bool te) : mysql(m), mysql_res(result), throw_exceptions(te), _names(NULL), _types(NULL), _fields(this) { _table = fields(0).table; if (mysql) mysql->add_child(this); others.insert(mysql_res,this); } ResUse::~ResUse () { if (mysql) mysql->unlock(); if (mysql) mysql->remove_child(this); others.remove(mysql_res,this); } void ResUse::copy(const ResUse& other) { throw_exceptions = other.throw_exceptions; mysql_res = other.mysql_res; _fields = other._fields; if (other._names) _names = new FieldNames(*other._names); else _names = NULL; if (other._types) _types = new FieldTypes(*other._types); else _types = NULL; mysql = other.mysql; if (mysql) mysql->add_child(this); others.insert(mysql_res,this); } void MutableRes::populate(ResUse res) { Row row = res.fetch_row(); _columns = row.size(); while (row) { parent::push_back(MutableRow<MutableRes>(row, this)); row = res.fetch_row(); } } |
Added sqlplusint/result1.hh.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 | #ifndef __result1_hh__ #define __result1_hh__ #ifdef __WIN32__ #include <Windows32/Base.h> #include <Windows32/Defines.h> #include <Windows32/Structures.h> #include <winsock.h> #define errno WSAGetLastError() #endif #include <map.h> #include <set.h> #include <mysql.h> #include <string> #include "define_short" #include "field_names1.hh" #include "row1.hh" #include "resiter1.hh" #include "tracker.h" #include "field_types1.hh" #include "fields1.hh" #include "connection0.hh" //: class ResUse : public MysqlChild { friend Connection; protected: Connection *mysql; mutable MYSQL_RES *mysql_res; bool throw_exceptions; mutable FieldNames *_names; mutable FieldTypes *_types; Fields _fields; string _table; static pointer_tracker<MYSQL_RES, ResUse> others; void copy(const ResUse& other); public: ResUse () : mysql(0), mysql_res(0), throw_exceptions(false), _names(NULL), _types(NULL), _fields(this) {} ResUse (MYSQL_RES *result, Connection *m = NULL, bool te = false); ResUse (const ResUse &other) {copy(other);} inline ResUse& operator = (const ResUse &other); MYSQL_RES *mysql_result (void) {return mysql_res;} /* raw mysql c api functions */ Row fetch_row() {return Row(mysql_fetch_row(mysql_res), this, throw_exceptions);} //: raw c api function bool eof () const {return mysql_eof(mysql_res);} //: raw c api function long unsigned int *fetch_lengths () const {return mysql_fetch_lengths(mysql_res);} //: raw c api function void free_result() {mysql_free_result(mysql_res);} //: raw c api function /* raw mysql c api fields functions */ Field& fetch_field () const {return *mysql_fetch_field(mysql_res);} //: raw c api field function void field_seek (int field) {mysql_field_seek (mysql_res, field);} //: raw c api field function int num_fields() const {return mysql_num_fields(mysql_res);} //: raw c api field function ~ResUse (); void parent_leaving() {mysql = NULL;} void purge(MYSQL_RES *r) { if (mysql_res) mysql_free_result(mysql_res); mysql_res=0; if (_names) delete _names; if (_types) delete _types; _names=0; _types=0; _table.erase(); } operator bool() const {if (mysql_res) return true; return false;} //: unsigned int columns() const {return num_fields();} //: string& table() {return _table;} //: table name const string& table() const {return _table;} //: table name /* methods for working with field names */ inline int field_num(const string&) const; //: Returns the offset of the filed which equals str. inline string& field_name(int); //: Returns the field with an offset of i. inline const string& field_name(int) const; //: Returns the field with an offset of i. inline FieldNames& field_names(); //: Returns a reference to the underlying FieldNames class. inline const FieldNames& field_names() const; //: Returns a const reference to the underlaying FieldNames class. inline void reset_field_names(); //: Resets the field names to there original values. /* methods for working with field types */ inline mysql_type_info& field_type(int i); //: Returns a reference to the mysql field type for the field with an offset of i. inline const mysql_type_info& field_type(int) const; //: Returns a const reference to the mysql field type for the field with an offset of i. inline FieldTypes& field_types(); //: Returns a reference to the underlying FieldTypes inline const FieldTypes& field_types() const; //: Returns a const reference to the underlying FieldTypes inline void reset_field_types(); //: Resets the field_types to their original values. /* short names for the above methods */ inline int names(const string& s) const; //: Returns the offset of the filed which equals str. inline string& names(int i); //: Returns the field with an offset of i. inline const string& names(int i) const; //: Returns the field with an offset of i. inline FieldNames& names(); //: Returns a reference to the underlying FieldNames class. inline const FieldNames& names() const; //: Returns a const reference to the underlying FieldNames class. inline void reset_names(); //: Resets the field names to their original values. inline mysql_type_info& types(int i); //: Returns a reference to the mysql field type for the field with an offset of i. inline const mysql_type_info& types(int i) const; //: Returns a const reference to the mysql field type for the field with an offset of i. inline FieldTypes& types(); //: Returns a reference to the underlying FieldTypes inline const FieldTypes& types() const; //: Returns a const reference to the underlying FieldTypes inline void reset_types(); //: Resets the field_types to their original values. /* methods for working with field info */ const Fields& fields() const {return _fields;} //: returns a reference to the underling Fields structure. const Field& fields(unsigned int i) const {return _fields[i];} //: returns a reference to the the mysql field info for a field with an offset of i. bool operator == (const ResUse &other) const {return mysql_res == other.mysql_res;} //: bool operator != (const ResUse &other) const {return mysql_res != other.mysql_res;} //: }; //: This class handles the result set. // It is also a Random Access Container that is not LessThanComparable // and not Assignable. Being a Random Access Container it can // return a Random Access Iterator or a reverse Random Access Iterator // yet. // // See MutableRes for a result set that can be modified. class Result : public ResUse, public const_subscript_container<Result,Row,const Row> { friend Connection; public: Result () {} //: Result (MYSQL_RES *result, bool te = false) : ResUse(result, NULL, te) {mysql = NULL;} //: Result (const Result &other) : ResUse(other) {mysql = NULL;} //: // raw mysql c api functions const Row fetch_row() const {return Row(mysql_fetch_row(mysql_res), this, throw_exceptions);} //: Raw c api function int num_rows() const {return mysql_num_rows(mysql_res);} //: Raw c api function void data_seek (uint offset) const {mysql_data_seek(mysql_res, offset);} //: Raw c api function size_type size() const {return num_rows();} //: Returns the number of columns. size_type rows() const {return num_rows();} //: Returns the number of rows. const Row operator [] (size_type i) const {data_seek(i); return fetch_row();} //: Returns the row with an offset of i. }; class MutabelRes; //: This class handles the result set. // It is also a Random Access Container that is not LessThanComparable // but is Assignable. Being a Random Access Container it can // return a Random Access Iterator or a reverse Random Access Iterator // yet. // class MutableRes : public vector<MutableRow<MutableRes> > { private: size_type _columns; FieldNames _names; void populate(ResUse res); typedef vector<MutableRow<MutableRes> > parent; public: MutableRes() {} //: MutableRes(ResUse res) : _names(&res) {populate(res);} //: MutableRes(size_type i) : _columns(i), _names (i) {} //: Creates a new mutable result set with i columns. MutableRes& operator = (ResUse res) { _names=&res; populate(res); return *this; } //: MutableRes& operator = (size_type i) { _columns = i; _names = i; return *this; } //: size_type rows() const {return size();} //: Returns the number of rows. size_type columns() const {return _columns;} //: Returns the number of columns. /* methodes for inserting elements as the standart insert functions won't work that well as MutableRow needs to be constructed in a special way */ iterator insert(iterator pos) {return parent::insert(pos, value_type(this));} void insert(iterator pos, size_type n) {parent::insert(pos, n, value_type(this));} void push_back() {parent::push_back(value_type(this));} /* methods for working with field names */ inline int field_num(const string& str) const; //: Returns the offset of the filed which equals str. inline string& field_name(int i); //: Returns the field with an offset of i. inline const string& field_name(int i) const; //: Returns the field with an offset of i. inline FieldNames& field_names(); //: Returns a reference to the underlying FieldNames class. inline const FieldNames& field_names() const; //: Returns a const reference to the underlying FieldNames class. // short names for the above methods inline int names(const string& s) const; //: Returns the offset of the filed which equals str. inline string& names(int i); //: Returns the field with an offset of i. inline const string& names(int i) const; //: Returns the field with an offset of i. inline FieldNames& names(); //: Returns a reference to the underlying FieldNames class. inline const FieldNames& names() const; //: Returns a const reference to the underlying FieldNames class. }; //! with_class = ResUSe //: inline void swap (ResUse &x, ResUse &y) { ResUse tmp = x; x = y; y = tmp; } //! with_class = Result //: inline void swap (Result &x, Result &y) { Result tmp = x; x = y; y = tmp; } //: This structure holds the information on the success of queries that //: don't return any results. struct ResNSel { bool success; int insert_id; //: int rows; //: Number of rows affected string info; //: Additional info ResNSel() : success(false) {}; ResNSel (Connection *q); operator bool() {return success;} //: If the query was successful }; #endif |
Added sqlplusint/result2.hh.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | #ifndef __result2_hh__ #define __result2_hh__ #include "connection2.hh" #include "result1.hh" #include "row2.hh" #include "fields2.hh" // field name info inline int ResUse::field_num(const string &i) const { if (!_names) _names = new FieldNames(this); return (*_names)[i]; } inline string& ResUse::field_name(int i) { if (!_names) _names = new FieldNames(this); return (*_names)[i]; } inline const string& ResUse::field_name(int i) const { if (!_names) _names = new FieldNames(this); return (*_names)[i]; } inline FieldNames& ResUse::field_names() { if (!_names) _names = new FieldNames(this); return *_names; } inline const FieldNames& ResUse::field_names() const { if (!_names) _names = new FieldNames(this); return *_names; } inline void ResUse::reset_field_names() { delete _names; _names = new FieldNames(this); } // field type info inline mysql_type_info& ResUse::field_type(int i) { if (!_types) _types = new FieldTypes(this); return (*_types)[i]; } inline const mysql_type_info& ResUse::field_type(int i) const { if (!_types) _types = new FieldTypes(this); return (*_types)[i]; } inline FieldTypes& ResUse::field_types() { if (!_types) _types = new FieldTypes(this); return *_types; } inline const FieldTypes& ResUse::field_types() const { if (!_types) _types = new FieldTypes(this); return *_types; } inline void ResUse::reset_field_types() { delete _types; _types = new FieldTypes(this); } inline int ResUse::names(const string& s) const {return field_num(s);} inline string& ResUse::names(int i) {return field_name(i);} inline const string& ResUse::names(int i) const {return field_name(i);} inline FieldNames& ResUse::names() {return field_names();} inline const FieldNames& ResUse::names() const {return field_names();} inline void ResUse::reset_names() {reset_field_names();} inline mysql_type_info& ResUse::types(int i) {return field_type(i);} inline const mysql_type_info& ResUse::types(int i) const {return field_type(i);} inline FieldTypes& ResUse::types() {return field_types();} inline const FieldTypes& ResUse::types() const {return field_types();} inline void ResUse::reset_types() {reset_field_types();} // inline int MutableRes::field_num(const string &i) const { return _names[i]; } inline string& MutableRes::field_name(int i) { return _names[i]; } inline const string& MutableRes::field_name(int i) const { return _names[i]; } inline FieldNames& MutableRes::field_names() { return _names; } inline const FieldNames& MutableRes::field_names() const { return _names; } // inline int MutableRes::names(const string& s) const {return field_num(s);} inline string& MutableRes::names(int i) {return field_name(i);} inline const string& MutableRes::names(int i) const {return field_name(i);} inline FieldNames& MutableRes::names() {return field_names();} inline const FieldNames& MutableRes::names() const {return field_names();} // inline ResUse& ResUse::operator = (const ResUse &other) { others.remove(mysql_res,this); copy(other); return *this; } inline ResNSel::ResNSel (Connection *q) : success (q->success()), insert_id (q->insert_id()), rows (q->affected_rows()), info (q->info()) {} #endif |
Added sqlplusint/result3.hh.
> > | 1 2 | #include "result2.hh" |
Added sqlplusint/row.cc.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #include "result1.hh" #include "row3.hh" MutableRow<ResUse>::MutableRow(const Row &r) : MutableRow_base<ResUse>(r.res) { if (r) { reserve(r.size()); for (size_type i = 0; i < r.size(); i++) { push_back(r.raw_data(i)); } } } MutableRow<ResUse>::MutableRow(const ResUse &r) : MutableRow_base<ResUse>(&r) { insert(begin(), r.columns(), MutableColData()); } MutableRow<MutableRes>::MutableRow(const Row &r, const MutableRes *_res) : MutableRow_base<MutableRes>(_res) { if (r) { reserve(r.size()); for (size_type i = 0; i < r.size(); i++) { push_back(r.raw_data(i)); } } } |
Added sqlplusint/row1.hh.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 | #ifndef __row1_hh__ #define __row1_hh__ #include <vector> #include <string> #include "defs" #include "define_short" //#include "result1.hh" #include "coldata1.hh" #include "resiter1.hh" #include "vallist1.hh" template <class ThisType, class Res> class RowTemplate { protected: virtual ThisType& self() = 0; virtual const ThisType& self() const = 0; public: virtual const Res & parent() const = 0; // // value_list // value_list_ba<ThisType,quote_type0> value_list(const char *d = ",") const { return value_list_ba<ThisType,quote_type0> (self(), d, quote); } template <class Manip> value_list_ba<ThisType,Manip> value_list(const char *d, Manip m) const { return value_list_ba<ThisType,Manip> (self(), d, m); } template <class Manip> value_list_b<ThisType,Manip> value_list(const char *d, Manip m, const vector<bool> &vb) const { return value_list_b<ThisType,Manip> (self(), vb, d, m); } value_list_b<ThisType,quote_type0> value_list(const char *d, const vector<bool> &vb) const { return value_list_b<ThisType,quote_type0> (self(), vb, d, quote); } value_list_b<ThisType,quote_type0> value_list(const vector<bool> &vb) const { return value_list_b<ThisType,quote_type0> (self(), vb, ",", quote); } template <class Manip> value_list_b<ThisType,Manip> value_list(const char *d, Manip m, bool t0, bool t1=false, bool t2=false, bool t3=false, bool t4=false, bool t5=false, bool t6=false, bool t7=false, bool t8=false, bool t9=false, bool ta=false, bool tb=false, bool tc=false) const { vector<bool> vb; create_vector(self().size(), vb, t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,ta,tb,tc); return value_list_b<ThisType, Manip>(self(), vb, d, m); } value_list_b<ThisType,quote_type0> value_list(const char *d, bool t0, bool t1=false, bool t2=false, bool t3=false, bool t4=false, bool t5=false, bool t6=false, bool t7=false, bool t8=false, bool t9=false, bool ta=false, bool tb=false, bool tc=false) const { vector<bool> vb; create_vector(self().size(), vb, t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,ta,tb,tc); return value_list_b<ThisType, quote_type0>(self(), vb, d, quote); } value_list_b<ThisType,quote_type0> value_list(bool t0, bool t1=false, bool t2=false, bool t3=false, bool t4=false, bool t5=false, bool t6=false, bool t7=false, bool t8=false, bool t9=false, bool ta=false, bool tb=false, bool tc=false) const { vector<bool> vb; create_vector(self().size(), vb, t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,ta,tb,tc); return value_list_b<ThisType, quote_type0>(self(), vb, ",", quote); } template <class Manip> value_list_b<ThisType,Manip> value_list(const char *d, Manip m, string s0, string s1="", string s2="", string s3="", string s4="", string s5="", string s6="", string s7="", string s8="", string s9="", string sa="", string sb="", string sc="") const { vector<bool> vb; create_vector(self(), vb, s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,sa,sb,sc); return value_list_b<ThisType, Manip>(self(), vb, d, m); } value_list_b<ThisType,quote_type0> value_list(const char *d, string s0, string s1="", string s2="", string s3="", string s4="", string s5="", string s6="", string s7="", string s8="", string s9="", string sa="", string sb="", string sc="") const { vector<bool> vb; create_vector(self(), vb, s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,sa,sb,sc); return value_list_b<ThisType, quote_type0>(self(), vb, d, quote); } value_list_b<ThisType,quote_type0> value_list(string s0, string s1="", string s2="", string s3="", string s4="", string s5="", string s6="", string s7="", string s8="", string s9="", string sa="", string sb="", string sc="") const { vector<bool> vb; create_vector(self(), vb, s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,sa,sb,sc); return value_list_b<ThisType, quote_type0>(self(), vb, ",", quote); } // // field_list // value_list_ba<FieldNames, do_nothing_type0> field_list(const char *d = ",") const { return value_list_ba<FieldNames, do_nothing_type0> (parent().names(), d, do_nothing); } template <class Manip> value_list_ba<FieldNames,Manip> field_list(const char *d, Manip m) const { return value_list_ba<FieldNames, Manip> (parent().names(), d, m); } template <class Manip> value_list_b<FieldNames,Manip> field_list(const char *d, Manip m, const vector<bool> &vb) const { return value_list_b<FieldNames,Manip> (parent().names(), vb, d, m); } value_list_b<FieldNames,quote_type0> field_list(const char *d, const vector<bool> &vb) const { return value_list_b<FieldNames,quote_type0> (parent().names(), vb, d, quote); } value_list_b<FieldNames,quote_type0> field_list(const vector<bool> &vb) const { return value_list_b<FieldNames,quote_type0> (parent().names(), vb, ",", quote); } template <class Manip> value_list_b<FieldNames,Manip> field_list(const char *d, Manip m, bool t0, bool t1=false, bool t2=false, bool t3=false, bool t4=false, bool t5=false, bool t6=false, bool t7=false, bool t8=false, bool t9=false, bool ta=false, bool tb=false, bool tc=false) const { vector<bool> vb; create_vector(parent().names().size(), vb, t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,ta,tb,tc); return value_list_b<FieldNames, Manip>(parent().names(), vb, d, m); } value_list_b<FieldNames,quote_type0> field_list(const char *d, bool t0, bool t1=false, bool t2=false, bool t3=false, bool t4=false, bool t5=false, bool t6=false, bool t7=false, bool t8=false, bool t9=false, bool ta=false, bool tb=false, bool tc=false) const { vector<bool> vb; create_vector(parent().names().size(), vb, t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,ta,tb,tc); return value_list_b<FieldNames, quote_type0>(parent().names(), vb, d, quote); } value_list_b<FieldNames,quote_type0> field_list(bool t0, bool t1=false, bool t2=false, bool t3=false, bool t4=false, bool t5=false, bool t6=false, bool t7=false, bool t8=false, bool t9=false, bool ta=false, bool tb=false, bool tc=false) const { vector<bool> vb; create_vector(parent().names().size(), vb, t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,ta,tb,tc); return value_list_b<FieldNames, quote_type0>(parent().names(), vb, ",", quote); } template <class Manip> value_list_b<FieldNames,Manip> field_list(const char *d, Manip m, string s0, string s1="", string s2="", string s3="", string s4="", string s5="", string s6="", string s7="", string s8="", string s9="", string sa="", string sb="", string sc="") const { vector<bool> vb; create_vector(parent().names(), vb, s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,sa,sb,sc); return value_list_b<FieldNames, Manip>(parent().names(), vb, d, m); } value_list_b<FieldNames,quote_type0> field_list(const char *d, string s0, string s1="", string s2="", string s3="", string s4="", string s5="", string s6="", string s7="", string s8="", string s9="", string sa="", string sb="", string sc="") const { vector<bool> vb; create_vector(parent().names(), vb, s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,sa,sb,sc); return value_list_b<FieldNames, quote_type0>(parent().names(), vb, d, quote); } value_list_b<FieldNames,quote_type0> field_list(string s0, string s1="", string s2="", string s3="", string s4="", string s5="", string s6="", string s7="", string s8="", string s9="", string sa="", string sb="", string sc="") const { vector<bool> vb; create_vector(parent().names(), vb, s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,sa,sb,sc); return value_list_b<FieldNames, quote_type0>(parent().names(), vb, ",", quote); } // // equal_list // equal_list_ba<FieldNames,ThisType,quote_type0> equal_list(const char *d = ",", const char *e = " = ") const { return equal_list_ba<FieldNames,ThisType,quote_type0> (parent().names(), self(), d, e, quote); } template <class Manip> equal_list_ba<FieldNames,ThisType,Manip> equal_list(const char *d, const char *e, Manip m) const { return equal_list_ba<FieldNames,ThisType,Manip> (parent().names(), self(), d, e, m); } virtual ~RowTemplate() {} }; class MutableRes; template <class Res = ResUse> class MutableRow; //: This class handles the actual rows in an intelligent manner. class Row : public const_subscript_container<Row,ColData,const ColData>, public RowTemplate<Row, ResUse> { friend MutableRow<ResUse>; friend MutableRow<MutableRes>; private: // MYSQL_ROW data; vector <string> data; const ResUse *res; bool throw_exceptions; public: Row() {} Row(MYSQL_ROW d, const ResUse *r, bool te = false) : res(r), throw_exceptions(te) { if (!d) return; data.clear(); for (unsigned int i=0;i<size();i++) { data.insert(data.end(),(d[i]) ? (string)d[i] : (string)""); } } const Row& self() const {return *this;} Row& self() {return *this;} const ResUse& parent() const {return *res;} inline size_type size() const; //: Returns the number of columns. const ColData operator [] (int i) const {return operator[](size_type(i));} inline const ColData operator [] (size_type i) const; //: Returns the value of the field with the index of i. inline const ColData operator [] (const char *) const; //: Returns the value of the field with the field name of i. // This method is not nearly as efficient as using the index number. Use sparingly. inline const ColData operator [] (const string &i) const; //: Returns the value of the field with the field name of i. // This method is not nearly as effecent as using the index number. Use sparingly. const char * raw_data(int i) const {return data[i].c_str();} operator bool() const {return (data.size()) ? true : false;} //: Returns true if there is data in the row. ~Row() {data.clear();} }; //! with_class = MutableRow //: This class handles the actual rows with the added benefit of being able to modify the data. template <class Res> class MutableRow_base : public vector<MutableColData>, public RowTemplate<MutableRow_base<Res>, Res> { private: const Res *res; typedef vector<MutableColData> parent_type; protected: MutableRow_base& self() {return *this;} const MutableRow_base& self() const {return *this;} MutableRow_base() {} MutableRow_base (const Res *r) : res(r) {} public: const Res& parent() const {return *res;} string& table() {return res->table();} const string& table() const {return res->table();} MutableColData& operator [] (int i) {return parent_type::operator [](i);} //: Returns the value of the field with the index of i. MutableColData& operator [] (unsigned int i) {return parent_type::operator [](i);} const MutableColData& operator [] (int i) const {return parent_type::operator [](i);} //: Returns the value of the field with the index of i. const MutableColData& operator [] (unsigned int i) const {return parent_type::operator [](i);} MutableColData& operator [] (const char *); MutableColData& operator [] (const string &i); //: Returns the value of the field with the field name of i. // This method is not nearly as efficient as using the index number. Use sparingly. const MutableColData& operator [] (const char *) const; const MutableColData& operator [] (const string &i) const; //: Returns the value of the field with the field name of i. // This method is not nearly as efficient as using the index number. Use sparingly. operator bool() const {return empty();} //: Returns true if there is data in the row. }; template <class Res> class MutableRow {}; //: //!dummy: template <class Res = ResUse> class MutableRow : public MutableRow_base<Res> {}; class MutableRow<ResUse> : public MutableRow_base<ResUse> { public: MutableRow(const Row& row); MutableRow(const ResUse &res); }; class MutableRow<MutableRes> : public MutableRow_base<MutableRes> { public: MutableRow(const Row& row, const MutableRes *_res); inline MutableRow(const MutableRes *_res); }; #endif |
Added sqlplusint/row2.hh.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | #ifndef __row2_hh__ #define __row2_hh__ #include "string.h" #include "row1.hh" #include "result2.hh" inline Row::size_type Row::size() const {return res->num_fields();} inline const ColData Row::operator [] (size_type i) const { return ColData(data[i].c_str(), res->types(i)); } inline const ColData Row::operator[] (const string &i) const { return (*this)[res->field_num(i)]; } inline const ColData Row::operator[] (const char *i) const { return (*this)[res->field_num(string(i))]; } // MutableRow inline MutableRow<MutableRes>::MutableRow(const MutableRes *_res) : MutableRow_base<MutableRes>(_res) { insert(begin(), _res->columns(), ""); } template <class Res> inline MutableColData& MutableRow_base<Res>::operator[] (const string &i) { return (*this)[res->field_num(i)]; } template <class Res> inline MutableColData& MutableRow_base<Res>::operator[] (const char *i) { return (*this)[res->field_num(string(i))]; } template <class Res> inline const MutableColData& MutableRow_base<Res>::operator[] (const string &i) const { return (*this)[res->field_num(i)]; } template <class Res> inline const MutableColData& MutableRow_base<Res>::operator[] (const char *i) const { return (*this)[res->field_num(string(i))]; } // RowTemplate #endif |
Added sqlplusint/row3.hh.
> > | 1 2 | #include "row2.hh" |
Added sqlplusint/set.cc.
> > > > | 1 2 3 4 | #include "set3.hh" template class Set<set<string> >; |
Added sqlplusint/set1.hh.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | #ifndef __set1_hh__ #define __set1_hh__ #ifdef __WIN32__ #include <Windows32/Base.h> #include <Windows32/Defines.h> #include <Windows32/Structures.h> #include <winsock.h> #define errno WSAGetLastError() #endif #include <set> #include <vector> #include <iostream.h> #include "define_short" #include "coldata1.hh" template <class T, class value_type = typename T::value_type> class MysqlListInsert { private: T *object; public: MysqlListInsert(T *o) {object = o;} void operator () (const value_type &data) {object->push_back(data);} }; template <class T, class key_type = typename T::key_type> class MysqlSetInsert { private: T *object; public: MysqlSetInsert(T *o) {object = o;} void operator () (const key_type &data) {object->insert(data);} }; template <class T> inline MysqlSetInsert<set<T> > set_insert(set<T> *o) { return MysqlSetInsert<set<T> >(o); } template <class T> inline MysqlListInsert<vector<T> > set_insert(vector<T> *o) { return MysqlListInsert<vector<T> >(o); } template <class Insert> void set2container (const char *str, Insert insert); //: A Special Set for holding mysql sets. template <class Container = set<string> > class Set : public Container { public: Set(const char* str) {set2container(str,set_insert(this));} //: Set(const string &str) {set2container(str.c_str(),set_insert(this));} //: Set(const ColData &str) {set2container(str.c_str(),set_insert(this));} //: ostream& out_stream(ostream &s) const; operator string (); }; //! with_class = Set //: template <class Container> inline ostream& operator << (ostream &s, const Set<Container> &d) { return d.out_stream(s); } #endif |
Added sqlplusint/set2.hh.
> > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 | #ifndef __set2_hh__ #define __set2_hh__ #include "set1.hh" #include "stream2string3.hh" template <class Container> inline Set<Container>::operator string () { return stream2string<string>(*this); } #endif |
Added sqlplusint/set3.hh.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | #ifndef __set3_hh__ #define __set3_hh__ #include "set2.hh" #include "coldata2.hh" template <class Insert> void set2container (const char *str, Insert insert) { MutableColData s; while (1) { s = ""; while (*str != ',' && *str) { s += *str; str++; } insert(s); if (!*str) break; str++; } } template <class Container> ostream& Set<Container>::out_stream (ostream &s) const { typename Container::const_iterator i = begin(); typename Container::const_iterator e = end(); while (true) { s << *i; i++; if (i==e) break; s << ","; } return s; } #endif |
Added sqlplusint/space-fix.pl.
> > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #!/usr/bin/perl $/ = undef; open F, $ARGV[0]; $_=<F>; s/ +/ /g; s/\n /\n/g; s/\n\n+/\n\n/g; open F, ">$ARGV[0]"; print F; |
Added sqlplusint/sql_query.cc.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | #include "sql_query3.hh" //#include "result3.hh" SQLQuery::SQLQuery(const SQLQuery &q) { *this << q.str(); Success = q.Success; def = q.def; } SQLQuery& SQLQuery::operator = (const SQLQuery &q) { reset(); *this << q.str(); Success = q.Success; def = q.def; return *this; } void SQLQuery::reset() { seekg (0L,ios::beg); seekp (0L,ios::beg); parsed.erase(parsed.begin(), parsed.end()); def.clear(); clear(); } char * SQLQuery::preview_char() { *this << ends; #ifdef __USLC__ strstreambuf *tmpbuf = rdbuf(); uint length = tmpbuf->pcount(); #else uint length = pcount(); #endif char *s = new char[length]; get(s, length, '\0'); seekg (0,ios::beg); seekp (-1,ios::cur); return s; } SQLString * pprepare (char option, SQLString &S, bool replace = true) { if (S.processed) return &S; if (option == 'r' || (option == 'q' && S.is_string)) { char *s = new char[S.size()*2]; mysql_escape_string(s,const_cast<char *>(S.c_str()),S.size()); SQLString *ss = new SQLString("'"); *ss += s; *ss += "'"; delete[] s; if (replace) {S = *ss; S.processed = true; return &S;} return ss; } else if (option == 'R' || (option == 'Q' && S.is_string)) { SQLString *ss = new SQLString("'" + S + "'"); if (replace) {S = *ss; S.processed = true; return &S;} return ss; } else { if (replace) S.processed = true; return &S; } } void SQLQuery::proc(SQLQueryParms& p) { seekg (0,ios::beg); seekp (0,ios::beg); char num; SQLString *ss; SQLQueryParms *c; for (vector<SQLParseElement>::iterator i = parsed.begin(); i != parsed.end(); i++) { *this << i->before; num = i->num; if (num == -1) { // do nothing } else { if (num < (int)p.size()) c = &p; else if (num < (int)def.size()) c = &def; else { *this << " ERROR"; throw SQLQueryNEParms("Not enough parameters to fill the template."); } ss = pprepare(i->option, (*c)[num], c->bound()); *this << *ss; if (ss != &(*c)[num]) delete ss; } } } string SQLQuery::str(const SQLQueryParms &p) const { SQLQuery *const_this = const_cast<SQLQuery *>(this); if (!parsed.empty()) const_this->proc(const_cast<SQLQueryParms&>(p)); *const_this << ends; #ifdef __USLC__ strstreambuf *tmpbuf = const_this->rdbuf(); uint length = tmpbuf->pcount(); char *s = new char[length]; #else uint length = const_this->pcount(); char s[length]; #endif const_this->get(s, length, '\0'); const_this->seekg (0,ios::beg); const_this->seekp (-1,ios::cur); return string(s); } string SQLQuery::str(const SQLQueryParms &p, query_reset r) { string tmp = str(p); if (r==RESET_QUERY) reset(); return tmp; } SQLQueryParms SQLQueryParms::operator + (const SQLQueryParms &other) const { if (other.size() <= size()) return *this; SQLQueryParms New = *this; unsigned int i; for(i = size(); i < other.size(); i++) { New.push_back(other[i]); } return New; } void SQLQuery::parse() { string str = ""; char num[3]; long int n; char option; string name; char *s, *s0; s0 = s = preview_char(); while (*s) { if (*s == '%') { s++; if (*s == '%') { str += *s++; } else if (*s >= '0' && *s <= '9') { num[0] = *s; s++; if (*s >= '0' && *s <= '9') { num[1] = *s; num[2] = 0; s++; } else { num[1] = 0; } n = strtol(num,NULL,10); option = ' '; if (*s == 'q' || *s == 'Q' || *s == 'r' || *s == 'R') option = *s++; if (*s == ':') { s++; for (;(*s>='A' && *s<='Z') || *s=='_' || (*s>='a' && *s<='z'); s++) { name += *s; } if (*s == ':') s++; if (n >= (long int)parsed_names.size()) parsed_names.insert(parsed_names.end(), (vector<string>::size_type)(n+1) - parsed_names.size(), string()); parsed_names[n] = name; parsed_nums[name] = n; } parsed.push_back( SQLParseElement(str,option,n) ); str = ""; name = ""; } else { str += '%'; } } else { str += *s++; } } parsed.push_back( SQLParseElement(str,' ',-1) ); delete[] s0; } |
Added sqlplusint/sql_query0.hh.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | #ifndef __sql_query0_hh__ #define __sql_query0_hh__ #define mysql_query_define0(RETURN, FUNC)\ RETURN FUNC (ss a)\ {return FUNC (parms() << a);}\ RETURN FUNC (ss a, ss b)\ {return FUNC (parms() << a << b);}\ RETURN FUNC (ss a, ss b, ss c)\ {return FUNC (parms() << a << b << c);}\ RETURN FUNC (ss a, ss b, ss c, ss d)\ {return FUNC (parms() << a << b << c << d);}\ RETURN FUNC (ss a, ss b, ss c, ss d, ss e)\ {return FUNC (parms() << a << b << c << d << e);} \ RETURN FUNC (ss a, ss b, ss c, ss d, ss e, ss f)\ {return FUNC (parms() << a << b << c << d << e << f);}\ RETURN FUNC (ss a, ss b, ss c, ss d, ss e, ss f, ss g)\ {return FUNC (parms() << a << b << c << d << e << f << g);}\ RETURN FUNC (ss a, ss b, ss c, ss d, ss e, ss f, ss g, ss h)\ {return FUNC (parms() << a << b << c << d << e << f << g << h);}\ RETURN FUNC (ss a, ss b, ss c, ss d, ss e, ss f, ss g, ss h, ss i)\ {return FUNC (parms() << a << b << c << d << e << f << g << h << i);}\ RETURN FUNC (ss a,ss b,ss c,ss d,ss e,ss f,ss g,ss h,ss i,ss j)\ {return FUNC (parms() <<a <<b <<c <<d <<e <<f <<g <<h <<i <<j);}\ RETURN FUNC (ss a,ss b,ss c,ss d,ss e,ss f,ss g,ss h,ss i,ss j,ss k)\ {return FUNC (parms() <<a <<b <<c <<d <<e <<f <<g <<h <<i <<j <<k);}\ RETURN FUNC (ss a,ss b,ss c,ss d,ss e,ss f,ss g,ss h,ss i,ss j,ss k,\ ss l)\ {return FUNC (parms() <<a <<b <<c <<d <<e <<f <<g <<h <<i <<j <<k <<l);}\ #define mysql_query_define_const1(RETURN, FUNC) \ RETURN FUNC () const {return FUNC (def);} \ RETURN FUNC (query_reset r) {return FUNC (def,r);} \ RETURN FUNC (const char* str) const; \ RETURN FUNC (const parms &p) const; \ RETURN FUNC (const parms &p, query_reset r);\ mysql_query_define0(RETURN,FUNC) \ #define mysql_query_define1(RETURN, FUNC) \ RETURN FUNC (query_reset r = RESET_QUERY) {return FUNC (def,r);} \ RETURN FUNC (const char* str); \ RETURN FUNC (parms &p, query_reset r = RESET_QUERY);\ mysql_query_define0(RETURN,FUNC) \ #define mysql_query_define2(FUNC) \ template <class T1> void FUNC (T1 &con, query_reset r = RESET_QUERY) {FUNC (con, def,r);} \ template <class T1> void FUNC (T1 &con, const char* str); \ template <class T1> void FUNC (T1 &con, parms &p, query_reset r = RESET_QUERY);\ template <class T1> void FUNC (T1 &con, ss a)\ {FUNC (con, parms() << a);}\ template <class T1> void FUNC (T1 &con, ss a, ss b)\ {FUNC (con, parms() << a << b);}\ template <class T1> void FUNC (T1 &con, ss a, ss b, ss c)\ {FUNC (con, parms() << a << b << c);}\ template <class T1> void FUNC (T1 &con, ss a, ss b, ss c, ss d)\ {FUNC (con, parms() << a << b << c << d);}\ template <class T1> void FUNC (T1 &con, ss a, ss b, ss c, ss d, ss e)\ {FUNC (con, parms() << a << b << c << d << e);} \ template <class T1> void FUNC (T1 &con, ss a, ss b, ss c, ss d, ss e, ss f)\ {FUNC (con, parms() << a << b << c << d << e << f);}\ template <class T1> void FUNC (T1 &con,ss a,ss b,ss c,ss d,ss e,ss f,ss g)\ {FUNC (con, parms() << a << b << c << d << e << f << g);}\ template <class T1> void FUNC (T1 &con,ss a,ss b,ss c,ss d,ss e,ss f,ss g,ss h)\ {FUNC (con, parms() << a << b << c << d << e << f << g << h);}\ template <class T1> void FUNC (T1 &con, ss a, ss b, ss c, ss d, ss e, ss f, ss g, ss h, ss i)\ {FUNC (con, parms() << a << b << c << d << e << f << g << h << i);}\ template <class T1> void FUNC (T1 &con, ss a,ss b,ss c,ss d,ss e,ss f,ss g,ss h,ss i,ss j)\ {FUNC (con, parms() <<a <<b <<c <<d <<e <<f <<g <<h <<i <<j);}\ template <class T1> void FUNC (T1 &con, ss a,ss b,ss c,ss d,ss e,ss f,ss g,ss h,ss i,ss j,ss k)\ {FUNC (con, parms() <<a <<b <<c <<d <<e <<f <<g <<h <<i <<j <<k);}\ template <class T1> void FUNC (T1 &con, ss a,ss b,ss c,ss d,ss e,ss f,ss g,ss h,ss i,ss j,ss k,\ ss l)\ {FUNC (con, parms() <<a <<b <<c <<d <<e <<f <<g <<h <<i <<j <<k <<l);}\ #endif |
Added sqlplusint/sql_query1.hh.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 | #ifndef __sql_query_1_hh #define __sql_query_1_hh #include <strstream.h> #include <vector> #include <map> #include "define_short" #include "sql_query0.hh" #include "sql_string1.hh" class Query; class SQLQuery; //! with_class = SQLQuery //: Exception thrown when not enough parameters are provided // Thrown when not enough parameters are provided for a // template query. struct SQLQueryNEParms { SQLQueryNEParms(const char *c) : error(c) {} const char* error; //: }; //: This class holds the parameter values for filling template queries. // It is a subclass of a vector of *SQLStrings*. class SQLQueryParms : public vector<SQLString> { friend Query; private: typedef const SQLString& ss; SQLQuery *parent; public: SQLQueryParms () : parent(NULL) {} SQLQueryParms (SQLQuery *p) : parent(p) {} bool bound() {return parent;} void clear() {erase(begin(),end());} //: Clears the list SQLString &operator [] (size_type n) { if (n >= size()) insert(end(),(n+1) - size(), ""); return vector<SQLString>::operator [] (n); } //: Access element number n const SQLString &operator [] (size_type n) const {return vector<SQLString>::operator [] (n);} //: Access element number n SQLString &operator [] (const char *str); //: Access the value of the element with a key of str. const SQLString &operator [] (const char *str) const; //: Access the value of the element with a key of str. SQLQueryParms &operator << (const SQLString &str) {push_back(str);return *this;} //: Adds an element to the list SQLQueryParms &operator += (const SQLString &str) {push_back(str);return *this;} //: Adds an element to the list SQLQueryParms operator + (const SQLQueryParms &other) const; //!dummy: void set (ss a, [ss b] ,... , [ss l]); //: Set the elements. // Sets element 0 to a, element 1 to b, etc. May specify up to a dozen elements void set (ss a) {clear(); *this << a;} void set (ss a, ss b) {clear(); *this << a << b;} void set (ss a, ss b, ss c) {clear(); *this << a << b << c;} void set (ss a, ss b, ss c, ss d) {clear(); *this << a << b << c << d;} void set (ss a, ss b, ss c, ss d, ss e) {clear(); *this << a << b << c << d << e;} void set (ss a, ss b, ss c, ss d, ss e, ss f) {clear(); *this << a << b << c << d << e << f;} void set (ss a, ss b, ss c, ss d, ss e, ss f, ss g) {clear(); *this << a << b << c << d << e << f << g;} void set (ss a, ss b, ss c, ss d, ss e, ss f, ss g, ss h) {clear(); *this << a << b << c << d << e << f << g << h;} void set (ss a, ss b, ss c, ss d, ss e, ss f, ss g, ss h, ss i) {clear(); *this << a << b << c << d << e << f << g << h << i;} void set (ss a,ss b,ss c,ss d,ss e,ss f,ss g,ss h,ss i,ss j) {clear(); *this <<a <<b <<c <<d <<e <<f <<g <<h <<i <<j;} void set (ss a,ss b,ss c,ss d,ss e,ss f,ss g,ss h,ss i,ss j,ss k) {clear(); *this <<a <<b <<c <<d <<e <<f <<g <<h <<i <<j <<k;} void set (ss a,ss b,ss c,ss d,ss e,ss f,ss g,ss h,ss i,ss j,ss k,ss l) {clear(); *this <<a <<b <<c <<d <<e <<f <<g <<h <<i <<j <<k <<l;} }; //: enum query_reset {DONT_RESET, RESET_QUERY}; struct SQLParseElement { SQLParseElement(string b, char o, char n) : before(b),option(o),num(n) {} string before; char option; char num; }; //! with_class = Query //: The "pure" query class // This is the "pure" query class. It is used to form queries to send // to the *Connection* object. The *Query* class can be used if you // wish to also be able to execute the queries without having to send // them to the *Connection* object. // // This class is subclassed from *strstream*. This means that you can // write to it like a stream to avoid having to piece parts together // by creating you own *strstream* or by using *sprintf*. Although you // can read from query because it is a stream this is _not_ // recommended. I can not guarantee the predictability of the class if // you do and will offer no help if you run into problems when you do // this. However, fell free to use any of the stream methods to write // to it. Just make sure that the write buffer points to the end of // your query before you try to use any of the *SQLQuery* specific // methods except for *error()* and *success()*. class SQLQuery : public strstream { friend SQLQueryParms; private: char* preview_char(); protected: bool Success; char* errmsg; vector<SQLParseElement> parsed; vector<string> parsed_names; map<string,int> parsed_nums; typedef const SQLString& ss; typedef SQLQueryParms parms; void proc(parms &p); public: SQLQuery(): Success(false), errmsg(NULL), def(this) {} //: SQLQuery(const SQLQuery &q); //: SQLQuery& operator = (const SQLQuery &q); //: SQLQueryParms def; //: The default template parameters set. void parse(); string error () const {return errmsg;} bool success() const {return Success;} operator bool () {return success();} bool operator ! () {return !success();} //!dummy: string str (query_reset r = DONT_RESET); //: Returns the full query string. // Returns the full query string, replacing it with the default // template parameters if necessary. *query_reset* can either be // DONT_RESET or RESET_QUERY. If it is set the RESET_QUERY then // reset() is called after it has finished returning the query. If // there is not enough parameters then it will return a // empty string and *success()* would be false. //!dummy: string str (const SQLString &parm0, ...,const SQLString &parm11); //: Like str(query_reset) but sets the parameters. // Like str(query_reset) but sets query parameters 0 to (up to) // 11. To parm0, parm1 etc. This is archived by overloaded methods // and templates and not the ... // // It will combine this with def. If any of the required parameters // are null it will produce an error and return an empty string. //!dummy: string str(const SQLQueryParms & p, query_reset r = DONT_RESET); //: Like *str(query_reset)* but sets the parameter. // Like *query(query_reset res)* but sets the parameters based on // combining p and def. // // If any of the required parameters are null it will produce an // error and return an empty string. void reset (); //: Resets the query. // This means erasing the string and the default template parameters. template <class T> SQLQuery& update(const T &o, const T &n) { reset(); *this << "UPDATE " << o.table() << " SET " << n.equal_list() << " WHERE " << o.equal_list(" AND ", sql_use_compare); return *this; } //: template <class T> SQLQuery& insert(const T &v) { reset(); *this << "INSERT INTO " << v.table() << " (" << v.field_list() << ") VALUES (" << v.value_list() << ")"; return *this; } //: template <class T> SQLQuery& replace(const T &v) { reset(); *this << "REPLACE INTO " << v.table() << " (" << v.field_list() << ") VALUES (" << v.value_list() << ")"; return *this; } //: mysql_query_define_const1(string,str) }; #endif |
Added sqlplusint/sql_query2.hh.
> > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | #ifndef __sql_query2_hh__ #define __sql_query2_hh__ #include "sql_query1.hh" inline SQLString &SQLQueryParms::operator[] (const char *str) { if (parent) return operator[] (parent->parsed_nums[str]); throw; // only here temporary } inline const SQLString &SQLQueryParms::operator[] (const char *str) const { if (parent) return operator[] (parent->parsed_nums[str]); throw; // only here temporary } #endif |
Added sqlplusint/sql_query3.hh.
> > | 1 2 | #include "sql_query2.hh" |
Added sqlplusint/sql_string1.hh.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | #ifndef __sql_string1_hh__ #define __sql_string1_hh__ #include <stdio.h> #include <string> #include "defs" #include "define_short" //: A special string that will convert from anything. // A class subclassed from string that has the additional ability to // convert from any valid mysql type. class SQLString : public string { public: bool is_string; bool dont_escape; bool processed; SQLString() : is_string(false) , processed(false) {} SQLString (const string& str) :string (str) {is_string=true;processed=false;dont_escape=false;} SQLString (const char *str) :string (str) {is_string=true;processed=false;dont_escape=false;} SQLString& operator = (const char *str) { string::operator = (str); return *this; } SQLString& operator = (const string& str) { string::operator = (str); return *this; } SQLString (char i) : is_string(false), processed(false) {char s[6]; sprintf(s,"%dh",(short int)i); *this=s;} SQLString (unsigned char i) : is_string(false), processed(false) {char s[6]; sprintf(s,"%uh",(short int)i); *this=s;} SQLString (short int i) : is_string(false), processed(false) {char s[6]; sprintf(s,"%dh",i); *this=s;} SQLString (unsigned short int i) : is_string(false), processed(false) {char s[6]; sprintf(s,"%uh",i); *this=s;} SQLString (int i) : is_string(false), processed(false) {char s[11]; sprintf(s,"%d",i); *this=s;} SQLString (unsigned int i) : is_string(false), processed(false) {char s[11]; sprintf(s,"%u",i); *this=s;} /*SQLString (long long int i) : is_string(false), processed(false) {char s[22]; sprintf(s,"%dL",i); *this=s;} SQLString (unsigned long long int i) : is_string(false), processed(false) {char s[22]; sprintf(s,"%uL",i); *this=s;} */ SQLString (float i) : is_string(false), processed(false) {char s[40]; sprintf(s,"%g",i); *this=s;} SQLString (double i) : is_string(false), processed(false) {char s[40]; sprintf(s,"%g",i); *this=s;} }; #endif |
Added sqlplusint/sql_string2.hh.
> > > | 1 2 3 | #include "sql_string1.hh" |
Added sqlplusint/sql_string3.hh.
> > > | 1 2 3 | #include "sql_string2.hh" |
Added sqlplusint/sqlplus.hh.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | #include "defs" #include "define_short" #include "coldata1.hh" #include "compare1.hh" #include "connection1.hh" #include "const_string1.hh" #include "convert1.hh" #include "datetime1.hh" #include "field_names1.hh" #include "field_types1.hh" #include "fields1.hh" #include "manip1.hh" #include "null1.hh" #include "query1.hh" #include "resiter1.hh" #include "result1.hh" #include "row1.hh" #include "set1.hh" #include "sql_query1.hh" #include "sql_string1.hh" #include "stream2string1.hh" #include "tiny_int1.hh" #include "type_info1.hh" #include "vallist1.hh" #include "coldata2.hh" #include "compare2.hh" #include "connection2.hh" #include "const_string2.hh" #include "convert2.hh" #include "datetime2.hh" #include "field_names2.hh" #include "field_types2.hh" #include "fields2.hh" #include "manip2.hh" #include "null2.hh" #include "query2.hh" #include "result2.hh" #include "row2.hh" #include "set2.hh" #include "sql_query2.hh" #include "sql_string2.hh" #include "stream2string2.hh" #include "tiny_int2.hh" #include "type_info2.hh" #include "vallist2.hh" #include "coldata3.hh" #include "compare3.hh" #include "connection3.hh" #include "const_string3.hh" #include "convert3.hh" #include "datetime3.hh" #include "field_names3.hh" #include "field_types3.hh" #include "manip3.hh" #include "null3.hh" #include "query3.hh" #include "result3.hh" #include "row3.hh" #include "set3.hh" #include "sql_query3.hh" #include "sql_string3.hh" #include "stream2string3.hh" #include "tiny_int3.hh" #include "type_info3.hh" #include "vallist3.hh" #ifdef MYSQL_NO_SHORT_NAMES #include "undef_short" #endif |
Added sqlplusint/stream2string1.hh.
> > > > > > > | 1 2 3 4 5 6 7 | #ifndef __stream2string1_hh__ #define __stream2string1_hh__ template<class Strng, class T> Strng stream2string(const T &object); #endif |
Added sqlplusint/stream2string2.hh.
> > | 1 2 | #include "stream2string1.hh" |
Added sqlplusint/stream2string3.hh.
> > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | #ifndef __stream2string3_hh__ #define __stream2string3_hh__ #include <strstream.h> template<class Strng, class T> Strng stream2string(const T &object) { ostrstream str; object.out_stream(str); str << ends; Strng s = str.str(); #ifdef __USLC__ strstreambuf *tmpbuf = str.rdbuf(); tmpbuf->freeze(0); #else str.freeze(0); #endif return s; } #endif |
Added sqlplusint/tiny_int1.hh.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | #ifndef __tiny_int1_hh__ #define __tiny_int1_hh__ class tiny_int { char value; public: tiny_int() {} tiny_int(short int v) : value(v) {} operator short int() const {return (short int)value;}; tiny_int &operator = (short int v) {value=v; return *this;} tiny_int &operator += (short int v) {value+=v; return *this;} tiny_int &operator -= (short int v) {value-=v; return *this;} tiny_int &operator *= (short int v) {value*=v; return *this;} tiny_int &operator /= (short int v) {value/=v; return *this;} tiny_int &operator %= (short int v) {value%=v; return *this;} tiny_int &operator &= (short int v) {value&=v; return *this;} tiny_int &operator |= (short int v) {value|=v; return *this;} tiny_int &operator ^= (short int v) {value^=v; return *this;} tiny_int &operator <<= (short int v) {value<<=v; return *this;} tiny_int &operator >>= (short int v) {value>>=v; return *this;} tiny_int &operator ++ () {value++; return *this;} tiny_int &operator -- () {value--; return *this;} tiny_int operator ++ (int) {tiny_int tmp=value; value++; return tmp;} tiny_int operator -- (int) {tiny_int tmp=value; value--; return tmp;} tiny_int operator - (const tiny_int& i) const {return value - i;} tiny_int operator + (const tiny_int& i) const {return value + i;} tiny_int operator * (const tiny_int& i) const {return value * i;} tiny_int operator / (const tiny_int& i) const {return value / i;} tiny_int operator % (const tiny_int& i) const {return value % i;} tiny_int operator | (const tiny_int& i) const {return value | i;} tiny_int operator & (const tiny_int& i) const {return value & i;} tiny_int operator ^ (const tiny_int& i) const {return value ^ i;} tiny_int operator << (const tiny_int& i) const {return value << i;} tiny_int operator >> (const tiny_int& i) const {return value >> i;} }; #endif |
Added sqlplusint/tiny_int2.hh.
> > > | 1 2 3 | #include "tiny_int1.hh" |
Added sqlplusint/tiny_int3.hh.
> > > | 1 2 3 | #include "tiny_int2.hh" |
Added sqlplusint/tracker.h.
> > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | #ifndef __mysql_tracker_h__ #define __mysql_tracker_h__ #include <set.h> #include <map.h> template <class Pointer, class Object> class pointer_tracker { private: map<Pointer*, set<Object*> > tracker; public: void insert (Pointer *p, Object *o) { tracker[p].insert(o); } void remove (Pointer *p, Object *o) { tracker[p].erase(o); if (tracker[p].empty()) { tracker.erase(p); o->purge(p); } } }; #endif |
Added sqlplusint/type_info.cc.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 | #ifdef __WIN32__ #include <Windows32/Base.h> #include <Windows32/Defines.h> #include <Windows32/Structures.h> #include <winsock.h> #endif #include <mysql.h> #include <string.h> #include "datetime1.hh" #include "set1.hh" #include "type_info3.hh" typedef string Enum; const mysql_type_info::sql_type_info mysql_type_info::types[62] = { sql_type_info("DECIMAL NOT NULL", typeid(double), 0), sql_type_info("TINYINT NOT NULL", typeid(signed char), 1, true), sql_type_info("SMALLINT NOT NULL", typeid(short int), 2, true), sql_type_info("INT NOT NULL", typeid(int), 3, true), sql_type_info("FLOAT NOT NULL", typeid(float), 4, true), sql_type_info("DOUBLE NOT NULL", typeid(double), 5, true), sql_type_info("NULL NOT NULL", typeid(void), 6), sql_type_info("TIMESTAMP NOT NULL", typeid(Time), 7), sql_type_info("BIGINT NOT NULL", typeid(long long int), 8, true), sql_type_info("MEDIUMINT NOT NULL", typeid(int), 9), sql_type_info("DATE NOT NULL", typeid(Date), 10, true), sql_type_info("TIME NOT NULL", typeid(Time), 11, true), sql_type_info("DATETIME NOT NULL", typeid(DateTime), 12, true), sql_type_info("ENUM NOT NULL", typeid(Enum), 13, true), sql_type_info("SET NOT NULL", typeid(Set<string>), 14, true), sql_type_info("TINYBLOB NOT NULL", typeid(string), 15), sql_type_info("MEDIUMBLOB NOT NULL", typeid(string), 16), sql_type_info("LONGBLOB NOT NULL", typeid(string), 17), sql_type_info("BLOB NOT NULL", typeid(string), 18), sql_type_info("VARCHAR NOT NULL", typeid(string), 19, true), sql_type_info("CHAR NOT NULL", typeid(string), 20), sql_type_info("CHAR NOT NULL", typeid(string), 21), sql_type_info("TINYINT UNSIGNED NOT NULL", typeid(unsigned char), 22, true), sql_type_info("SMALLINT UNSIGNED NOT NULL", typeid(unsigned short int), 23, true), sql_type_info("INT UNSIGNED NOT NULL", typeid(unsigned int), 24, true), sql_type_info("INT UNSIGNED NOT NULL", typeid(unsigned int), 25, true), sql_type_info("INT UNSIGNED NOT NULL", typeid(unsigned int), 26, true), sql_type_info("INT UNSIGNED NOT NULL", typeid(unsigned int), 27, true), sql_type_info("INT UNSIGNED NOT NULL", typeid(unsigned int), 28, true), sql_type_info("BIGINT UNSIGNED NOT NULL", typeid(unsigned long long int), 29, true), sql_type_info("MEDIUMINT UNSIGNED NOT NULL", typeid(unsigned int), 30), sql_type_info("DECIMAL NULL", typeid(Null<double>), 0), sql_type_info("TINYINT NULL", typeid(Null<signed char>), 1, true), sql_type_info("SMALLINT NULL", typeid(Null<short int>), 2, true), sql_type_info("INT NULL", typeid(Null<int>), 3, true), sql_type_info("FLOAT NULL", typeid(Null<float>), 4, true), sql_type_info("DOUBLE NULL", typeid(Null<double>), 5, true), sql_type_info("NULL NULL", typeid(Null<void>), 6), sql_type_info("TIMESTAMP NULL", typeid(Null<Time>), 7), sql_type_info("BIGINT NULL", typeid(Null<long long int>), 8, true), sql_type_info("MEDIUMINT NULL", typeid(Null<int>), 9), sql_type_info("DATE NULL", typeid(Null<Date>), 10, true), sql_type_info("TIME NULL", typeid(Null<Time>), 11, true), sql_type_info("DATETIME NULL", typeid(Null<DateTime>), 12, true), sql_type_info("ENUM NULL", typeid(Null<Enum>), 13, true), sql_type_info("SET NULL", typeid(Null<Set<string> >), 14, true), sql_type_info("TINYBLOB NULL", typeid(Null<string>), 15), sql_type_info("MEDIUMBLOB NULL", typeid(Null<string>), 16), sql_type_info("LONGBLOB NULL", typeid(Null<string>), 17), sql_type_info("BLOB NULL", typeid(Null<string>), 18), sql_type_info("VARCHAR NULL", typeid(Null<string>), 19, true), sql_type_info("CHAR NULL", typeid(Null<string>), 20), sql_type_info("CHAR NULL", typeid(Null<string>), 21), sql_type_info("TINYINT UNSIGNED NULL", typeid(Null<unsigned char>), 22, true), sql_type_info("SMALLINT UNSIGNED NULL", typeid(Null<unsigned short int>),23, true), sql_type_info("INT UNSIGNED NULL", typeid(Null<unsigned int>), 24, true), sql_type_info("INT UNSIGNED NULL", typeid(Null<unsigned int>), 25, true), sql_type_info("INT UNSIGNED NULL", typeid(Null<unsigned int>), 26, true), sql_type_info("INT UNSIGNED NULL", typeid(Null<unsigned int>), 27, true), sql_type_info("INT UNSIGNED NULL", typeid(Null<unsigned int>), 28, true), sql_type_info("BIGINT UNSIGNED NULL", typeid(Null<unsigned long long int>),29, true), sql_type_info("MEDIUMINT UNSIGNED NULL", typeid(Null<unsigned int>), 30), }; const mysql_type_info::sql_type_info_lookup mysql_type_info::lookups(mysql_type_info::types, 62); mysql_ti_sql_type_info_lookup:: mysql_ti_sql_type_info_lookup(const sql_type_info types[], const int size) { for (int i = 0; i != size; i++) { if (types[i]._default) _map[types[i]._c_type] = i; } } unsigned char mysql_type_info::type(enum_field_types t, bool _unsigned, bool _null) { if (_null) { if (_unsigned) { return unsigned_null_offset + t; } else { if (t < 200) return null_offset + t; else return null_offset + (t-234); } } else { if (_unsigned) { return unsigned_offset + t; } else { if (t < 200) return offset + t; else return offset + (t-234); } } } bool mysql_type_info::quote_q() const { if (base_type().c_type() == typeid(string) || base_type().c_type() == typeid(Date) || base_type().c_type() == typeid(Time) || base_type().c_type() == typeid(DateTime) || base_type().c_type() == typeid(Enum) || base_type().c_type() == typeid(Set<string>)) { return true; } else { return false; } } bool mysql_type_info::escape_q() const { if (c_type() == typeid(string)) return true; else return false; } |
Added sqlplusint/type_info1.hh.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 | #ifndef __type_info1_hh__ #define __type_info1_hh__ #ifdef __WIN32__ #include <Windows32/Base.h> #include <Windows32/Defines.h> #include <Windows32/Structures.h> #include <winsock.h> #define errno WSAGetLastError() #endif #include <mysql.h> #include <typeinfo> #include <map> #ifdef __USLC__ using namespace std; #endif class mysql_type_info; class mysql_ti_sql_type_info_lookup; class mysql_ti_sql_type_info { friend mysql_type_info; friend mysql_ti_sql_type_info_lookup; private: const char *_sql_name; const type_info *_c_type; const unsigned char _base_type; const bool _default; mysql_ti_sql_type_info (const mysql_ti_sql_type_info &b); // can't do mysql_ti_sql_type_info& operator=(const mysql_ti_sql_type_info &b); // " " mysql_ti_sql_type_info () {} // OEP - didn't init _base_type and _default mysql_ti_sql_type_info () {} // all private, only mysql_type_info can // create because there *must* be only one copy // of each. mysql_ti_sql_type_info (const char *s, const type_info &t, const unsigned char bt = 0, const bool d = false ) : _sql_name(s), _c_type(&t), _base_type(bt), _default(d) {} }; struct type_info_cmp { bool operator() (const type_info *lhs, const type_info *rhs) const { return lhs->before(*rhs); } }; class mysql_ti_sql_type_info_lookup { friend mysql_type_info; private: typedef mysql_ti_sql_type_info sql_type_info; map<const type_info *, unsigned char, type_info_cmp> _map; mysql_ti_sql_type_info_lookup(const sql_type_info types[], const int size); const unsigned char& operator [] (const type_info &ti) const { return _map.find(&ti)->second; } }; //: Class that holds basic type information for ColData. class mysql_type_info { private: typedef mysql_ti_sql_type_info sql_type_info; typedef mysql_ti_sql_type_info_lookup sql_type_info_lookup; private: static const sql_type_info types[62]; static const unsigned char offset = 0; static const unsigned char unsigned_offset = 21; static const unsigned char null_offset = 31; static const unsigned char unsigned_null_offset = 52; static const sql_type_info_lookup lookups; static unsigned char type(enum_field_types t, bool _unsigned, bool _null = false); public: static const unsigned char string_type = 20; private: unsigned char num; unsigned int _length; unsigned int _max_length; inline const sql_type_info& deref() const; public: //!dummy: static const unsigned char string_type; //: The id of the string type. mysql_type_info() {} //: mysql_type_info(unsigned char n) : num(n) {} //: inline mysql_type_info(enum_field_types t, bool _unsigned, bool _null); //: inline mysql_type_info(const MYSQL_FIELD &f); //: mysql_type_info(const mysql_type_info &t) : num(t.num) {} //: mysql_type_info(const type_info &t) {num = lookups[t]; } //: mysql_type_info& operator = (unsigned char n) {num=n; return *this;} //: mysql_type_info& operator = (const mysql_type_info &t) {num = t.num; return *this;} //: mysql_type_info& operator = (const type_info &t) {num = lookups[t]; return *this;} //: inline const char* name() const; //: Returns a implication defined name of the c++ type. // Returns the name that would be returned by typeid().name() for the C++ type // associated with the sql type. inline const char* sql_name() const; //: Returns the name for the sql type. inline const type_info& c_type() const; inline const unsigned int length() const; inline const unsigned int max_length() const; //: Returns the type_info for the C++ type associated with the sql type. inline const mysql_type_info base_type() const; //: Returns the type_info for the C++ type inside of the Null type. // If the type is not null then this is the same as c_type() int id() const {return num;} //: Returns the id of the sql_type. // Note: Do not ever use this id directly as it may change between versions. bool quote_q() const; //: Returns true if the sql type is of a type that needs to be quoted. bool escape_q() const; //: Returns true if the sql type is of a type that needs to be escaped. bool before(mysql_type_info &b) { return num < b.num; } //: Provides ordering // You can also use id() for the same purpose. }; inline const mysql_type_info::sql_type_info& mysql_type_info::deref() const { return types[num]; } inline const char* mysql_type_info::name() const { return deref()._c_type->name(); } inline const char* mysql_type_info::sql_name() const { return deref()._sql_name; } inline const unsigned int mysql_type_info::length() const { return _length; } inline const unsigned int mysql_type_info::max_length() const { return _max_length; } inline const type_info& mysql_type_info::c_type() const { return *deref()._c_type; } inline const mysql_type_info mysql_type_info::base_type() const { return mysql_type_info(deref()._base_type); } inline mysql_type_info::mysql_type_info(enum_field_types t, bool _unsigned, bool _null) { num = type(t,_unsigned,_null); } inline mysql_type_info::mysql_type_info(const MYSQL_FIELD &f) { num = type(f.type, (f.flags & UNSIGNED_FLAG), !(f.flags & NOT_NULL_FLAG)); _length = f.length; _max_length = f.max_length; } inline bool operator == (const mysql_type_info& a, const mysql_type_info& b) { return a.id() == b.id(); } inline bool operator != (const mysql_type_info& a, const mysql_type_info& b) { return a.id() != b.id(); } inline bool operator == (const type_info &a, const mysql_type_info &b) { return a == b.c_type(); } inline bool operator != (const type_info &a, const mysql_type_info &b) { return a != b.c_type(); } inline bool operator == (const mysql_type_info &a, const type_info &b) { return a.c_type() == b; } inline bool operator != (const mysql_type_info &a, const type_info &b) { return a.c_type() != b; } #endif |
Added sqlplusint/type_info2.hh.
> > > | 1 2 3 | #include "type_info1.hh" |
Added sqlplusint/type_info3.hh.
> > > | 1 2 3 | #include "type_info2.hh" |
Added sqlplusint/vallist.cc.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | #include "vallist3.hh" #include "row2.hh" void create_vector(int size, vector<bool>& v, bool t0, bool t1, bool t2, bool t3, bool t4, bool t5, bool t6, bool t7, bool t8, bool t9, bool ta, bool tb, bool tc) { v.reserve(size); v.push_back(t0); if (size == 1) return; v.push_back(t1); if (size == 2) return; v.push_back(t2); if (size == 3) return; v.push_back(t3); if (size == 4) return; v.push_back(t4); if (size == 5) return; v.push_back(t5); if (size == 6) return; v.push_back(t6); if (size == 7) return; v.push_back(t7); if (size == 8) return; v.push_back(t8); if (size == 9) return; v.push_back(t9); if (size == 10) return; v.push_back(ta); if (size == 11) return; v.push_back(tb); if (size == 12) return; v.push_back(tc); } template <class Container> void create_vector(const Container&c, vector<bool>&v, string s0, string s1, string s2, string s3, string s4, string s5, string s6, string s7, string s8, string s9, string sa, string sb, string sc) { v.insert(v.begin(), c.size(), false); v[c.parent().field_num(s0)] = true; if (s1.empty()) return; v[c.parent().field_num(s1)] = true; if (s2.empty()) return; v[c.parent().field_num(s2)] = true; if (s3.empty()) return; v[c.parent().field_num(s3)] = true; if (s4.empty()) return; v[c.parent().field_num(s4)] = true; if (s5.empty()) return; v[c.parent().field_num(s5)] = true; if (s6.empty()) return; v[c.parent().field_num(s6)] = true; if (s7.empty()) return; v[c.parent().field_num(s7)] = true; if (s8.empty()) return; v[c.parent().field_num(s8)] = true; if (s9.empty()) return; v[c.parent().field_num(s9)] = true; if (sa.empty()) return; v[c.parent().field_num(sa)] = true; if (sb.empty()) return; v[c.parent().field_num(sb)] = true; if (sc.empty()) return; v[c.parent().field_num(sc)] = true; } template void create_vector (const Row &c, vector<bool>&v, string s0, string s1, string s2, string s3, string s4, string s5, string s6, string s7, string s8, string s9, string sa, string sb, string sc); template void create_vector (const MutableRow<ResUse> &c, vector<bool>&v, string s0, string s1, string s2, string s3, string s4, string s5, string s6, string s7, string s8, string s9, string sa, string sb, string sc); template void create_vector (const MutableRow<MutableRes> &c, vector<bool>&v, string s0, string s1, string s2, string s3, string s4, string s5, string s6, string s7, string s8, string s9, string sa, string sb, string sc); /* int main() { const char *x[8] = {"12","11","This is a", "9","7","6","5","4"}; cout << "Compile Good\n"; simp_list_b<const char **> X(x,x+8); cout << *X.begin() << endl; cout << value_list(X) << endl; cout << value_list(X,";") << endl; vector<char *> xx; xx.push_back("testing"); xx.push_back("I want you now"); xx.push_back("Whats the deal man"); cout << value_list(xx,",",quote) << endl; cout << value_list(xx,";") << endl; vector<const char *> xy; xy.push_back("test"); xy.push_back("want"); xy.push_back("deal"); cout << "V1: " << value_list(xy,",",quote,true,false,true) << endl; cout << "V2: " << value_list(xy,",",quote,true,true,true) << endl; cout << "V3: " << value_list(xy,";") << endl; cout << "EL: " << equal_list(xy,xx) << endl; cout << "EL: " << equal_list(xy,xx, " AND ", " > ", quote,true,false,true) << endl; } */ |
Added sqlplusint/vallist1.hh.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 | #ifndef __vallist1_hh__ #define __vallist1_hh__ #include <string> #include <vector> #include "manip1.hh" template <class Seq, class Manip> struct value_list_b { const Seq *list; const vector<bool> fields; const char *delem; Manip manip; value_list_b(const Seq &s, const vector<bool> &f, const char *d, Manip m) : list(&s), fields(f), delem(d), manip(m) {} }; template <class Seq1, class Seq2, class Manip> struct equal_list_b { const Seq1 *list1; const Seq2 *list2; const vector<bool> fields; const char *delem; const char *equl; Manip manip; equal_list_b(const Seq1 &s1, const Seq2 &s2, const vector<bool> &f, const char *d, const char *e, Manip m) : list1(&s1), list2(&s2), fields(f), delem(d), equl(e), manip(m) {} }; template <class Seq, class Manip> struct value_list_ba { const Seq *list; const char *delem; Manip manip; value_list_ba(const Seq &s, const char* d, Manip m) : list(&s), delem(d), manip(m) {} }; template <class Seq1, class Seq2, class Manip> struct equal_list_ba { const Seq1 *list1; const Seq2 *list2; const char *delem; const char *equl; Manip manip; equal_list_ba(const Seq1 &s1, const Seq2 &s2, const char *d, const char *e, Manip m) : list1(&s1), list2(&s2), delem(d), equl(e), manip(m) {} }; // template <class Seq, class Manip> ostream& operator << (ostream &o, const value_list_b<Seq, Manip> &cl) { typename Seq::const_iterator i = cl.list->begin(); register int k = 0; for (;;) { if (cl.fields[k]) o << cl.manip << *i; k++; if (++i == cl.list->end()) break; if (cl.fields[k]) o << cl.delem; } return o; } template <class Seq1, class Seq2, class Manip> ostream& operator << (ostream &o, const equal_list_b<Seq1, Seq2, Manip> &el) { typename Seq1::const_iterator i = el.list1->begin(); typename Seq2::const_iterator j = el.list2->begin(); register int k = 0; for (;;) { if (el.fields[k]) o << *i << el.equl << el.manip << *j; k++; j++; if (++i == el.list1->end()) break; if (el.fields[k]) o << el.delem; } return o; } template <class Seq, class Manip> ostream& operator << (ostream &o, const value_list_ba<Seq, Manip> &cl) { typename Seq::const_iterator i = cl.list->begin(); for (;;) { o << cl.manip << *i; if (++i == cl.list->end()) break; o << cl.delem; } return o; } template <class Seq1, class Seq2, class Manip> ostream& operator << (ostream &o, const equal_list_ba<Seq1, Seq2, Manip> &el) { typename Seq1::const_iterator i = el.list1->begin(); typename Seq2::const_iterator j = el.list2->begin(); for (;;) { o << *i << el.equl << el.manip << *j; j++; if (++i == el.list1->end()) break; o << el.delem; } return o; } template <class Iter> class simp_list_b { public: Iter _begin; Iter _end; public: typedef Iter const_iterator; simp_list_b(Iter b, Iter e) : _begin(b), _end(e) {} Iter begin() const {return _begin;} Iter end() const {return _end;} }; // // create vector // void create_vector(int size, vector<bool>& v, bool t0, bool t1=false, bool t2=false, bool t3=false, bool t4=false, bool t5=false, bool t6=false, bool t7=false, bool t8=false, bool t9=false, bool ta=false, bool tb=false, bool tc=false); template <class Container> void create_vector(const Container&c, vector<bool>&v, string s0, string s1, string s2, string s3, string s4, string s5, string s6, string s7, string s8, string s9, string sa, string sb, string sc); // // value list // template <class Seq> inline value_list_ba<Seq,do_nothing_type0> value_list(const Seq &s, const char *d = ",") { return value_list_ba<Seq ,do_nothing_type0> (s, d, do_nothing); } template <class Seq, class Manip> inline value_list_ba<Seq,Manip> value_list(const Seq &s, const char *d, Manip m) { return value_list_ba<Seq,Manip> (s, d, m); } template <class Seq, class Manip> inline value_list_b<Seq,Manip> value_list(const Seq &s, const char *d, Manip m, const vector<bool> &vb) { return value_list_b<Seq, Manip>(s, vb, d, m); } template <class Seq, class Manip> value_list_b<Seq,Manip> value_list(const Seq &s, const char *d, Manip m, bool t0, bool t1=false, bool t2=false, bool t3=false, bool t4=false, bool t5=false, bool t6=false, bool t7=false, bool t8=false, bool t9=false, bool ta=false, bool tb=false, bool tc=false) { vector<bool> vb; create_vector(s.size(), vb, t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,ta,tb,tc); return value_list_b<Seq, Manip>(s, vb, d, m); } template <class Seq> value_list_b<Seq,do_nothing_type0> value_list(const Seq &s, const char *d, bool t0, bool t1=false, bool t2=false, bool t3=false, bool t4=false, bool t5=false, bool t6=false, bool t7=false, bool t8=false, bool t9=false, bool ta=false, bool tb=false, bool tc=false) { vector<bool> vb; create_vector(s.size(), vb, t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,ta,tb,tc); return value_list_b<Seq, do_nothing_type0> (s, vb, d, do_nothing); } template <class Seq> value_list_b<Seq,do_nothing_type0> value_list(const Seq &s, bool t0, bool t1=false, bool t2=false, bool t3=false, bool t4=false, bool t5=false, bool t6=false, bool t7=false, bool t8=false, bool t9=false, bool ta=false, bool tb=false, bool tc=false) { vector<bool> vb; create_vector(s.size(), vb, t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,ta,tb,tc); return value_list_b<Seq, do_nothing_type0> (s, vb, ",",do_nothing); } // // equal list // template <class Seq1, class Seq2> inline equal_list_ba<Seq1,Seq2,do_nothing_type0> equal_list(const Seq1 &s1, const Seq2 &s2, const char *d = ",", const char *e = " = ") { return equal_list_ba<Seq1,Seq2,do_nothing_type0> (s1, s2, d, e, do_nothing); } template <class Seq1, class Seq2, class Manip> inline equal_list_ba<Seq1,Seq2,Manip> equal_list(const Seq1 &s1, const Seq2 &s2, const char *d, const char *e, Manip m) { return equal_list_ba<Seq1,Seq2,Manip> (s1, s2, d, e, m); } template <class Seq1, class Seq2, class Manip> inline equal_list_b<Seq1, Seq2, Manip> equal_list(const Seq1 &s1, const Seq2 &s2, const char *d, const char *e, Manip m, const vector<bool> &vb) { return equal_list_b<Seq1,Seq2,Manip>(s1, s2, vb, d, e, m); } // complete template <class Seq1, class Seq2, class Manip> equal_list_b<Seq1, Seq2, Manip> equal_list(const Seq1 &s1, const Seq2 &s2, const char *d, const char *e, Manip m, bool t0, bool t1=false, bool t2=false, bool t3=false, bool t4=false, bool t5=false, bool t6=false, bool t7=false, bool t8=false, bool t9=false, bool ta=false, bool tb=false, bool tc=false) { vector<bool> vb; create_vector(s1.size(), vb, t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,ta,tb,tc); return equal_list_b<Seq1,Seq2,Manip>(s1, s2, vb, d, e, m); } // delem, equl template <class Seq1, class Seq2> equal_list_b<Seq1, Seq2, do_nothing_type0> equal_list(const Seq1 &s1, const Seq2 &s2, const char *d, const char *e, bool t0, bool t1=false, bool t2=false, bool t3=false, bool t4=false, bool t5=false, bool t6=false, bool t7=false, bool t8=false, bool t9=false, bool ta=false, bool tb=false, bool tc=false) { vector<bool> vb; create_vector(s1.size(), vb, t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,ta,tb,tc); return equal_list_b<Seq1,Seq2,do_nothing_type0> (s1, s2, vb, d, e, do_nothing); } // delem template <class Seq1, class Seq2> equal_list_b<Seq1,Seq2,do_nothing_type0> equal_list(const Seq1 &s1, const Seq2 &s2, const char *d, bool t0, bool t1=false, bool t2=false, bool t3=false, bool t4=false, bool t5=false, bool t6=false, bool t7=false, bool t8=false, bool t9=false, bool ta=false, bool tb=false, bool tc=false) { vector<bool> vb; create_vector(s1.size(), vb, t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,ta,tb,tc); return equal_list_b<Seq1,Seq2,do_nothing_type0> (s1, s2, vb, d, " = ", do_nothing); } // nothing template <class Seq1, class Seq2> equal_list_b<Seq1,Seq2,do_nothing_type0> equal_list(const Seq1 &s1, const Seq2 &s2, bool t0, bool t1=false, bool t2=false, bool t3=false, bool t4=false, bool t5=false, bool t6=false, bool t7=false, bool t8=false, bool t9=false, bool ta=false, bool tb=false, bool tc=false) { vector<bool> vb; create_vector(s1.size(), vb, t0,t1,t2,t3,t4,t5,t6,t7,t8,t9,ta,tb,tc); return equal_list_b<Seq1,Seq2,do_nothing_type0> (s1, s2, vb,"," ," = " ,do_nothing); } #endif |
Added sqlplusint/vallist2.hh.
> > > | 1 2 3 | #include "vallist1.hh" |
Added sqlplusint/vallist3.hh.
> > > | 1 2 3 | #include "vallist2.hh" |