diff --git a/README.md b/README.md index 839029b23..96c16c1f1 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,9 @@ Please provide feedback on https://github.com/JSQLParser/JSqlParser/issues/677, More news can be found here: https://github.com/JSQLParser/JSqlParser/wiki/News. +## Alternatives to JSqlParser? +[**General SQL Parser**](http://www.sqlparser.com/gspjava.php?ref=jsqlparser) looks pretty good, with extended SQL syntax (like PL/SQL and T-SQL) and java + .NET APIs. The tool is commercial (license available online), with a free download option. + ## JSqlParser JSqlParser is a SQL statement parser. It translates SQLs in a traversable hierarchy of Java classes. JSqlParser is not limited to one database but provides support for a lot of specials of Oracle, SqlServer, MySQL, PostgreSQL ... To name some, it has support for Oracles join syntax using (+), PostgreSQLs cast syntax using ::, relational operators like != and so on. @@ -55,6 +58,9 @@ Also I would like to know about needed examples or documentation stuff. ## Extensions in the latest SNAPSHOT version 2.0 +* support for **NEXTVAL FOR** +* changed all source code license headers to reflect the dual license of JSqlParser more correctly +* support of **OPTIMIZE FOR 20 ROWS** like expressions * allowed conditions within **then** and **else** of a **case** statement * **SELECT * FROM mytable WHERE CASE WHEN a = 1 THEN b IN (1,2,3) ELSE c IN (1,2,3) END** * **change of parsing** for not within condition: outer not is represented now by NotExpression diff --git a/pom.xml b/pom.xml index d2a3e3f27..b9d54315a 100644 --- a/pom.xml +++ b/pom.xml @@ -135,11 +135,13 @@ org.codehaus.mojo license-maven-plugin - 1.6 + 1.17 false false false + dual_lgpl_ap2 + ${project.baseUri}/src/license @@ -148,12 +150,6 @@ update-file-header process-sources - - lgpl_v2_1 - - src/main/java - - @@ -401,7 +397,7 @@ - + diff --git a/src/license/dual_lgpl_ap2/header.txt b/src/license/dual_lgpl_ap2/header.txt new file mode 100644 index 000000000..0dab25924 --- /dev/null +++ b/src/license/dual_lgpl_ap2/header.txt @@ -0,0 +1 @@ +Dual licensed under GNU LGPL 2.1 or Apache License 2.0 \ No newline at end of file diff --git a/src/license/dual_lgpl_ap2/license.txt b/src/license/dual_lgpl_ap2/license.txt new file mode 100644 index 000000000..8a2d35be0 --- /dev/null +++ b/src/license/dual_lgpl_ap2/license.txt @@ -0,0 +1,710 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +(This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.) + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + {description} + Copyright (C) {year} {fullname} + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random + Hacker. + + {signature of Ty Coon}, 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + +********************************************************************************************* + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/src/license/licenses.properties b/src/license/licenses.properties new file mode 100644 index 000000000..dfdce951d --- /dev/null +++ b/src/license/licenses.properties @@ -0,0 +1,10 @@ +### +# #%L +# JSQLParser library +# %% +# Copyright (C) 2004 - 2019 JSQLParser +# %% +# Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +# #L% +### +dual_lgpl_ap2=Dual License GNU LGPL 2.1 or Apache License 2.0 diff --git a/src/main/java/net/sf/jsqlparser/JSQLParserException.java b/src/main/java/net/sf/jsqlparser/JSQLParserException.java index 4d03d8e83..8ec0a3be2 100644 --- a/src/main/java/net/sf/jsqlparser/JSQLParserException.java +++ b/src/main/java/net/sf/jsqlparser/JSQLParserException.java @@ -1,32 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser; -/** - * An exception class with stack trace informations - */ public class JSQLParserException extends Exception { - /* The serial class version */ private static final long serialVersionUID = -1099039459759769980L; private Throwable cause = null; diff --git a/src/main/java/net/sf/jsqlparser/expression/Alias.java b/src/main/java/net/sf/jsqlparser/expression/Alias.java index 6de501342..1900e1fdf 100644 --- a/src/main/java/net/sf/jsqlparser/expression/Alias.java +++ b/src/main/java/net/sf/jsqlparser/expression/Alias.java @@ -1,30 +1,14 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2014 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; -/** - * - * @author toben - */ public class Alias { private String name; diff --git a/src/main/java/net/sf/jsqlparser/expression/AllComparisonExpression.java b/src/main/java/net/sf/jsqlparser/expression/AllComparisonExpression.java index 3c596cc1d..85fb4268e 100644 --- a/src/main/java/net/sf/jsqlparser/expression/AllComparisonExpression.java +++ b/src/main/java/net/sf/jsqlparser/expression/AllComparisonExpression.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; diff --git a/src/main/java/net/sf/jsqlparser/expression/AnalyticExpression.java b/src/main/java/net/sf/jsqlparser/expression/AnalyticExpression.java index 09185440b..48767a21e 100644 --- a/src/main/java/net/sf/jsqlparser/expression/AnalyticExpression.java +++ b/src/main/java/net/sf/jsqlparser/expression/AnalyticExpression.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; @@ -27,14 +15,6 @@ import java.util.List; import net.sf.jsqlparser.expression.operators.relational.ExpressionList; -/** - * Analytic function. The name of the function is variable but the parameters following the special - * analytic function path. e.g. row_number() over (order by test). Additional there can be an - * expression for an analytical aggregate like sum(col) or the "all collumns" wildcard like - * count(*). - * - * @author tw - */ public class AnalyticExpression extends ASTNodeAccessImpl implements Expression { private final OrderByClause orderBy = new OrderByClause(); diff --git a/src/main/java/net/sf/jsqlparser/expression/AnalyticType.java b/src/main/java/net/sf/jsqlparser/expression/AnalyticType.java index d9df6f655..d4c8ad0cf 100644 --- a/src/main/java/net/sf/jsqlparser/expression/AnalyticType.java +++ b/src/main/java/net/sf/jsqlparser/expression/AnalyticType.java @@ -1,48 +1,14 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2017 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ -/* - * Copyright (C) 2017 JSQLParser. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ package net.sf.jsqlparser.expression; -/** - * - * @author Tobias Warneke (t.warneke@gmx.net) - */ public enum AnalyticType { OVER, WITHIN_GROUP diff --git a/src/main/java/net/sf/jsqlparser/expression/AnyComparisonExpression.java b/src/main/java/net/sf/jsqlparser/expression/AnyComparisonExpression.java index 9bc270d03..e60584809 100644 --- a/src/main/java/net/sf/jsqlparser/expression/AnyComparisonExpression.java +++ b/src/main/java/net/sf/jsqlparser/expression/AnyComparisonExpression.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; @@ -24,11 +12,6 @@ import net.sf.jsqlparser.parser.ASTNodeAccessImpl; import net.sf.jsqlparser.statement.select.SubSelect; -/** - * Combines ANY and SOME expressions. - * - * @author toben - */ public class AnyComparisonExpression extends ASTNodeAccessImpl implements Expression { private final SubSelect subSelect; diff --git a/src/main/java/net/sf/jsqlparser/expression/AnyType.java b/src/main/java/net/sf/jsqlparser/expression/AnyType.java index 1e5c24519..d279b53d7 100644 --- a/src/main/java/net/sf/jsqlparser/expression/AnyType.java +++ b/src/main/java/net/sf/jsqlparser/expression/AnyType.java @@ -1,48 +1,14 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2015 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ - /* - * Copyright (C) 2015 JSQLParser. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ package net.sf.jsqlparser.expression; -/** - * - * @author toben - */ public enum AnyType { ANY, diff --git a/src/main/java/net/sf/jsqlparser/expression/BinaryExpression.java b/src/main/java/net/sf/jsqlparser/expression/BinaryExpression.java index e0d80983d..5ea74b74b 100644 --- a/src/main/java/net/sf/jsqlparser/expression/BinaryExpression.java +++ b/src/main/java/net/sf/jsqlparser/expression/BinaryExpression.java @@ -1,32 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; import net.sf.jsqlparser.parser.ASTNodeAccessImpl; -/** - * A basic class for binary expressions, that is expressions having a left member and a right member - * which are in turn expressions. - */ public abstract class BinaryExpression extends ASTNodeAccessImpl implements Expression { private Expression leftExpression; diff --git a/src/main/java/net/sf/jsqlparser/expression/CaseExpression.java b/src/main/java/net/sf/jsqlparser/expression/CaseExpression.java index eae3f63a1..db56c3a72 100644 --- a/src/main/java/net/sf/jsqlparser/expression/CaseExpression.java +++ b/src/main/java/net/sf/jsqlparser/expression/CaseExpression.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; @@ -26,37 +14,6 @@ import net.sf.jsqlparser.parser.ASTNodeAccessImpl; import net.sf.jsqlparser.statement.select.PlainSelect; -/** - * CASE/WHEN expression. - * - * Syntax:
- * CASE
- * WHEN condition THEN expression
- * [WHEN condition THEN expression]...
- * [ELSE expression]
- * END
- * 
- * - *
- * or
- *
- * - *
- * CASE expression
- * WHEN condition THEN expression
- * [WHEN condition THEN expression]...
- * [ELSE expression]
- * END
- * 
- * - * See also: https://aurora.vcu.edu/db2help/db2s0/frame3.htm#casexp - * http://sybooks.sybase.com/onlinebooks/group-as/asg1251e /commands/ - * - * @ebt-link;pt=5954?target=%25N%15_52628_START_RESTART_N%25 - * - * - * @author Havard Rast Blok - */ public class CaseExpression extends ASTNodeAccessImpl implements Expression { private Expression switchExpression; @@ -68,16 +25,10 @@ public void accept(ExpressionVisitor expressionVisitor) { expressionVisitor.visit(this); } - /** - * @return Returns the switchExpression. - */ public Expression getSwitchExpression() { return switchExpression; } - /** - * @param switchExpression The switchExpression to set. - */ public void setSwitchExpression(Expression switchExpression) { this.switchExpression = switchExpression; } diff --git a/src/main/java/net/sf/jsqlparser/expression/CastExpression.java b/src/main/java/net/sf/jsqlparser/expression/CastExpression.java index 89cb4c91b..3031a20b0 100644 --- a/src/main/java/net/sf/jsqlparser/expression/CastExpression.java +++ b/src/main/java/net/sf/jsqlparser/expression/CastExpression.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; @@ -24,10 +12,6 @@ import net.sf.jsqlparser.parser.ASTNodeAccessImpl; import net.sf.jsqlparser.statement.create.table.ColDataType; -/** - * - * @author tw - */ public class CastExpression extends ASTNodeAccessImpl implements Expression { private Expression leftExpression; diff --git a/src/main/java/net/sf/jsqlparser/expression/DateTimeLiteralExpression.java b/src/main/java/net/sf/jsqlparser/expression/DateTimeLiteralExpression.java index 769d38bac..8af8b1c18 100644 --- a/src/main/java/net/sf/jsqlparser/expression/DateTimeLiteralExpression.java +++ b/src/main/java/net/sf/jsqlparser/expression/DateTimeLiteralExpression.java @@ -1,50 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2016 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ - /* - * Copyright (C) 2016 JSQLParser. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ package net.sf.jsqlparser.expression; import net.sf.jsqlparser.parser.ASTNodeAccessImpl; -/** - * - * @author toben - */ public class DateTimeLiteralExpression extends ASTNodeAccessImpl implements Expression { private String value; diff --git a/src/main/java/net/sf/jsqlparser/expression/DateValue.java b/src/main/java/net/sf/jsqlparser/expression/DateValue.java index 72be75da1..ab93018c7 100644 --- a/src/main/java/net/sf/jsqlparser/expression/DateValue.java +++ b/src/main/java/net/sf/jsqlparser/expression/DateValue.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; @@ -25,9 +13,6 @@ import java.sql.Date; -/** - * A Date in the form {d 'yyyy-mm-dd'} - */ public class DateValue extends ASTNodeAccessImpl implements Expression { private Date value; diff --git a/src/main/java/net/sf/jsqlparser/expression/DoubleValue.java b/src/main/java/net/sf/jsqlparser/expression/DoubleValue.java index 1d128e637..5fe800a09 100644 --- a/src/main/java/net/sf/jsqlparser/expression/DoubleValue.java +++ b/src/main/java/net/sf/jsqlparser/expression/DoubleValue.java @@ -1,31 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; import net.sf.jsqlparser.parser.ASTNodeAccessImpl; -/** - * Every number with a point or a exponential format is a DoubleValue - */ public class DoubleValue extends ASTNodeAccessImpl implements Expression { private double value; diff --git a/src/main/java/net/sf/jsqlparser/expression/Expression.java b/src/main/java/net/sf/jsqlparser/expression/Expression.java index 45ba5d533..dec9bbf49 100644 --- a/src/main/java/net/sf/jsqlparser/expression/Expression.java +++ b/src/main/java/net/sf/jsqlparser/expression/Expression.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; diff --git a/src/main/java/net/sf/jsqlparser/expression/ExpressionVisitor.java b/src/main/java/net/sf/jsqlparser/expression/ExpressionVisitor.java index b1e4e7463..915bd0fed 100644 --- a/src/main/java/net/sf/jsqlparser/expression/ExpressionVisitor.java +++ b/src/main/java/net/sf/jsqlparser/expression/ExpressionVisitor.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; @@ -41,6 +29,7 @@ import net.sf.jsqlparser.expression.operators.relational.GreaterThanEquals; import net.sf.jsqlparser.expression.operators.relational.InExpression; import net.sf.jsqlparser.expression.operators.relational.IsNullExpression; +import net.sf.jsqlparser.expression.operators.relational.JsonOperator; import net.sf.jsqlparser.expression.operators.relational.LikeExpression; import net.sf.jsqlparser.expression.operators.relational.Matches; import net.sf.jsqlparser.expression.operators.relational.MinorThan; @@ -48,7 +37,6 @@ import net.sf.jsqlparser.expression.operators.relational.NotEqualsTo; import net.sf.jsqlparser.expression.operators.relational.RegExpMatchOperator; import net.sf.jsqlparser.expression.operators.relational.RegExpMySQLOperator; -import net.sf.jsqlparser.expression.operators.relational.JsonOperator; import net.sf.jsqlparser.schema.Column; import net.sf.jsqlparser.statement.select.SubSelect; @@ -167,7 +155,7 @@ public interface ExpressionVisitor { void visit(KeepExpression aexpr); void visit(MySQLGroupConcat groupConcat); - + void visit(ValueListExpression valueList); void visit(RowConstructor rowConstructor); @@ -180,4 +168,6 @@ public interface ExpressionVisitor { public void visit(NotExpression aThis); + public void visit(NextValExpression aThis); + } diff --git a/src/main/java/net/sf/jsqlparser/expression/ExpressionVisitorAdapter.java b/src/main/java/net/sf/jsqlparser/expression/ExpressionVisitorAdapter.java index c5730c9a1..81633841b 100644 --- a/src/main/java/net/sf/jsqlparser/expression/ExpressionVisitorAdapter.java +++ b/src/main/java/net/sf/jsqlparser/expression/ExpressionVisitorAdapter.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2015 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; @@ -24,7 +12,6 @@ import net.sf.jsqlparser.expression.operators.arithmetic.*; import net.sf.jsqlparser.expression.operators.conditional.AndExpression; import net.sf.jsqlparser.expression.operators.conditional.OrExpression; -import net.sf.jsqlparser.expression.operators.relational.JsonOperator; import net.sf.jsqlparser.expression.operators.relational.*; import net.sf.jsqlparser.schema.Column; import net.sf.jsqlparser.statement.select.AllColumns; @@ -353,7 +340,6 @@ public void visit(NamedExpressionList namedExpressionList) { } } - @Override public void visit(MultiExpressionList multiExprList) { for (ExpressionList list : multiExprList.getExprList()) { @@ -424,7 +410,7 @@ public void visit(MySQLGroupConcat groupConcat) { } } } - + @Override public void visit(ValueListExpression valueListExpression) { for (Expression expr : valueListExpression.getExpressionList().getExpressions()) { @@ -505,7 +491,10 @@ public void visit(TimeKeyExpression timeKeyExpression) { @Override public void visit(DateTimeLiteralExpression literal) { + } + @Override + public void visit(NextValExpression nextVal) { } } diff --git a/src/main/java/net/sf/jsqlparser/expression/ExtractExpression.java b/src/main/java/net/sf/jsqlparser/expression/ExtractExpression.java index 013d4039f..4d0e0be30 100644 --- a/src/main/java/net/sf/jsqlparser/expression/ExtractExpression.java +++ b/src/main/java/net/sf/jsqlparser/expression/ExtractExpression.java @@ -1,34 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; import net.sf.jsqlparser.parser.ASTNodeAccessImpl; -/** - * Extract value from date/time expression. The name stores the part - name to get from the - * following date/time expression. - * - * @author tw - */ public class ExtractExpression extends ASTNodeAccessImpl implements Expression { private String name; diff --git a/src/main/java/net/sf/jsqlparser/expression/Function.java b/src/main/java/net/sf/jsqlparser/expression/Function.java index 9925312bf..8021e2c47 100644 --- a/src/main/java/net/sf/jsqlparser/expression/Function.java +++ b/src/main/java/net/sf/jsqlparser/expression/Function.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; @@ -25,9 +13,6 @@ import net.sf.jsqlparser.expression.operators.relational.NamedExpressionList; import net.sf.jsqlparser.parser.ASTNodeAccessImpl; -/** - * A function as MAX,COUNT... - */ public class Function extends ASTNodeAccessImpl implements Expression { private String name; @@ -44,11 +29,6 @@ public void accept(ExpressionVisitor expressionVisitor) { expressionVisitor.visit(this); } - /** - * The name of he function, i.e. "MAX" - * - * @return the name of he function - */ public String getName() { return name; } @@ -57,11 +37,6 @@ public void setName(String string) { name = string; } - /** - * true if the parameter to the function is "*" - * - * @return true if the parameter to the function is "*" - */ public boolean isAllColumns() { return allColumns; } diff --git a/src/main/java/net/sf/jsqlparser/expression/HexValue.java b/src/main/java/net/sf/jsqlparser/expression/HexValue.java index 6401f5484..2bc3b421f 100644 --- a/src/main/java/net/sf/jsqlparser/expression/HexValue.java +++ b/src/main/java/net/sf/jsqlparser/expression/HexValue.java @@ -1,31 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; import net.sf.jsqlparser.parser.ASTNodeAccessImpl; -/** - * Every number with a point or a exponential format is a DoubleValue - */ public class HexValue extends ASTNodeAccessImpl implements Expression { private String stringValue; diff --git a/src/main/java/net/sf/jsqlparser/expression/IntervalExpression.java b/src/main/java/net/sf/jsqlparser/expression/IntervalExpression.java index 7c0503380..9b824dafb 100644 --- a/src/main/java/net/sf/jsqlparser/expression/IntervalExpression.java +++ b/src/main/java/net/sf/jsqlparser/expression/IntervalExpression.java @@ -1,32 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; import net.sf.jsqlparser.parser.ASTNodeAccessImpl; -/** - * - * @author wumpz - */ public class IntervalExpression extends ASTNodeAccessImpl implements Expression { private String parameter = null; diff --git a/src/main/java/net/sf/jsqlparser/expression/JdbcNamedParameter.java b/src/main/java/net/sf/jsqlparser/expression/JdbcNamedParameter.java index f45a8f73a..0c66dd46c 100644 --- a/src/main/java/net/sf/jsqlparser/expression/JdbcNamedParameter.java +++ b/src/main/java/net/sf/jsqlparser/expression/JdbcNamedParameter.java @@ -1,32 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; import net.sf.jsqlparser.parser.ASTNodeAccessImpl; -/** - * - * @author aud - */ public class JdbcNamedParameter extends ASTNodeAccessImpl implements Expression { private String name; diff --git a/src/main/java/net/sf/jsqlparser/expression/JdbcParameter.java b/src/main/java/net/sf/jsqlparser/expression/JdbcParameter.java index a0b7242b0..51bee6d58 100644 --- a/src/main/java/net/sf/jsqlparser/expression/JdbcParameter.java +++ b/src/main/java/net/sf/jsqlparser/expression/JdbcParameter.java @@ -1,31 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; import net.sf.jsqlparser.parser.ASTNodeAccessImpl; -/** - * A '?' in a statement or a ? e.g. ?4 - */ public class JdbcParameter extends ASTNodeAccessImpl implements Expression { private Integer index; diff --git a/src/main/java/net/sf/jsqlparser/expression/JsonExpression.java b/src/main/java/net/sf/jsqlparser/expression/JsonExpression.java index 86cba6e17..7eed1cf12 100644 --- a/src/main/java/net/sf/jsqlparser/expression/JsonExpression.java +++ b/src/main/java/net/sf/jsqlparser/expression/JsonExpression.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2014 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; @@ -27,10 +15,6 @@ import net.sf.jsqlparser.parser.ASTNodeAccessImpl; import net.sf.jsqlparser.schema.Column; -/** - * - * @author toben - */ public class JsonExpression extends ASTNodeAccessImpl implements Expression { private Column column; diff --git a/src/main/java/net/sf/jsqlparser/expression/KeepExpression.java b/src/main/java/net/sf/jsqlparser/expression/KeepExpression.java index 2ee6a8e39..51fb5b8bf 100644 --- a/src/main/java/net/sf/jsqlparser/expression/KeepExpression.java +++ b/src/main/java/net/sf/jsqlparser/expression/KeepExpression.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; @@ -26,14 +14,6 @@ import java.util.List; -/** - * Analytic function. The name of the function is variable but the parameters following the special - * analytic function path. e.g. row_number() over (order by test). Additional there can be an - * expression for an analytical aggregate like sum(col) or the "all collumns" wildcard like - * count(*). - * - * @author tw - */ public class KeepExpression extends ASTNodeAccessImpl implements Expression { private String name; diff --git a/src/main/java/net/sf/jsqlparser/expression/LongValue.java b/src/main/java/net/sf/jsqlparser/expression/LongValue.java index 14b9ed3c3..e5d353008 100644 --- a/src/main/java/net/sf/jsqlparser/expression/LongValue.java +++ b/src/main/java/net/sf/jsqlparser/expression/LongValue.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; @@ -25,9 +13,6 @@ import java.math.BigInteger; -/** - * Every number without a point or an exponential format is a LongValue. - */ public class LongValue extends ASTNodeAccessImpl implements Expression { private String stringValue; diff --git a/src/main/java/net/sf/jsqlparser/expression/MySQLGroupConcat.java b/src/main/java/net/sf/jsqlparser/expression/MySQLGroupConcat.java index 3f3880b2d..68f110711 100644 --- a/src/main/java/net/sf/jsqlparser/expression/MySQLGroupConcat.java +++ b/src/main/java/net/sf/jsqlparser/expression/MySQLGroupConcat.java @@ -1,42 +1,12 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2015 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ - /* - * Copyright (C) 2015 JSQLParser. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ package net.sf.jsqlparser.expression; import java.util.List; @@ -45,10 +15,6 @@ import net.sf.jsqlparser.statement.select.OrderByElement; import net.sf.jsqlparser.statement.select.PlainSelect; -/** - * - * @author toben - */ public class MySQLGroupConcat extends ASTNodeAccessImpl implements Expression { private ExpressionList expressionList; diff --git a/src/main/java/net/sf/jsqlparser/expression/MySQLIndexHint.java b/src/main/java/net/sf/jsqlparser/expression/MySQLIndexHint.java index ca3bb7580..cef60c508 100644 --- a/src/main/java/net/sf/jsqlparser/expression/MySQLIndexHint.java +++ b/src/main/java/net/sf/jsqlparser/expression/MySQLIndexHint.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2017 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; diff --git a/src/main/java/net/sf/jsqlparser/expression/NextValExpression.java b/src/main/java/net/sf/jsqlparser/expression/NextValExpression.java new file mode 100644 index 000000000..50e30553f --- /dev/null +++ b/src/main/java/net/sf/jsqlparser/expression/NextValExpression.java @@ -0,0 +1,43 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ +package net.sf.jsqlparser.expression; + +import java.util.List; +import net.sf.jsqlparser.parser.ASTNodeAccessImpl; + +public class NextValExpression extends ASTNodeAccessImpl implements Expression { + + private List nameList; + + public NextValExpression(List nameList) { + this.nameList = nameList; + } + + public String getName() { + StringBuilder b = new StringBuilder(); + for (String name : nameList) { + if (b.length() > 0) { + b.append("."); + } + b.append(name); + } + return b.toString(); + } + + @Override + public String toString() { + return "NEXTVAL FOR " + getName(); + } + + @Override + public void accept(ExpressionVisitor expressionVisitor) { + expressionVisitor.visit(this); + } +} diff --git a/src/main/java/net/sf/jsqlparser/expression/NotExpression.java b/src/main/java/net/sf/jsqlparser/expression/NotExpression.java index 39f8c058f..3a5d6290e 100644 --- a/src/main/java/net/sf/jsqlparser/expression/NotExpression.java +++ b/src/main/java/net/sf/jsqlparser/expression/NotExpression.java @@ -1,31 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2017 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; import net.sf.jsqlparser.parser.ASTNodeAccessImpl; -/** - * It represents a "-" or "+" before an expression - */ public class NotExpression extends ASTNodeAccessImpl implements Expression { private Expression expression; diff --git a/src/main/java/net/sf/jsqlparser/expression/NullValue.java b/src/main/java/net/sf/jsqlparser/expression/NullValue.java index 211cf7295..b6397030f 100644 --- a/src/main/java/net/sf/jsqlparser/expression/NullValue.java +++ b/src/main/java/net/sf/jsqlparser/expression/NullValue.java @@ -1,31 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; import net.sf.jsqlparser.parser.ASTNodeAccessImpl; -/** - * A "NULL" in a sql statement - */ public class NullValue extends ASTNodeAccessImpl implements Expression { @Override diff --git a/src/main/java/net/sf/jsqlparser/expression/NumericBind.java b/src/main/java/net/sf/jsqlparser/expression/NumericBind.java index 6e535bea3..106b22149 100644 --- a/src/main/java/net/sf/jsqlparser/expression/NumericBind.java +++ b/src/main/java/net/sf/jsqlparser/expression/NumericBind.java @@ -1,32 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2015 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; import net.sf.jsqlparser.parser.ASTNodeAccessImpl; -/** - * - * @author aud - */ public class NumericBind extends ASTNodeAccessImpl implements Expression { private int bindId; diff --git a/src/main/java/net/sf/jsqlparser/expression/OracleHierarchicalExpression.java b/src/main/java/net/sf/jsqlparser/expression/OracleHierarchicalExpression.java index b1f701b8b..9c3b715c7 100644 --- a/src/main/java/net/sf/jsqlparser/expression/OracleHierarchicalExpression.java +++ b/src/main/java/net/sf/jsqlparser/expression/OracleHierarchicalExpression.java @@ -1,32 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; import net.sf.jsqlparser.parser.ASTNodeAccessImpl; -/** - * - * @author toben - */ public class OracleHierarchicalExpression extends ASTNodeAccessImpl implements Expression { private Expression startExpression; diff --git a/src/main/java/net/sf/jsqlparser/expression/OracleHint.java b/src/main/java/net/sf/jsqlparser/expression/OracleHint.java index 58e04532c..3ca915a95 100644 --- a/src/main/java/net/sf/jsqlparser/expression/OracleHint.java +++ b/src/main/java/net/sf/jsqlparser/expression/OracleHint.java @@ -1,36 +1,18 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; -import net.sf.jsqlparser.parser.ASTNodeAccessImpl; - import java.util.regex.Matcher; import java.util.regex.Pattern; +import net.sf.jsqlparser.parser.ASTNodeAccessImpl; -/** - * Oracle Hint Expression - * - * @author valdo - */ public class OracleHint extends ASTNodeAccessImpl implements Expression { private static final Pattern SINGLE_LINE = Pattern.compile("--\\+ *([^ ].*[^ ])"); diff --git a/src/main/java/net/sf/jsqlparser/expression/OrderByClause.java b/src/main/java/net/sf/jsqlparser/expression/OrderByClause.java index 2bfad00a8..ea3f7cc60 100644 --- a/src/main/java/net/sf/jsqlparser/expression/OrderByClause.java +++ b/src/main/java/net/sf/jsqlparser/expression/OrderByClause.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2018 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; @@ -61,4 +49,4 @@ void toStringOrderByElements(StringBuilder b) { } } } -} \ No newline at end of file +} diff --git a/src/main/java/net/sf/jsqlparser/expression/Parenthesis.java b/src/main/java/net/sf/jsqlparser/expression/Parenthesis.java index 71178dd8a..ea6f0e2ce 100644 --- a/src/main/java/net/sf/jsqlparser/expression/Parenthesis.java +++ b/src/main/java/net/sf/jsqlparser/expression/Parenthesis.java @@ -1,31 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; import net.sf.jsqlparser.parser.ASTNodeAccessImpl; -/** - * It represents an expression like "(" expression ")" - */ public class Parenthesis extends ASTNodeAccessImpl implements Expression { private Expression expression; diff --git a/src/main/java/net/sf/jsqlparser/expression/PartitionByClause.java b/src/main/java/net/sf/jsqlparser/expression/PartitionByClause.java index fb26c8e42..8cfe8a0da 100644 --- a/src/main/java/net/sf/jsqlparser/expression/PartitionByClause.java +++ b/src/main/java/net/sf/jsqlparser/expression/PartitionByClause.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2018 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; @@ -43,4 +31,4 @@ void toStringPartitionBy(StringBuilder b) { b.append(" "); } } -} \ No newline at end of file +} diff --git a/src/main/java/net/sf/jsqlparser/expression/RowConstructor.java b/src/main/java/net/sf/jsqlparser/expression/RowConstructor.java index f0b65a09d..16144f248 100644 --- a/src/main/java/net/sf/jsqlparser/expression/RowConstructor.java +++ b/src/main/java/net/sf/jsqlparser/expression/RowConstructor.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2015 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; @@ -24,11 +12,6 @@ import net.sf.jsqlparser.expression.operators.relational.ExpressionList; import net.sf.jsqlparser.parser.ASTNodeAccessImpl; -/** - * Rowconstructor. - * - * @author tw - */ public class RowConstructor extends ASTNodeAccessImpl implements Expression { private ExpressionList exprList; diff --git a/src/main/java/net/sf/jsqlparser/expression/SignedExpression.java b/src/main/java/net/sf/jsqlparser/expression/SignedExpression.java index 8d8569405..637e1ea71 100644 --- a/src/main/java/net/sf/jsqlparser/expression/SignedExpression.java +++ b/src/main/java/net/sf/jsqlparser/expression/SignedExpression.java @@ -1,31 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; import net.sf.jsqlparser.parser.ASTNodeAccessImpl; -/** - * It represents a "-" or "+" or "~" before an expression - */ public class SignedExpression extends ASTNodeAccessImpl implements Expression { private char sign; diff --git a/src/main/java/net/sf/jsqlparser/expression/StringValue.java b/src/main/java/net/sf/jsqlparser/expression/StringValue.java index 6567ea6da..07f5dc729 100644 --- a/src/main/java/net/sf/jsqlparser/expression/StringValue.java +++ b/src/main/java/net/sf/jsqlparser/expression/StringValue.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; @@ -25,22 +13,11 @@ import java.util.List; import net.sf.jsqlparser.parser.ASTNodeAccessImpl; -/** - * A string as in 'example_string' - */ public final class StringValue extends ASTNodeAccessImpl implements Expression { private String value = ""; private String prefix = null; - /* - N - SQLServer Unicode encoding - U - Oracle Unicode encoding - E - Postgresql Unicode encoding - R - Cloud Spanner Raw string - B - Cloud Spanner Byte string - RB - Cloud Spanner Raw Byte string - */ public static final List ALLOWED_PREFIXES = Arrays.asList("N", "U", "E", "R", "B", "RB", "_utf8"); public StringValue(String escapedValue) { diff --git a/src/main/java/net/sf/jsqlparser/expression/TimeKeyExpression.java b/src/main/java/net/sf/jsqlparser/expression/TimeKeyExpression.java index 0e227e37b..b82b88564 100644 --- a/src/main/java/net/sf/jsqlparser/expression/TimeKeyExpression.java +++ b/src/main/java/net/sf/jsqlparser/expression/TimeKeyExpression.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2016 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; diff --git a/src/main/java/net/sf/jsqlparser/expression/TimeValue.java b/src/main/java/net/sf/jsqlparser/expression/TimeValue.java index b1e7fad41..f144efaab 100644 --- a/src/main/java/net/sf/jsqlparser/expression/TimeValue.java +++ b/src/main/java/net/sf/jsqlparser/expression/TimeValue.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; @@ -25,9 +13,6 @@ import java.sql.Time; -/** - * A Time in the form {t 'hh:mm:ss'} - */ public class TimeValue extends ASTNodeAccessImpl implements Expression { private Time value; diff --git a/src/main/java/net/sf/jsqlparser/expression/TimestampValue.java b/src/main/java/net/sf/jsqlparser/expression/TimestampValue.java index dd72705d3..8a674639b 100644 --- a/src/main/java/net/sf/jsqlparser/expression/TimestampValue.java +++ b/src/main/java/net/sf/jsqlparser/expression/TimestampValue.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; @@ -25,9 +13,6 @@ import java.sql.Timestamp; -/** - * A Timestamp in the form {ts 'yyyy-mm-dd hh:mm:ss.f . . .'} - */ public class TimestampValue extends ASTNodeAccessImpl implements Expression { private Timestamp value; diff --git a/src/main/java/net/sf/jsqlparser/expression/UserVariable.java b/src/main/java/net/sf/jsqlparser/expression/UserVariable.java index d751523eb..b3019f544 100644 --- a/src/main/java/net/sf/jsqlparser/expression/UserVariable.java +++ b/src/main/java/net/sf/jsqlparser/expression/UserVariable.java @@ -1,43 +1,21 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2015 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; import net.sf.jsqlparser.parser.ASTNodeAccessImpl; -/** - * Simple uservariables like @test. - * - * @author aud - */ public class UserVariable extends ASTNodeAccessImpl implements Expression { private String name; private boolean doubleAdd = false; - /** - * The name of the parameter - * - * @return the name of the parameter - */ public String getName() { return name; } diff --git a/src/main/java/net/sf/jsqlparser/expression/ValueListExpression.java b/src/main/java/net/sf/jsqlparser/expression/ValueListExpression.java index 175916282..300012fd4 100644 --- a/src/main/java/net/sf/jsqlparser/expression/ValueListExpression.java +++ b/src/main/java/net/sf/jsqlparser/expression/ValueListExpression.java @@ -1,40 +1,17 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2018 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ -/** - * - */ package net.sf.jsqlparser.expression; import net.sf.jsqlparser.expression.operators.relational.ExpressionList; import net.sf.jsqlparser.parser.ASTNodeAccessImpl; -/** - * Models a list of expressions usable as condition.
- * This allows for instance the following expression : - * "[WHERE] (a, b) [OPERATOR] (c, d)" - * where "(a, b)" and "(c, d)" are instances of this class. - * - * @author adriil - */ public class ValueListExpression extends ASTNodeAccessImpl implements Expression { private ExpressionList expressionList; diff --git a/src/main/java/net/sf/jsqlparser/expression/WhenClause.java b/src/main/java/net/sf/jsqlparser/expression/WhenClause.java index c22ee2743..ab51613bb 100644 --- a/src/main/java/net/sf/jsqlparser/expression/WhenClause.java +++ b/src/main/java/net/sf/jsqlparser/expression/WhenClause.java @@ -1,33 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; import net.sf.jsqlparser.parser.ASTNodeAccessImpl; -/** - * A clause of following syntax: WHEN condition THEN expression. Which is part of a CaseExpression. - * - * @author Havard Rast Blok - */ public class WhenClause extends ASTNodeAccessImpl implements Expression { private Expression whenExpression; @@ -38,16 +21,10 @@ public void accept(ExpressionVisitor expressionVisitor) { expressionVisitor.visit(this); } - /** - * @return Returns the thenExpression. - */ public Expression getThenExpression() { return thenExpression; } - /** - * @param thenExpression The thenExpression to set. - */ public void setThenExpression(Expression thenExpression) { this.thenExpression = thenExpression; } diff --git a/src/main/java/net/sf/jsqlparser/expression/WindowElement.java b/src/main/java/net/sf/jsqlparser/expression/WindowElement.java index 7ad4f7a07..0d4930394 100644 --- a/src/main/java/net/sf/jsqlparser/expression/WindowElement.java +++ b/src/main/java/net/sf/jsqlparser/expression/WindowElement.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2014 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; diff --git a/src/main/java/net/sf/jsqlparser/expression/WindowOffset.java b/src/main/java/net/sf/jsqlparser/expression/WindowOffset.java index 3d011e91d..b7c7efb9b 100644 --- a/src/main/java/net/sf/jsqlparser/expression/WindowOffset.java +++ b/src/main/java/net/sf/jsqlparser/expression/WindowOffset.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2014 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; diff --git a/src/main/java/net/sf/jsqlparser/expression/WindowRange.java b/src/main/java/net/sf/jsqlparser/expression/WindowRange.java index d90ace12c..3698f82f1 100644 --- a/src/main/java/net/sf/jsqlparser/expression/WindowRange.java +++ b/src/main/java/net/sf/jsqlparser/expression/WindowRange.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2014 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression; diff --git a/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/Addition.java b/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/Addition.java index e3c6af3d8..eae793e57 100644 --- a/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/Addition.java +++ b/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/Addition.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression.operators.arithmetic; diff --git a/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/BitwiseAnd.java b/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/BitwiseAnd.java index fe998947a..d09a639a7 100644 --- a/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/BitwiseAnd.java +++ b/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/BitwiseAnd.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression.operators.arithmetic; diff --git a/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/BitwiseLeftShift.java b/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/BitwiseLeftShift.java index 402961d34..9e370b8cf 100644 --- a/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/BitwiseLeftShift.java +++ b/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/BitwiseLeftShift.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression.operators.arithmetic; diff --git a/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/BitwiseOr.java b/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/BitwiseOr.java index 1365e1a92..71018b32f 100644 --- a/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/BitwiseOr.java +++ b/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/BitwiseOr.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression.operators.arithmetic; diff --git a/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/BitwiseRightShift.java b/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/BitwiseRightShift.java index aa331de91..5166d5c7b 100644 --- a/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/BitwiseRightShift.java +++ b/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/BitwiseRightShift.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression.operators.arithmetic; diff --git a/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/BitwiseXor.java b/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/BitwiseXor.java index bcc49f15e..8fed7afdd 100644 --- a/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/BitwiseXor.java +++ b/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/BitwiseXor.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression.operators.arithmetic; diff --git a/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/Concat.java b/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/Concat.java index b9981d4e4..b2ede3653 100644 --- a/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/Concat.java +++ b/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/Concat.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression.operators.arithmetic; diff --git a/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/Division.java b/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/Division.java index 201d78ed5..d6097216b 100644 --- a/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/Division.java +++ b/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/Division.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression.operators.arithmetic; diff --git a/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/Modulo.java b/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/Modulo.java index 9b88105a1..459c00ffa 100644 --- a/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/Modulo.java +++ b/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/Modulo.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression.operators.arithmetic; @@ -24,11 +12,6 @@ import net.sf.jsqlparser.expression.BinaryExpression; import net.sf.jsqlparser.expression.ExpressionVisitor; -/** - * Modulo expression (a % b). - * - * @author toben - */ public class Modulo extends BinaryExpression { public Modulo() { diff --git a/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/Multiplication.java b/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/Multiplication.java index 64d5fb55e..dcc193c58 100644 --- a/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/Multiplication.java +++ b/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/Multiplication.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression.operators.arithmetic; diff --git a/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/Subtraction.java b/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/Subtraction.java index 630cf5908..2ebc55bfd 100644 --- a/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/Subtraction.java +++ b/src/main/java/net/sf/jsqlparser/expression/operators/arithmetic/Subtraction.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression.operators.arithmetic; diff --git a/src/main/java/net/sf/jsqlparser/expression/operators/conditional/AndExpression.java b/src/main/java/net/sf/jsqlparser/expression/operators/conditional/AndExpression.java index 4dc1367d1..aab07f292 100644 --- a/src/main/java/net/sf/jsqlparser/expression/operators/conditional/AndExpression.java +++ b/src/main/java/net/sf/jsqlparser/expression/operators/conditional/AndExpression.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression.operators.conditional; diff --git a/src/main/java/net/sf/jsqlparser/expression/operators/conditional/OrExpression.java b/src/main/java/net/sf/jsqlparser/expression/operators/conditional/OrExpression.java index 7a1fc5ddc..35bd21f38 100644 --- a/src/main/java/net/sf/jsqlparser/expression/operators/conditional/OrExpression.java +++ b/src/main/java/net/sf/jsqlparser/expression/operators/conditional/OrExpression.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression.operators.conditional; diff --git a/src/main/java/net/sf/jsqlparser/expression/operators/relational/Between.java b/src/main/java/net/sf/jsqlparser/expression/operators/relational/Between.java index d7561b735..9eb3488c4 100644 --- a/src/main/java/net/sf/jsqlparser/expression/operators/relational/Between.java +++ b/src/main/java/net/sf/jsqlparser/expression/operators/relational/Between.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression.operators.relational; @@ -25,9 +13,6 @@ import net.sf.jsqlparser.expression.ExpressionVisitor; import net.sf.jsqlparser.parser.ASTNodeAccessImpl; -/** - * A "BETWEEN" expr1 expr2 statement - */ public class Between extends ASTNodeAccessImpl implements Expression { private Expression leftExpression; diff --git a/src/main/java/net/sf/jsqlparser/expression/operators/relational/ComparisonOperator.java b/src/main/java/net/sf/jsqlparser/expression/operators/relational/ComparisonOperator.java index 1f0b6f35f..dba543967 100644 --- a/src/main/java/net/sf/jsqlparser/expression/operators/relational/ComparisonOperator.java +++ b/src/main/java/net/sf/jsqlparser/expression/operators/relational/ComparisonOperator.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression.operators.relational; diff --git a/src/main/java/net/sf/jsqlparser/expression/operators/relational/EqualsTo.java b/src/main/java/net/sf/jsqlparser/expression/operators/relational/EqualsTo.java index c23fbd578..b890860d1 100755 --- a/src/main/java/net/sf/jsqlparser/expression/operators/relational/EqualsTo.java +++ b/src/main/java/net/sf/jsqlparser/expression/operators/relational/EqualsTo.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression.operators.relational; diff --git a/src/main/java/net/sf/jsqlparser/expression/operators/relational/ExistsExpression.java b/src/main/java/net/sf/jsqlparser/expression/operators/relational/ExistsExpression.java index b556bcbea..e0b30214f 100644 --- a/src/main/java/net/sf/jsqlparser/expression/operators/relational/ExistsExpression.java +++ b/src/main/java/net/sf/jsqlparser/expression/operators/relational/ExistsExpression.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression.operators.relational; diff --git a/src/main/java/net/sf/jsqlparser/expression/operators/relational/ExpressionList.java b/src/main/java/net/sf/jsqlparser/expression/operators/relational/ExpressionList.java index d831bf070..8221eee14 100644 --- a/src/main/java/net/sf/jsqlparser/expression/operators/relational/ExpressionList.java +++ b/src/main/java/net/sf/jsqlparser/expression/operators/relational/ExpressionList.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression.operators.relational; @@ -27,9 +15,6 @@ import net.sf.jsqlparser.expression.Expression; import net.sf.jsqlparser.statement.select.PlainSelect; -/** - * A list of expressions, as in SELECT A FROM TAB WHERE B IN (expr1,expr2,expr3) - */ public class ExpressionList implements ItemsList { private List expressions; diff --git a/src/main/java/net/sf/jsqlparser/expression/operators/relational/GreaterThan.java b/src/main/java/net/sf/jsqlparser/expression/operators/relational/GreaterThan.java index bb0e44577..f8e4a9d69 100755 --- a/src/main/java/net/sf/jsqlparser/expression/operators/relational/GreaterThan.java +++ b/src/main/java/net/sf/jsqlparser/expression/operators/relational/GreaterThan.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression.operators.relational; diff --git a/src/main/java/net/sf/jsqlparser/expression/operators/relational/GreaterThanEquals.java b/src/main/java/net/sf/jsqlparser/expression/operators/relational/GreaterThanEquals.java index ad30668b2..0a232663c 100755 --- a/src/main/java/net/sf/jsqlparser/expression/operators/relational/GreaterThanEquals.java +++ b/src/main/java/net/sf/jsqlparser/expression/operators/relational/GreaterThanEquals.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression.operators.relational; diff --git a/src/main/java/net/sf/jsqlparser/expression/operators/relational/InExpression.java b/src/main/java/net/sf/jsqlparser/expression/operators/relational/InExpression.java index 06277a979..b57092014 100644 --- a/src/main/java/net/sf/jsqlparser/expression/operators/relational/InExpression.java +++ b/src/main/java/net/sf/jsqlparser/expression/operators/relational/InExpression.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression.operators.relational; diff --git a/src/main/java/net/sf/jsqlparser/expression/operators/relational/IsNullExpression.java b/src/main/java/net/sf/jsqlparser/expression/operators/relational/IsNullExpression.java index a45df7a1b..9a511171d 100644 --- a/src/main/java/net/sf/jsqlparser/expression/operators/relational/IsNullExpression.java +++ b/src/main/java/net/sf/jsqlparser/expression/operators/relational/IsNullExpression.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression.operators.relational; diff --git a/src/main/java/net/sf/jsqlparser/expression/operators/relational/ItemsList.java b/src/main/java/net/sf/jsqlparser/expression/operators/relational/ItemsList.java index 655d5f902..99425a540 100644 --- a/src/main/java/net/sf/jsqlparser/expression/operators/relational/ItemsList.java +++ b/src/main/java/net/sf/jsqlparser/expression/operators/relational/ItemsList.java @@ -1,29 +1,14 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression.operators.relational; -/** - * Values of an "INSERT" statement (for example a SELECT or a list of expressions) - */ public interface ItemsList { void accept(ItemsListVisitor itemsListVisitor); diff --git a/src/main/java/net/sf/jsqlparser/expression/operators/relational/ItemsListVisitor.java b/src/main/java/net/sf/jsqlparser/expression/operators/relational/ItemsListVisitor.java index 44a35c29b..ced59be3a 100644 --- a/src/main/java/net/sf/jsqlparser/expression/operators/relational/ItemsListVisitor.java +++ b/src/main/java/net/sf/jsqlparser/expression/operators/relational/ItemsListVisitor.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression.operators.relational; diff --git a/src/main/java/net/sf/jsqlparser/expression/operators/relational/ItemsListVisitorAdapter.java b/src/main/java/net/sf/jsqlparser/expression/operators/relational/ItemsListVisitorAdapter.java index d821d81db..49deff775 100644 --- a/src/main/java/net/sf/jsqlparser/expression/operators/relational/ItemsListVisitorAdapter.java +++ b/src/main/java/net/sf/jsqlparser/expression/operators/relational/ItemsListVisitorAdapter.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression.operators.relational; diff --git a/src/main/java/net/sf/jsqlparser/expression/operators/relational/JsonOperator.java b/src/main/java/net/sf/jsqlparser/expression/operators/relational/JsonOperator.java index 997961250..e10c71ea1 100644 --- a/src/main/java/net/sf/jsqlparser/expression/operators/relational/JsonOperator.java +++ b/src/main/java/net/sf/jsqlparser/expression/operators/relational/JsonOperator.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression.operators.relational; diff --git a/src/main/java/net/sf/jsqlparser/expression/operators/relational/LikeExpression.java b/src/main/java/net/sf/jsqlparser/expression/operators/relational/LikeExpression.java index 12cf8845a..4582ed0b8 100644 --- a/src/main/java/net/sf/jsqlparser/expression/operators/relational/LikeExpression.java +++ b/src/main/java/net/sf/jsqlparser/expression/operators/relational/LikeExpression.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression.operators.relational; diff --git a/src/main/java/net/sf/jsqlparser/expression/operators/relational/Matches.java b/src/main/java/net/sf/jsqlparser/expression/operators/relational/Matches.java index 2da8a0fdc..4b3d305a2 100755 --- a/src/main/java/net/sf/jsqlparser/expression/operators/relational/Matches.java +++ b/src/main/java/net/sf/jsqlparser/expression/operators/relational/Matches.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression.operators.relational; diff --git a/src/main/java/net/sf/jsqlparser/expression/operators/relational/MinorThan.java b/src/main/java/net/sf/jsqlparser/expression/operators/relational/MinorThan.java index 950733ad1..182170f14 100755 --- a/src/main/java/net/sf/jsqlparser/expression/operators/relational/MinorThan.java +++ b/src/main/java/net/sf/jsqlparser/expression/operators/relational/MinorThan.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression.operators.relational; diff --git a/src/main/java/net/sf/jsqlparser/expression/operators/relational/MinorThanEquals.java b/src/main/java/net/sf/jsqlparser/expression/operators/relational/MinorThanEquals.java index 39dd64766..641fe2384 100755 --- a/src/main/java/net/sf/jsqlparser/expression/operators/relational/MinorThanEquals.java +++ b/src/main/java/net/sf/jsqlparser/expression/operators/relational/MinorThanEquals.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression.operators.relational; diff --git a/src/main/java/net/sf/jsqlparser/expression/operators/relational/MultiExpressionList.java b/src/main/java/net/sf/jsqlparser/expression/operators/relational/MultiExpressionList.java index 0ff7f477b..ab242af57 100644 --- a/src/main/java/net/sf/jsqlparser/expression/operators/relational/MultiExpressionList.java +++ b/src/main/java/net/sf/jsqlparser/expression/operators/relational/MultiExpressionList.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression.operators.relational; @@ -27,12 +15,6 @@ import java.util.List; import net.sf.jsqlparser.expression.Expression; -/** - * A list of ExpressionList items. e.g. multi values of insert statements. This one allows only - * equally sized ExpressionList. - * - * @author toben - */ public class MultiExpressionList implements ItemsList { private List exprList; diff --git a/src/main/java/net/sf/jsqlparser/expression/operators/relational/NamedExpressionList.java b/src/main/java/net/sf/jsqlparser/expression/operators/relational/NamedExpressionList.java index 3f9e1ca32..a176ce710 100644 --- a/src/main/java/net/sf/jsqlparser/expression/operators/relational/NamedExpressionList.java +++ b/src/main/java/net/sf/jsqlparser/expression/operators/relational/NamedExpressionList.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression.operators.relational; @@ -26,10 +14,6 @@ import net.sf.jsqlparser.expression.Expression; -/** - * A list of named expressions, as in - * as in select substr('xyzzy' from 2 for 3) - */ public class NamedExpressionList implements ItemsList { private List expressions; diff --git a/src/main/java/net/sf/jsqlparser/expression/operators/relational/NotEqualsTo.java b/src/main/java/net/sf/jsqlparser/expression/operators/relational/NotEqualsTo.java index 3ff92d3f5..14749fd8a 100644 --- a/src/main/java/net/sf/jsqlparser/expression/operators/relational/NotEqualsTo.java +++ b/src/main/java/net/sf/jsqlparser/expression/operators/relational/NotEqualsTo.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression.operators.relational; diff --git a/src/main/java/net/sf/jsqlparser/expression/operators/relational/OldOracleJoinBinaryExpression.java b/src/main/java/net/sf/jsqlparser/expression/operators/relational/OldOracleJoinBinaryExpression.java index c620a62e9..f32df1d88 100644 --- a/src/main/java/net/sf/jsqlparser/expression/operators/relational/OldOracleJoinBinaryExpression.java +++ b/src/main/java/net/sf/jsqlparser/expression/operators/relational/OldOracleJoinBinaryExpression.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression.operators.relational; diff --git a/src/main/java/net/sf/jsqlparser/expression/operators/relational/RegExpMatchOperator.java b/src/main/java/net/sf/jsqlparser/expression/operators/relational/RegExpMatchOperator.java index 27f0fff32..ce1b4295a 100644 --- a/src/main/java/net/sf/jsqlparser/expression/operators/relational/RegExpMatchOperator.java +++ b/src/main/java/net/sf/jsqlparser/expression/operators/relational/RegExpMatchOperator.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression.operators.relational; diff --git a/src/main/java/net/sf/jsqlparser/expression/operators/relational/RegExpMatchOperatorType.java b/src/main/java/net/sf/jsqlparser/expression/operators/relational/RegExpMatchOperatorType.java index 764ce845a..69087eb6d 100644 --- a/src/main/java/net/sf/jsqlparser/expression/operators/relational/RegExpMatchOperatorType.java +++ b/src/main/java/net/sf/jsqlparser/expression/operators/relational/RegExpMatchOperatorType.java @@ -1,31 +1,14 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2014 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression.operators.relational; -/** - * PostgresSQL match operators. - * - * @author toben - */ public enum RegExpMatchOperatorType { MATCH_CASESENSITIVE, MATCH_CASEINSENSITIVE, diff --git a/src/main/java/net/sf/jsqlparser/expression/operators/relational/RegExpMySQLOperator.java b/src/main/java/net/sf/jsqlparser/expression/operators/relational/RegExpMySQLOperator.java index 4ebe454fb..6f4761efe 100644 --- a/src/main/java/net/sf/jsqlparser/expression/operators/relational/RegExpMySQLOperator.java +++ b/src/main/java/net/sf/jsqlparser/expression/operators/relational/RegExpMySQLOperator.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2014 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression.operators.relational; diff --git a/src/main/java/net/sf/jsqlparser/expression/operators/relational/SupportsOldOracleJoinSyntax.java b/src/main/java/net/sf/jsqlparser/expression/operators/relational/SupportsOldOracleJoinSyntax.java index 970bb2ef6..05e9839c8 100644 --- a/src/main/java/net/sf/jsqlparser/expression/operators/relational/SupportsOldOracleJoinSyntax.java +++ b/src/main/java/net/sf/jsqlparser/expression/operators/relational/SupportsOldOracleJoinSyntax.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression.operators.relational; diff --git a/src/main/java/net/sf/jsqlparser/parser/ASTNodeAccess.java b/src/main/java/net/sf/jsqlparser/parser/ASTNodeAccess.java index 2d540d39a..46914102b 100644 --- a/src/main/java/net/sf/jsqlparser/parser/ASTNodeAccess.java +++ b/src/main/java/net/sf/jsqlparser/parser/ASTNodeAccess.java @@ -1,48 +1,14 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2015 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ - /* - * Copyright (C) 2015 JSQLParser. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ package net.sf.jsqlparser.parser; -/** - * - * @author toben - */ public interface ASTNodeAccess { SimpleNode getASTNode(); diff --git a/src/main/java/net/sf/jsqlparser/parser/ASTNodeAccessImpl.java b/src/main/java/net/sf/jsqlparser/parser/ASTNodeAccessImpl.java index 2ade908e5..2bf503ac1 100644 --- a/src/main/java/net/sf/jsqlparser/parser/ASTNodeAccessImpl.java +++ b/src/main/java/net/sf/jsqlparser/parser/ASTNodeAccessImpl.java @@ -1,30 +1,14 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2015 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.parser; -/** - * - * @author toben - */ public class ASTNodeAccessImpl implements ASTNodeAccess { private SimpleNode node; diff --git a/src/main/java/net/sf/jsqlparser/parser/BaseToken.java b/src/main/java/net/sf/jsqlparser/parser/BaseToken.java index 68b9c63ca..6972f0a5c 100644 --- a/src/main/java/net/sf/jsqlparser/parser/BaseToken.java +++ b/src/main/java/net/sf/jsqlparser/parser/BaseToken.java @@ -1,49 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2017 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ - /* - * Copyright (C) 2017 JSQLParser. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ package net.sf.jsqlparser.parser; -/** - * - * @author toben - */ public class BaseToken { + public int absoluteBegin = 0; public int absoluteEnd = 0; } diff --git a/src/main/java/net/sf/jsqlparser/parser/CCJSqlParserManager.java b/src/main/java/net/sf/jsqlparser/parser/CCJSqlParserManager.java index 4c122d157..fb0bf2115 100644 --- a/src/main/java/net/sf/jsqlparser/parser/CCJSqlParserManager.java +++ b/src/main/java/net/sf/jsqlparser/parser/CCJSqlParserManager.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.parser; @@ -26,9 +14,6 @@ import net.sf.jsqlparser.JSQLParserException; import net.sf.jsqlparser.statement.Statement; -/** - * A JSqlParser implementation that uses a parser generated by JavaCC - */ public class CCJSqlParserManager implements JSqlParser { @Override diff --git a/src/main/java/net/sf/jsqlparser/parser/CCJSqlParserUtil.java b/src/main/java/net/sf/jsqlparser/parser/CCJSqlParserUtil.java index a5f889421..441ec4f16 100644 --- a/src/main/java/net/sf/jsqlparser/parser/CCJSqlParserUtil.java +++ b/src/main/java/net/sf/jsqlparser/parser/CCJSqlParserUtil.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.parser; @@ -28,11 +16,6 @@ import net.sf.jsqlparser.statement.Statement; import net.sf.jsqlparser.statement.Statements; -/** - * Toolfunctions to start and use JSqlParser. - * - * @author toben - */ public final class CCJSqlParserUtil { private CCJSqlParserUtil() { @@ -84,13 +67,6 @@ public static Statement parse(InputStream is, String encoding) throws JSQLParser } } - /** - * Parse an expression. - * - * @param expression - * @return - * @throws JSQLParserException - */ public static Expression parseExpression(String expression) throws JSQLParserException { return parseExpression(expression, true); } @@ -110,13 +86,6 @@ public static Expression parseExpression(String expression, boolean allowPartial } } - /** - * Parse an conditional expression. This is the expression after a where clause. - * - * @param condExpr - * @return - * @throws JSQLParserException - */ public static Expression parseCondExpression(String condExpr) throws JSQLParserException { return parseCondExpression(condExpr, true); } diff --git a/src/main/java/net/sf/jsqlparser/parser/JSqlParser.java b/src/main/java/net/sf/jsqlparser/parser/JSqlParser.java index b7e4e25dc..8a2aa9538 100644 --- a/src/main/java/net/sf/jsqlparser/parser/JSqlParser.java +++ b/src/main/java/net/sf/jsqlparser/parser/JSqlParser.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.parser; @@ -26,9 +14,6 @@ import net.sf.jsqlparser.JSQLParserException; import net.sf.jsqlparser.statement.Statement; -/** - * Every parser must implements this interface - */ public interface JSqlParser { Statement parse(Reader statementReader) throws JSQLParserException; diff --git a/src/main/java/net/sf/jsqlparser/parser/SimpleCharStream.java b/src/main/java/net/sf/jsqlparser/parser/SimpleCharStream.java index 7508d25ec..917c4e9da 100644 --- a/src/main/java/net/sf/jsqlparser/parser/SimpleCharStream.java +++ b/src/main/java/net/sf/jsqlparser/parser/SimpleCharStream.java @@ -1,32 +1,14 @@ -/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 7.0 */ - /* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ - /* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2014 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.parser; -/** - * An implementation of interface CharStream, where the stream is assumed to - * contain only ASCII characters (without unicode processing). - */ public class SimpleCharStream { /** diff --git a/src/main/java/net/sf/jsqlparser/schema/Column.java b/src/main/java/net/sf/jsqlparser/schema/Column.java index ea555cb57..8c2516049 100644 --- a/src/main/java/net/sf/jsqlparser/schema/Column.java +++ b/src/main/java/net/sf/jsqlparser/schema/Column.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.schema; @@ -25,9 +13,6 @@ import net.sf.jsqlparser.expression.*; import net.sf.jsqlparser.parser.ASTNodeAccessImpl; -/** - * A column. It can have the table name it belongs to. - */ public final class Column extends ASTNodeAccessImpl implements Expression, MultiPartName { private Table table; @@ -72,12 +57,6 @@ public String getFullyQualifiedName() { return getName(false); } - /** - * Get name with out without using aliases. - * - * @param aliases - * @return - */ public String getName(boolean aliases) { StringBuilder fqn = new StringBuilder(); diff --git a/src/main/java/net/sf/jsqlparser/schema/Database.java b/src/main/java/net/sf/jsqlparser/schema/Database.java index 5035b4fdd..9ec4b5394 100644 --- a/src/main/java/net/sf/jsqlparser/schema/Database.java +++ b/src/main/java/net/sf/jsqlparser/schema/Database.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.schema; diff --git a/src/main/java/net/sf/jsqlparser/schema/MultiPartName.java b/src/main/java/net/sf/jsqlparser/schema/MultiPartName.java index b238c755d..57960855b 100644 --- a/src/main/java/net/sf/jsqlparser/schema/MultiPartName.java +++ b/src/main/java/net/sf/jsqlparser/schema/MultiPartName.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.schema; diff --git a/src/main/java/net/sf/jsqlparser/schema/Server.java b/src/main/java/net/sf/jsqlparser/schema/Server.java index 7b83ab678..ea983b601 100644 --- a/src/main/java/net/sf/jsqlparser/schema/Server.java +++ b/src/main/java/net/sf/jsqlparser/schema/Server.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.schema; diff --git a/src/main/java/net/sf/jsqlparser/schema/Table.java b/src/main/java/net/sf/jsqlparser/schema/Table.java index 36ea7e98a..69bb38c67 100644 --- a/src/main/java/net/sf/jsqlparser/schema/Table.java +++ b/src/main/java/net/sf/jsqlparser/schema/Table.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.schema; @@ -28,9 +16,6 @@ import net.sf.jsqlparser.parser.ASTNodeAccessImpl; import net.sf.jsqlparser.statement.select.*; -/** - * A table. It can have an alias and the schema name it belongs to. - */ public class Table extends ASTNodeAccessImpl implements FromItem, MultiPartName { // private Database database; @@ -51,19 +36,18 @@ public Table() { } public Table(String name) { - setIndex(NAME_IDX, name); + setName(name); } public Table(String schemaName, String name) { - setIndex(NAME_IDX, name); - setIndex(SCHEMA_IDX, schemaName); + setName(name); + setSchemaName(schemaName); } public Table(Database database, String schemaName, String name) { - setIndex(NAME_IDX, name); - setIndex(SCHEMA_IDX, schemaName); - setIndex(DATABASE_IDX, database.getDatabaseName()); - setIndex(SERVER_IDX, database.getServer().getFullyQualifiedName()); + setName(name); + setSchemaName(schemaName); + setDatabase(database); } public Table(List partItems) { @@ -77,6 +61,7 @@ public Database getDatabase() { public void setDatabase(Database database) { setIndex(DATABASE_IDX, database.getDatabaseName()); + setIndex(SERVER_IDX, database.getServer().getFullyQualifiedName()); } public String getSchemaName() { @@ -173,3 +158,4 @@ public String toString() { + ((hint != null) ? hint.toString() : ""); } } + diff --git a/src/main/java/net/sf/jsqlparser/statement/Block.java b/src/main/java/net/sf/jsqlparser/statement/Block.java index 8d042a859..8d41cc745 100644 --- a/src/main/java/net/sf/jsqlparser/statement/Block.java +++ b/src/main/java/net/sf/jsqlparser/statement/Block.java @@ -1,48 +1,14 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2018 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ - /* - * Copyright (C) 2018 JSQLParser. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ package net.sf.jsqlparser.statement; -/** - * - * @author Tobias Warneke (t.warneke@gmx.net) - */ public class Block implements Statement { private Statements statements; diff --git a/src/main/java/net/sf/jsqlparser/statement/Commit.java b/src/main/java/net/sf/jsqlparser/statement/Commit.java index 66116a4bc..f33a36ae1 100644 --- a/src/main/java/net/sf/jsqlparser/statement/Commit.java +++ b/src/main/java/net/sf/jsqlparser/statement/Commit.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2017 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement; diff --git a/src/main/java/net/sf/jsqlparser/statement/DescribeStatement.java b/src/main/java/net/sf/jsqlparser/statement/DescribeStatement.java index 70223f5fd..26bf26dcd 100644 --- a/src/main/java/net/sf/jsqlparser/statement/DescribeStatement.java +++ b/src/main/java/net/sf/jsqlparser/statement/DescribeStatement.java @@ -1,32 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement; import net.sf.jsqlparser.schema.Table; -/** - * - * @author tw - */ public class DescribeStatement implements Statement { private Table table; diff --git a/src/main/java/net/sf/jsqlparser/statement/ExplainStatement.java b/src/main/java/net/sf/jsqlparser/statement/ExplainStatement.java index 8920461ce..35c8c3779 100644 --- a/src/main/java/net/sf/jsqlparser/statement/ExplainStatement.java +++ b/src/main/java/net/sf/jsqlparser/statement/ExplainStatement.java @@ -1,32 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement; import net.sf.jsqlparser.statement.select.Select; -/** - * - * @author tw - */ public class ExplainStatement implements Statement { private Select select; diff --git a/src/main/java/net/sf/jsqlparser/statement/SetStatement.java b/src/main/java/net/sf/jsqlparser/statement/SetStatement.java index 3b55691ca..8350f007a 100644 --- a/src/main/java/net/sf/jsqlparser/statement/SetStatement.java +++ b/src/main/java/net/sf/jsqlparser/statement/SetStatement.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement; @@ -25,10 +13,6 @@ import java.util.List; import net.sf.jsqlparser.expression.Expression; -/** - * - * @author toben - */ public final class SetStatement implements Statement { private final List values = new ArrayList<>(); diff --git a/src/main/java/net/sf/jsqlparser/statement/ShowStatement.java b/src/main/java/net/sf/jsqlparser/statement/ShowStatement.java index 82b682ea4..aa4a1fe20 100644 --- a/src/main/java/net/sf/jsqlparser/statement/ShowStatement.java +++ b/src/main/java/net/sf/jsqlparser/statement/ShowStatement.java @@ -1,30 +1,14 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2017 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement; -/** - * - * @author oshai - */ public class ShowStatement implements Statement { private String tableName; diff --git a/src/main/java/net/sf/jsqlparser/statement/Statement.java b/src/main/java/net/sf/jsqlparser/statement/Statement.java index bf45b83cb..e90f8746b 100644 --- a/src/main/java/net/sf/jsqlparser/statement/Statement.java +++ b/src/main/java/net/sf/jsqlparser/statement/Statement.java @@ -1,29 +1,14 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement; -/** - * An operation on the db (SELECT, UPDATE ecc.) - */ public interface Statement { void accept(StatementVisitor statementVisitor); diff --git a/src/main/java/net/sf/jsqlparser/statement/StatementVisitor.java b/src/main/java/net/sf/jsqlparser/statement/StatementVisitor.java index af1280a61..ced68c942 100644 --- a/src/main/java/net/sf/jsqlparser/statement/StatementVisitor.java +++ b/src/main/java/net/sf/jsqlparser/statement/StatementVisitor.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement; diff --git a/src/main/java/net/sf/jsqlparser/statement/StatementVisitorAdapter.java b/src/main/java/net/sf/jsqlparser/statement/StatementVisitorAdapter.java index 003310cda..73f7fdb04 100644 --- a/src/main/java/net/sf/jsqlparser/statement/StatementVisitorAdapter.java +++ b/src/main/java/net/sf/jsqlparser/statement/StatementVisitorAdapter.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement; diff --git a/src/main/java/net/sf/jsqlparser/statement/Statements.java b/src/main/java/net/sf/jsqlparser/statement/Statements.java index 1d9f38ebe..a0f7989c3 100644 --- a/src/main/java/net/sf/jsqlparser/statement/Statements.java +++ b/src/main/java/net/sf/jsqlparser/statement/Statements.java @@ -1,32 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2014 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement; import java.util.List; -/** - * - * @author toben - */ public class Statements { private List statements; diff --git a/src/main/java/net/sf/jsqlparser/statement/UseStatement.java b/src/main/java/net/sf/jsqlparser/statement/UseStatement.java index c30308907..37d5e1505 100644 --- a/src/main/java/net/sf/jsqlparser/statement/UseStatement.java +++ b/src/main/java/net/sf/jsqlparser/statement/UseStatement.java @@ -1,30 +1,14 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2017 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement; -/** - * - * @author toben - */ public class UseStatement implements Statement { private String name; diff --git a/src/main/java/net/sf/jsqlparser/statement/alter/Alter.java b/src/main/java/net/sf/jsqlparser/statement/alter/Alter.java index b0ea9342f..944284f64 100644 --- a/src/main/java/net/sf/jsqlparser/statement/alter/Alter.java +++ b/src/main/java/net/sf/jsqlparser/statement/alter/Alter.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.alter; @@ -29,10 +17,6 @@ import net.sf.jsqlparser.statement.Statement; import net.sf.jsqlparser.statement.StatementVisitor; -/** - * - * @author toben & wrobstory - */ public class Alter implements Statement { private Table table; diff --git a/src/main/java/net/sf/jsqlparser/statement/alter/AlterExpression.java b/src/main/java/net/sf/jsqlparser/statement/alter/AlterExpression.java index 224f50107..0c5dfc67c 100644 --- a/src/main/java/net/sf/jsqlparser/statement/alter/AlterExpression.java +++ b/src/main/java/net/sf/jsqlparser/statement/alter/AlterExpression.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2016 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.alter; @@ -30,14 +18,12 @@ import net.sf.jsqlparser.statement.create.table.Index; import net.sf.jsqlparser.statement.select.PlainSelect; -/** - * - * @author toben & wrobstory - */ public class AlterExpression { private AlterOperation operation; + private String optionalSpecifier; private String columnName; + private String columnOldName; //private ColDataType dataType; private List colDataTypeList; @@ -66,6 +52,14 @@ public void setOperation(AlterOperation operation) { this.operation = operation; } + public String getOptionalSpecifier() { + return optionalSpecifier; + } + + public void setOptionalSpecifier(String optionalSpecifier) { + this.optionalSpecifier = optionalSpecifier; + } + public boolean isOnDeleteCascade() { return onDeleteCascade; } @@ -137,6 +131,14 @@ public void setColumnName(String columnName) { this.columnName = columnName; } + public String getColOldName() { + return columnOldName; + } + + public void setColOldName(String columnOldName) { + this.columnOldName = columnOldName; + } + public String getConstraintName() { return this.constraintName; } @@ -214,7 +216,12 @@ public String toString() { if (columnName != null) { b.append("COLUMN ").append(columnName); } else if (getColDataTypeList() != null) { - if (colDataTypeList.size() > 1) { + if(operation == AlterOperation.CHANGE) { + if(optionalSpecifier != null) { + b.append(optionalSpecifier).append(" "); + } + b.append(columnOldName).append(" "); + } else if (colDataTypeList.size() > 1) { b.append("("); } else { b.append("COLUMN "); diff --git a/src/main/java/net/sf/jsqlparser/statement/alter/AlterOperation.java b/src/main/java/net/sf/jsqlparser/statement/alter/AlterOperation.java index 3b0d28185..728ab5f7d 100644 --- a/src/main/java/net/sf/jsqlparser/statement/alter/AlterOperation.java +++ b/src/main/java/net/sf/jsqlparser/statement/alter/AlterOperation.java @@ -1,30 +1,14 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2016 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.alter; -/** - * - * @author toben - */ public enum AlterOperation { ADD, ALTER, DROP, MODIFY, CHANGE; } diff --git a/src/main/java/net/sf/jsqlparser/statement/alter/ConstraintState.java b/src/main/java/net/sf/jsqlparser/statement/alter/ConstraintState.java index 878566b1e..432173a85 100644 --- a/src/main/java/net/sf/jsqlparser/statement/alter/ConstraintState.java +++ b/src/main/java/net/sf/jsqlparser/statement/alter/ConstraintState.java @@ -1,30 +1,13 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2017 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.alter; -/** - * Based on https://docs.oracle.com/cd/B28359_01/server.111/b28286/clauses002.htm#i1002273 - * - * @author Christophe Moine - */ public interface ConstraintState { } diff --git a/src/main/java/net/sf/jsqlparser/statement/alter/DeferrableConstraint.java b/src/main/java/net/sf/jsqlparser/statement/alter/DeferrableConstraint.java index c249b7d8a..15bba4a11 100644 --- a/src/main/java/net/sf/jsqlparser/statement/alter/DeferrableConstraint.java +++ b/src/main/java/net/sf/jsqlparser/statement/alter/DeferrableConstraint.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2017 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.alter; diff --git a/src/main/java/net/sf/jsqlparser/statement/alter/EnableConstraint.java b/src/main/java/net/sf/jsqlparser/statement/alter/EnableConstraint.java index 1bdcd7ec2..9573a1b6b 100644 --- a/src/main/java/net/sf/jsqlparser/statement/alter/EnableConstraint.java +++ b/src/main/java/net/sf/jsqlparser/statement/alter/EnableConstraint.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2017 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.alter; diff --git a/src/main/java/net/sf/jsqlparser/statement/alter/ValidateConstraint.java b/src/main/java/net/sf/jsqlparser/statement/alter/ValidateConstraint.java index c4241fa4e..36d000a9c 100644 --- a/src/main/java/net/sf/jsqlparser/statement/alter/ValidateConstraint.java +++ b/src/main/java/net/sf/jsqlparser/statement/alter/ValidateConstraint.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2017 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.alter; diff --git a/src/main/java/net/sf/jsqlparser/statement/comment/Comment.java b/src/main/java/net/sf/jsqlparser/statement/comment/Comment.java index c01856a69..b44fbf12b 100755 --- a/src/main/java/net/sf/jsqlparser/statement/comment/Comment.java +++ b/src/main/java/net/sf/jsqlparser/statement/comment/Comment.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2017 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.comment; diff --git a/src/main/java/net/sf/jsqlparser/statement/create/index/CreateIndex.java b/src/main/java/net/sf/jsqlparser/statement/create/index/CreateIndex.java index 5b590ea45..19f71bfb3 100644 --- a/src/main/java/net/sf/jsqlparser/statement/create/index/CreateIndex.java +++ b/src/main/java/net/sf/jsqlparser/statement/create/index/CreateIndex.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.create.index; @@ -27,11 +15,6 @@ import java.util.*; -/** - * A "CREATE INDEX" statement - * - * @author Raymond Augé - */ public class CreateIndex implements Statement { private Table table; @@ -42,9 +25,6 @@ public void accept(StatementVisitor statementVisitor) { statementVisitor.visit(this); } - /** - * The index to be created - */ public Index getIndex() { return index; } @@ -53,9 +33,6 @@ public void setIndex(Index index) { this.index = index; } - /** - * The table on which the index is to be created - */ public Table getTable() { return table; } diff --git a/src/main/java/net/sf/jsqlparser/statement/create/table/CheckConstraint.java b/src/main/java/net/sf/jsqlparser/statement/create/table/CheckConstraint.java index 8d2c14cfb..30dfbc424 100644 --- a/src/main/java/net/sf/jsqlparser/statement/create/table/CheckConstraint.java +++ b/src/main/java/net/sf/jsqlparser/statement/create/table/CheckConstraint.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.create.table; @@ -24,12 +12,6 @@ import net.sf.jsqlparser.expression.Expression; import net.sf.jsqlparser.schema.Table; -/** - * Table Check Constraint Eg. ' CONSTRAINT less_than_ten CHECK (count < 10) ' @au - * - * - * thor mw - */ public class CheckConstraint extends NamedConstraint { private Table table; diff --git a/src/main/java/net/sf/jsqlparser/statement/create/table/ColDataType.java b/src/main/java/net/sf/jsqlparser/statement/create/table/ColDataType.java index fafb4f06d..de4148961 100644 --- a/src/main/java/net/sf/jsqlparser/statement/create/table/ColDataType.java +++ b/src/main/java/net/sf/jsqlparser/statement/create/table/ColDataType.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.create.table; diff --git a/src/main/java/net/sf/jsqlparser/statement/create/table/ColumnDefinition.java b/src/main/java/net/sf/jsqlparser/statement/create/table/ColumnDefinition.java index c43adcbf2..91e6640b0 100644 --- a/src/main/java/net/sf/jsqlparser/statement/create/table/ColumnDefinition.java +++ b/src/main/java/net/sf/jsqlparser/statement/create/table/ColumnDefinition.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.create.table; @@ -25,20 +13,12 @@ import net.sf.jsqlparser.statement.select.PlainSelect; -/** - * A column definition in a CREATE TABLE statement.
- * Example: mycol VARCHAR(30) NOT NULL - */ public class ColumnDefinition { private String columnName; private ColDataType colDataType; private List columnSpecStrings; - /** - * A list of strings of every word after the datatype of the column.
- * Example ("NOT", "NULL") - */ public List getColumnSpecStrings() { return columnSpecStrings; } @@ -47,9 +27,6 @@ public void setColumnSpecStrings(List list) { columnSpecStrings = list; } - /** - * The {@link ColDataType} of this column definition - */ public ColDataType getColDataType() { return colDataType; } diff --git a/src/main/java/net/sf/jsqlparser/statement/create/table/CreateTable.java b/src/main/java/net/sf/jsqlparser/statement/create/table/CreateTable.java index 0cc64f619..3f7e58eeb 100644 --- a/src/main/java/net/sf/jsqlparser/statement/create/table/CreateTable.java +++ b/src/main/java/net/sf/jsqlparser/statement/create/table/CreateTable.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.create.table; @@ -29,9 +17,6 @@ import net.sf.jsqlparser.statement.select.PlainSelect; import net.sf.jsqlparser.statement.select.Select; -/** - * A "CREATE TABLE" statement - */ public class CreateTable implements Statement { private Table table; @@ -49,9 +34,6 @@ public void accept(StatementVisitor statementVisitor) { statementVisitor.visit(this); } - /** - * The name of the table to be created - */ public Table getTable() { return table; } @@ -60,11 +42,6 @@ public void setTable(Table table) { this.table = table; } - /** - * Whether the table is unlogged or not (PostgreSQL 9.1+ feature) - * - * @return - */ public boolean isUnlogged() { return unlogged; } diff --git a/src/main/java/net/sf/jsqlparser/statement/create/table/ExcludeConstraint.java b/src/main/java/net/sf/jsqlparser/statement/create/table/ExcludeConstraint.java index 63fee20f0..0cc4c9d73 100644 --- a/src/main/java/net/sf/jsqlparser/statement/create/table/ExcludeConstraint.java +++ b/src/main/java/net/sf/jsqlparser/statement/create/table/ExcludeConstraint.java @@ -1,33 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2016 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.create.table; import net.sf.jsqlparser.expression.Expression; -/** - * Table Exclusion Constraint Eg. 'EXCLUDE WHERE (col1 > 100)' - * - * @author wrobstory - */ public class ExcludeConstraint extends Index { private Expression expression; diff --git a/src/main/java/net/sf/jsqlparser/statement/create/table/ForeignKeyIndex.java b/src/main/java/net/sf/jsqlparser/statement/create/table/ForeignKeyIndex.java index 0c371751a..3d8a23b60 100644 --- a/src/main/java/net/sf/jsqlparser/statement/create/table/ForeignKeyIndex.java +++ b/src/main/java/net/sf/jsqlparser/statement/create/table/ForeignKeyIndex.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.create.table; @@ -25,11 +13,6 @@ import net.sf.jsqlparser.schema.Table; import net.sf.jsqlparser.statement.select.PlainSelect; -/** - * Foreign Key Index - * - * @author toben - */ public class ForeignKeyIndex extends NamedConstraint { private Table table; diff --git a/src/main/java/net/sf/jsqlparser/statement/create/table/Index.java b/src/main/java/net/sf/jsqlparser/statement/create/table/Index.java index 30beff484..aa7a02c1c 100644 --- a/src/main/java/net/sf/jsqlparser/statement/create/table/Index.java +++ b/src/main/java/net/sf/jsqlparser/statement/create/table/Index.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.create.table; @@ -25,9 +13,6 @@ import net.sf.jsqlparser.statement.select.PlainSelect; -/** - * An index (unique, primary etc.) in a CREATE TABLE statement - */ public class Index { private String type; @@ -35,9 +20,6 @@ public class Index { private String name; private List idxSpec; - /** - * A list of strings of all the columns regarding this index - */ public List getColumnsNames() { return columnsNames; } @@ -46,9 +28,6 @@ public String getName() { return name; } - /** - * The type of this index: "PRIMARY KEY", "UNIQUE", "INDEX" - */ public String getType() { return type; } diff --git a/src/main/java/net/sf/jsqlparser/statement/create/table/NamedConstraint.java b/src/main/java/net/sf/jsqlparser/statement/create/table/NamedConstraint.java index 454c8b03a..55cb4a21b 100644 --- a/src/main/java/net/sf/jsqlparser/statement/create/table/NamedConstraint.java +++ b/src/main/java/net/sf/jsqlparser/statement/create/table/NamedConstraint.java @@ -1,50 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2014 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ - /* - * Copyright (C) 2014 JSQLParser. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ package net.sf.jsqlparser.statement.create.table; import net.sf.jsqlparser.statement.select.PlainSelect; -/** - * - * @author toben - */ public class NamedConstraint extends Index { @Override diff --git a/src/main/java/net/sf/jsqlparser/statement/create/view/AlterView.java b/src/main/java/net/sf/jsqlparser/statement/create/view/AlterView.java index f8477a4e2..57b879c82 100644 --- a/src/main/java/net/sf/jsqlparser/statement/create/view/AlterView.java +++ b/src/main/java/net/sf/jsqlparser/statement/create/view/AlterView.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.create.view; @@ -28,9 +16,6 @@ import net.sf.jsqlparser.statement.select.PlainSelect; import net.sf.jsqlparser.statement.select.SelectBody; -/** - * A "CREATE VIEW" statement - */ public class AlterView implements Statement { private Table view; @@ -43,11 +28,6 @@ public void accept(StatementVisitor statementVisitor) { statementVisitor.visit(this); } - /** - * In the syntax tree, a view looks and acts just like a Table. - * - * @return The name of the view to be created. - */ public Table getView() { return view; } @@ -56,9 +36,6 @@ public void setView(Table view) { this.view = view; } - /** - * @return the SelectBody - */ public SelectBody getSelectBody() { return selectBody; } diff --git a/src/main/java/net/sf/jsqlparser/statement/create/view/CreateView.java b/src/main/java/net/sf/jsqlparser/statement/create/view/CreateView.java index 35ec357e6..6192e849e 100644 --- a/src/main/java/net/sf/jsqlparser/statement/create/view/CreateView.java +++ b/src/main/java/net/sf/jsqlparser/statement/create/view/CreateView.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.create.view; @@ -28,9 +16,6 @@ import net.sf.jsqlparser.statement.select.PlainSelect; import net.sf.jsqlparser.statement.select.Select; -/** - * A "CREATE VIEW" statement - */ public class CreateView implements Statement { private Table view; @@ -46,11 +31,6 @@ public void accept(StatementVisitor statementVisitor) { statementVisitor.visit(this); } - /** - * In the syntax tree, a view looks and acts just like a Table. - * - * @return The name of the view to be created. - */ public Table getView() { return view; } @@ -59,9 +39,6 @@ public void setView(Table view) { this.view = view; } - /** - * @return was "OR REPLACE" specified? - */ public boolean isOrReplace() { return orReplace; } diff --git a/src/main/java/net/sf/jsqlparser/statement/create/view/ForceOption.java b/src/main/java/net/sf/jsqlparser/statement/create/view/ForceOption.java index 2e8010865..66d3a9622 100644 --- a/src/main/java/net/sf/jsqlparser/statement/create/view/ForceOption.java +++ b/src/main/java/net/sf/jsqlparser/statement/create/view/ForceOption.java @@ -1,30 +1,14 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2018 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.create.view; -/** - * - * @author Tobias Warneke (t.warneke@gmx.net) - */ public enum ForceOption { NONE, diff --git a/src/main/java/net/sf/jsqlparser/statement/create/view/TemporaryOption.java b/src/main/java/net/sf/jsqlparser/statement/create/view/TemporaryOption.java index 686e405bb..31b1721f1 100644 --- a/src/main/java/net/sf/jsqlparser/statement/create/view/TemporaryOption.java +++ b/src/main/java/net/sf/jsqlparser/statement/create/view/TemporaryOption.java @@ -1,48 +1,14 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2018 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ -/* - * Copyright (C) 2018 JSQLParser. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ package net.sf.jsqlparser.statement.create.view; -/** - * - * @author Tobias Warneke (t.warneke@gmx.net) - */ public enum TemporaryOption { NONE, diff --git a/src/main/java/net/sf/jsqlparser/statement/delete/Delete.java b/src/main/java/net/sf/jsqlparser/statement/delete/Delete.java index 75e6e06cd..dc4936773 100644 --- a/src/main/java/net/sf/jsqlparser/statement/delete/Delete.java +++ b/src/main/java/net/sf/jsqlparser/statement/delete/Delete.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.delete; diff --git a/src/main/java/net/sf/jsqlparser/statement/drop/Drop.java b/src/main/java/net/sf/jsqlparser/statement/drop/Drop.java index 69dceb189..177f6398d 100644 --- a/src/main/java/net/sf/jsqlparser/statement/drop/Drop.java +++ b/src/main/java/net/sf/jsqlparser/statement/drop/Drop.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.drop; diff --git a/src/main/java/net/sf/jsqlparser/statement/execute/Execute.java b/src/main/java/net/sf/jsqlparser/statement/execute/Execute.java index 677d65c39..75422b0c7 100644 --- a/src/main/java/net/sf/jsqlparser/statement/execute/Execute.java +++ b/src/main/java/net/sf/jsqlparser/statement/execute/Execute.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.execute; @@ -27,10 +15,6 @@ import net.sf.jsqlparser.statement.StatementVisitor; import net.sf.jsqlparser.statement.select.PlainSelect; -/** - * - * @author toben - */ public class Execute implements Statement { private EXEC_TYPE execType = EXEC_TYPE.EXECUTE; diff --git a/src/main/java/net/sf/jsqlparser/statement/insert/Insert.java b/src/main/java/net/sf/jsqlparser/statement/insert/Insert.java index ad312b433..14db12192 100644 --- a/src/main/java/net/sf/jsqlparser/statement/insert/Insert.java +++ b/src/main/java/net/sf/jsqlparser/statement/insert/Insert.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.insert; @@ -33,10 +21,6 @@ import net.sf.jsqlparser.statement.select.Select; import net.sf.jsqlparser.statement.select.SelectExpressionItem; -/** - * The insert statement. Every column name in columnNames matches an item in - * itemsList - */ public class Insert implements Statement { private Table table; @@ -55,8 +39,6 @@ public class Insert implements Statement { private List returningExpressionList = null; - /* these lines of codes are used to handle SET syntax in the insert part. - * the SET syntax is based on this: https://dev.mysql.com/doc/refman/5.6/en/insert.html. */ private boolean useSet = false; private List setColumns; private List setExpressionList; @@ -74,11 +56,6 @@ public void setTable(Table name) { table = name; } - /** - * Get the columns (found in "INSERT INTO (col1,col2..) [...]" ) - * - * @return a list of {@link net.sf.jsqlparser.schema.Column} - */ public List getColumns() { return columns; } diff --git a/src/main/java/net/sf/jsqlparser/statement/insert/InsertModifierPriority.java b/src/main/java/net/sf/jsqlparser/statement/insert/InsertModifierPriority.java index c5296a991..534281e8f 100644 --- a/src/main/java/net/sf/jsqlparser/statement/insert/InsertModifierPriority.java +++ b/src/main/java/net/sf/jsqlparser/statement/insert/InsertModifierPriority.java @@ -1,30 +1,14 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2015 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.insert; -/** - * - * @author tw - */ public enum InsertModifierPriority { LOW_PRIORITY, DELAYED, HIGH_PRIORITY, IGNORE } diff --git a/src/main/java/net/sf/jsqlparser/statement/merge/Merge.java b/src/main/java/net/sf/jsqlparser/statement/merge/Merge.java index 5bb95e1dc..f9c7bced0 100644 --- a/src/main/java/net/sf/jsqlparser/statement/merge/Merge.java +++ b/src/main/java/net/sf/jsqlparser/statement/merge/Merge.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2015 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.merge; @@ -28,11 +16,6 @@ import net.sf.jsqlparser.statement.StatementVisitor; import net.sf.jsqlparser.statement.select.SubSelect; -/** - * Merge - statement - * - * @author tw - */ public class Merge implements Statement { private Table table; diff --git a/src/main/java/net/sf/jsqlparser/statement/merge/MergeInsert.java b/src/main/java/net/sf/jsqlparser/statement/merge/MergeInsert.java index 0f24d8861..6f46a3574 100644 --- a/src/main/java/net/sf/jsqlparser/statement/merge/MergeInsert.java +++ b/src/main/java/net/sf/jsqlparser/statement/merge/MergeInsert.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2015 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.merge; @@ -26,10 +14,6 @@ import net.sf.jsqlparser.schema.Column; import net.sf.jsqlparser.statement.select.PlainSelect; -/** - * - * @author toben - */ public class MergeInsert { private List columns = null; diff --git a/src/main/java/net/sf/jsqlparser/statement/merge/MergeUpdate.java b/src/main/java/net/sf/jsqlparser/statement/merge/MergeUpdate.java index bdd1a404d..b81b446d7 100644 --- a/src/main/java/net/sf/jsqlparser/statement/merge/MergeUpdate.java +++ b/src/main/java/net/sf/jsqlparser/statement/merge/MergeUpdate.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2015 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.merge; @@ -25,10 +13,6 @@ import net.sf.jsqlparser.expression.Expression; import net.sf.jsqlparser.schema.Column; -/** - * - * @author toben - */ public class MergeUpdate { private List columns = null; diff --git a/src/main/java/net/sf/jsqlparser/statement/replace/Replace.java b/src/main/java/net/sf/jsqlparser/statement/replace/Replace.java index 936d1665b..51252d3ed 100644 --- a/src/main/java/net/sf/jsqlparser/statement/replace/Replace.java +++ b/src/main/java/net/sf/jsqlparser/statement/replace/Replace.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.replace; @@ -31,9 +19,6 @@ import net.sf.jsqlparser.statement.StatementVisitor; import net.sf.jsqlparser.statement.select.PlainSelect; -/** - * The replace statement. - */ public class Replace implements Statement { private Table table; @@ -64,20 +49,10 @@ public void setUseIntoTables(boolean useIntoTables) { this.useIntoTables = useIntoTables; } - /** - * A list of {@link net.sf.jsqlparser.schema.Column}s either from a "REPLACE mytab (col1, col2) - * [...]" or a "REPLACE mytab SET col1=exp1, col2=exp2". - * - * @return a list of {@link net.sf.jsqlparser.schema.Column}s - */ public List getColumns() { return columns; } - /** - * An {@link ItemsList} (either from a "REPLACE mytab VALUES (exp1,exp2)" or a "REPLACE mytab - * SELECT * FROM mytab2") it is null in case of a "REPLACE mytab SET col1=exp1, col2=exp2" - */ public ItemsList getItemsList() { return itemsList; } diff --git a/src/main/java/net/sf/jsqlparser/statement/select/AllColumns.java b/src/main/java/net/sf/jsqlparser/statement/select/AllColumns.java index 4049133e6..b01828b32 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/AllColumns.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/AllColumns.java @@ -1,31 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; import net.sf.jsqlparser.parser.ASTNodeAccessImpl; -/** - * All the columns (as in "SELECT * FROM ...") - */ public class AllColumns extends ASTNodeAccessImpl implements SelectItem { public AllColumns() { diff --git a/src/main/java/net/sf/jsqlparser/statement/select/AllTableColumns.java b/src/main/java/net/sf/jsqlparser/statement/select/AllTableColumns.java index 6bc4d087e..e1b7d3d54 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/AllTableColumns.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/AllTableColumns.java @@ -1,29 +1,14 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; -/** - * All the columns of a table (as in "SELECT TableName.* FROM ...") - */ import net.sf.jsqlparser.parser.ASTNodeAccessImpl; import net.sf.jsqlparser.schema.*; diff --git a/src/main/java/net/sf/jsqlparser/statement/select/Distinct.java b/src/main/java/net/sf/jsqlparser/statement/select/Distinct.java index e9d62ab0e..9b2f6c83b 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/Distinct.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/Distinct.java @@ -1,31 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; import java.util.List; -/** - * A DISTINCT [ON (expression, ...)] clause - */ public class Distinct { private List onSelectItems; @@ -38,11 +23,6 @@ public Distinct(boolean useUnique) { this.useUnique = useUnique; } - /** - * A list of {@link SelectItem}s expressions, as in "select DISTINCT ON (a,b,c) a,b FROM..." - * - * @return a list of {@link SelectItem}s expressions - */ public List getOnSelectItems() { return onSelectItems; } diff --git a/src/main/java/net/sf/jsqlparser/statement/select/ExceptOp.java b/src/main/java/net/sf/jsqlparser/statement/select/ExceptOp.java index d0db50bbd..f6b11a70a 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/ExceptOp.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/ExceptOp.java @@ -1,32 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; import net.sf.jsqlparser.statement.select.SetOperationList.SetOperationType; -/** - * - * @author tw - */ public class ExceptOp extends SetOperation { public ExceptOp() { diff --git a/src/main/java/net/sf/jsqlparser/statement/select/ExpressionListItem.java b/src/main/java/net/sf/jsqlparser/statement/select/ExpressionListItem.java index 35e026a94..7ae1d1a90 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/ExpressionListItem.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/ExpressionListItem.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; diff --git a/src/main/java/net/sf/jsqlparser/statement/select/Fetch.java b/src/main/java/net/sf/jsqlparser/statement/select/Fetch.java index 4f32c7279..3a7f34a5c 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/Fetch.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/Fetch.java @@ -1,31 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; import net.sf.jsqlparser.expression.JdbcParameter; -/** - * A fetch clause in the form FETCH (FIRST | NEXT) row_count (ROW | ROWS) ONLY - */ public class Fetch { private long rowCount; diff --git a/src/main/java/net/sf/jsqlparser/statement/select/First.java b/src/main/java/net/sf/jsqlparser/statement/select/First.java index a476f025c..dfac655b6 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/First.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/First.java @@ -1,35 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2015 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; import net.sf.jsqlparser.expression.JdbcParameter; -/** - * A FIRST clause in the form [FIRST row_count] the alternative form [LIMIT row_count] is also - * supported. - * - * Initial implementation was done for informix special syntax: - * http://www-01.ibm.com/support/knowledgecenter/SSGU8G_12.1.0/com.ibm.sqls.doc/ids_sqs_0156.htm - */ public class First { public enum Keyword { diff --git a/src/main/java/net/sf/jsqlparser/statement/select/FromItem.java b/src/main/java/net/sf/jsqlparser/statement/select/FromItem.java index f3781e289..7b62d32c3 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/FromItem.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/FromItem.java @@ -1,31 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; import net.sf.jsqlparser.expression.Alias; -/** - * An item in a "SELECT [...] FROM item1" statement. (for example a table or a sub-select) - */ public interface FromItem { void accept(FromItemVisitor fromItemVisitor); diff --git a/src/main/java/net/sf/jsqlparser/statement/select/FromItemVisitor.java b/src/main/java/net/sf/jsqlparser/statement/select/FromItemVisitor.java index b95ed3e89..c1c1d077a 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/FromItemVisitor.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/FromItemVisitor.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; diff --git a/src/main/java/net/sf/jsqlparser/statement/select/FromItemVisitorAdapter.java b/src/main/java/net/sf/jsqlparser/statement/select/FromItemVisitorAdapter.java index 491b30f0f..3cdcb9c5e 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/FromItemVisitorAdapter.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/FromItemVisitorAdapter.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; diff --git a/src/main/java/net/sf/jsqlparser/statement/select/FunctionItem.java b/src/main/java/net/sf/jsqlparser/statement/select/FunctionItem.java index 292cb6d89..50c920f70 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/FunctionItem.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/FunctionItem.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; diff --git a/src/main/java/net/sf/jsqlparser/statement/select/IntersectOp.java b/src/main/java/net/sf/jsqlparser/statement/select/IntersectOp.java index e6976134f..f2248ca1b 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/IntersectOp.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/IntersectOp.java @@ -1,32 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; import net.sf.jsqlparser.statement.select.SetOperationList.SetOperationType; -/** - * - * @author tw - */ public class IntersectOp extends SetOperation { public IntersectOp() { diff --git a/src/main/java/net/sf/jsqlparser/statement/select/IntoTableVisitor.java b/src/main/java/net/sf/jsqlparser/statement/select/IntoTableVisitor.java index 9b0746d43..64a85ca9c 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/IntoTableVisitor.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/IntoTableVisitor.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; diff --git a/src/main/java/net/sf/jsqlparser/statement/select/IntoTableVisitorAdapter.java b/src/main/java/net/sf/jsqlparser/statement/select/IntoTableVisitorAdapter.java index 32f960e75..5875cc6fa 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/IntoTableVisitorAdapter.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/IntoTableVisitorAdapter.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; diff --git a/src/main/java/net/sf/jsqlparser/statement/select/Join.java b/src/main/java/net/sf/jsqlparser/statement/select/Join.java index c4783b64c..3e5a377e9 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/Join.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/Join.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; @@ -27,9 +15,6 @@ import net.sf.jsqlparser.parser.ASTNodeAccessImpl; import net.sf.jsqlparser.schema.Column; -/** - * A join clause - */ public class Join extends ASTNodeAccessImpl { private boolean outer = false; @@ -46,11 +31,6 @@ public class Join extends ASTNodeAccessImpl { private List usingColumns; private KSQLJoinWindow joinWindow; - /** - * Whether is a tab1,tab2 join - * - * @return true if is a "tab1,tab2" join - */ public boolean isSimple() { return simple; } @@ -59,11 +39,6 @@ public void setSimple(boolean b) { simple = b; } - /** - * Whether is a "INNER" join - * - * @return true if is a "INNER" join - */ public boolean isInner() { return inner; } @@ -208,7 +183,9 @@ public void setJoinWindow(KSQLJoinWindow joinWindow) { @Override public String toString() { - if (isSimple()) { + if (isSimple() && isOuter()) { + return "OUTER " + rightItem; + } else if (isSimple()) { return "" + rightItem; } else { String type = ""; diff --git a/src/main/java/net/sf/jsqlparser/statement/select/KSQLJoinWindow.java b/src/main/java/net/sf/jsqlparser/statement/select/KSQLJoinWindow.java index e70a8941f..871dc0282 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/KSQLJoinWindow.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/KSQLJoinWindow.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2018 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; diff --git a/src/main/java/net/sf/jsqlparser/statement/select/LateralSubSelect.java b/src/main/java/net/sf/jsqlparser/statement/select/LateralSubSelect.java index 903718a54..cdaa72b14 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/LateralSubSelect.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/LateralSubSelect.java @@ -1,33 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; import net.sf.jsqlparser.expression.Alias; -/** - * A lateral subselect followed by an alias. - * - * @author Tobias Warneke - */ public class LateralSubSelect implements FromItem { private SubSelect subSelect; diff --git a/src/main/java/net/sf/jsqlparser/statement/select/Limit.java b/src/main/java/net/sf/jsqlparser/statement/select/Limit.java index 18fc7d898..25c8aa1eb 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/Limit.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/Limit.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; @@ -24,9 +12,6 @@ import net.sf.jsqlparser.expression.Expression; import net.sf.jsqlparser.parser.ASTNodeAccessImpl; -/** - * A limit clause in the form [LIMIT {[offset,] row_count) | (row_count | ALL) OFFSET offset}] - */ public class Limit extends ASTNodeAccessImpl { private Expression rowCount; @@ -50,9 +35,6 @@ public void setRowCount(Expression l) { rowCount = l; } - /** - * @return true if the limit is "LIMIT ALL [OFFSET ...]) - */ public boolean isLimitAll() { return limitAll; } @@ -61,9 +43,6 @@ public void setLimitAll(boolean b) { limitAll = b; } - /** - * @return true if the limit is "LIMIT NULL [OFFSET ...]) - */ public boolean isLimitNull() { return limitNull; } diff --git a/src/main/java/net/sf/jsqlparser/statement/select/MinusOp.java b/src/main/java/net/sf/jsqlparser/statement/select/MinusOp.java index d63a04bc6..ab779978a 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/MinusOp.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/MinusOp.java @@ -1,32 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; import net.sf.jsqlparser.statement.select.SetOperationList.SetOperationType; -/** - * - * @author tw - */ public class MinusOp extends SetOperation { public MinusOp() { diff --git a/src/main/java/net/sf/jsqlparser/statement/select/Offset.java b/src/main/java/net/sf/jsqlparser/statement/select/Offset.java index 7f0e5c34b..310226c0f 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/Offset.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/Offset.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; @@ -25,9 +13,6 @@ import net.sf.jsqlparser.expression.JdbcNamedParameter; import net.sf.jsqlparser.expression.JdbcParameter; -/** - * An offset clause in the form OFFSET offset or in the form OFFSET offset (ROW | ROWS) - */ public class Offset { private long offset; diff --git a/src/main/java/net/sf/jsqlparser/statement/select/OptimizeFor.java b/src/main/java/net/sf/jsqlparser/statement/select/OptimizeFor.java new file mode 100644 index 000000000..d10d11612 --- /dev/null +++ b/src/main/java/net/sf/jsqlparser/statement/select/OptimizeFor.java @@ -0,0 +1,35 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ +package net.sf.jsqlparser.statement.select; + +/** + * A optimize for clause. + */ +public class OptimizeFor { + + private long rowCount; + + public OptimizeFor(long rowCount) { + this.rowCount = rowCount; + } + + public long getRowCount() { + return rowCount; + } + + public void setRowCount(long l) { + rowCount = l; + } + + @Override + public String toString() { + return " OPTIMIZE FOR " + rowCount + " ROWS"; + } +} diff --git a/src/main/java/net/sf/jsqlparser/statement/select/OrderByElement.java b/src/main/java/net/sf/jsqlparser/statement/select/OrderByElement.java index 1a1a3fe66..60a953a87 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/OrderByElement.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/OrderByElement.java @@ -1,31 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; import net.sf.jsqlparser.expression.Expression; -/** - * An element (column reference) in an "ORDER BY" clause. - */ public class OrderByElement { public enum NullOrdering { diff --git a/src/main/java/net/sf/jsqlparser/statement/select/OrderByVisitor.java b/src/main/java/net/sf/jsqlparser/statement/select/OrderByVisitor.java index cd82b6885..e54b8fc0a 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/OrderByVisitor.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/OrderByVisitor.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; diff --git a/src/main/java/net/sf/jsqlparser/statement/select/OrderByVisitorAdapter.java b/src/main/java/net/sf/jsqlparser/statement/select/OrderByVisitorAdapter.java index ba5bee90d..95d9f1893 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/OrderByVisitorAdapter.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/OrderByVisitorAdapter.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; diff --git a/src/main/java/net/sf/jsqlparser/statement/select/ParenthesisFromItem.java b/src/main/java/net/sf/jsqlparser/statement/select/ParenthesisFromItem.java index ff487832c..6eaed24a3 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/ParenthesisFromItem.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/ParenthesisFromItem.java @@ -1,31 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; import net.sf.jsqlparser.expression.*; -/** - * It represents an expression like "(" expression ")" - */ public class ParenthesisFromItem implements FromItem { private FromItem fromItem; diff --git a/src/main/java/net/sf/jsqlparser/statement/select/Pivot.java b/src/main/java/net/sf/jsqlparser/statement/select/Pivot.java index 83758d116..191ca0b14 100755 --- a/src/main/java/net/sf/jsqlparser/statement/select/Pivot.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/Pivot.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; diff --git a/src/main/java/net/sf/jsqlparser/statement/select/PivotVisitor.java b/src/main/java/net/sf/jsqlparser/statement/select/PivotVisitor.java index 656a50e39..8f4e8df13 100755 --- a/src/main/java/net/sf/jsqlparser/statement/select/PivotVisitor.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/PivotVisitor.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; diff --git a/src/main/java/net/sf/jsqlparser/statement/select/PivotVisitorAdapter.java b/src/main/java/net/sf/jsqlparser/statement/select/PivotVisitorAdapter.java index 95ceaba69..e7b7a312e 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/PivotVisitorAdapter.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/PivotVisitorAdapter.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; diff --git a/src/main/java/net/sf/jsqlparser/statement/select/PivotXml.java b/src/main/java/net/sf/jsqlparser/statement/select/PivotXml.java index 43f76c12d..51c1bde98 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/PivotXml.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/PivotXml.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; diff --git a/src/main/java/net/sf/jsqlparser/statement/select/PlainSelect.java b/src/main/java/net/sf/jsqlparser/statement/select/PlainSelect.java index 92d4ef2fd..793fc98a9 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/PlainSelect.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/PlainSelect.java @@ -1,40 +1,24 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; -import net.sf.jsqlparser.expression.Expression; -import net.sf.jsqlparser.expression.OracleHierarchicalExpression; -import net.sf.jsqlparser.expression.OracleHint; -import net.sf.jsqlparser.schema.Table; -import net.sf.jsqlparser.parser.ASTNodeAccessImpl; - import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; +import net.sf.jsqlparser.expression.Expression; +import net.sf.jsqlparser.expression.OracleHierarchicalExpression; +import net.sf.jsqlparser.expression.OracleHint; +import net.sf.jsqlparser.parser.ASTNodeAccessImpl; +import net.sf.jsqlparser.schema.Table; -/** - * The core of a "SELECT" statement (no UNION, no ORDER BY) - */ public class PlainSelect extends ASTNodeAccessImpl implements SelectBody { private Distinct distinct = null; @@ -49,6 +33,7 @@ public class PlainSelect extends ASTNodeAccessImpl implements SelectBody { private Limit limit; private Offset offset; private Fetch fetch; + private OptimizeFor optimizeFor; private Skip skip; private First first; private Top top; @@ -70,11 +55,6 @@ public void setUseBrackets(boolean useBrackets) { this.useBrackets = useBrackets; } - /** - * The {@link FromItem} in this query - * - * @return the {@link FromItem} - */ public FromItem getFromItem() { return fromItem; } @@ -83,11 +63,6 @@ public List getIntoTables() { return intoTables; } - /** - * The {@link SelectItem}s in this query (for example the A,B,C in "SELECT A,B,C") - * - * @return a list of {@link SelectItem}s - */ public List getSelectItems() { return selectItems; } @@ -169,6 +144,14 @@ public void setFetch(Fetch fetch) { this.fetch = fetch; } + public OptimizeFor getOptimizeFor() { + return optimizeFor; + } + + public void setOptimizeFor(OptimizeFor optimizeFor) { + this.optimizeFor = optimizeFor; + } + public Top getTop() { return top; } @@ -377,6 +360,9 @@ public String toString() { sql.append(wait); } } + if (optimizeFor != null) { + sql.append(optimizeFor); + } } else { //without from if (where != null) { diff --git a/src/main/java/net/sf/jsqlparser/statement/select/Select.java b/src/main/java/net/sf/jsqlparser/statement/select/Select.java index 2d6b385eb..7a28e1cdd 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/Select.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/Select.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; diff --git a/src/main/java/net/sf/jsqlparser/statement/select/SelectBody.java b/src/main/java/net/sf/jsqlparser/statement/select/SelectBody.java index 40e320d57..bbe9c5451 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/SelectBody.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/SelectBody.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; diff --git a/src/main/java/net/sf/jsqlparser/statement/select/SelectExpressionItem.java b/src/main/java/net/sf/jsqlparser/statement/select/SelectExpressionItem.java index e1564fc17..d7be09c63 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/SelectExpressionItem.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/SelectExpressionItem.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; @@ -25,9 +13,6 @@ import net.sf.jsqlparser.expression.Expression; import net.sf.jsqlparser.parser.ASTNodeAccessImpl; -/** - * An expression as in "SELECT expr1 AS EXPR" - */ public class SelectExpressionItem extends ASTNodeAccessImpl implements SelectItem { private Expression expression; diff --git a/src/main/java/net/sf/jsqlparser/statement/select/SelectItem.java b/src/main/java/net/sf/jsqlparser/statement/select/SelectItem.java index edc6ee8f9..27b29097c 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/SelectItem.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/SelectItem.java @@ -1,32 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; import net.sf.jsqlparser.parser.ASTNodeAccess; -/** - * Anything between "SELECT" and "FROM"
- * (that is, any column or expression etc to be retrieved with the query) - */ public interface SelectItem extends ASTNodeAccess { void accept(SelectItemVisitor selectItemVisitor); diff --git a/src/main/java/net/sf/jsqlparser/statement/select/SelectItemVisitor.java b/src/main/java/net/sf/jsqlparser/statement/select/SelectItemVisitor.java index 955999ef0..4ea463b36 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/SelectItemVisitor.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/SelectItemVisitor.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; diff --git a/src/main/java/net/sf/jsqlparser/statement/select/SelectItemVisitorAdapter.java b/src/main/java/net/sf/jsqlparser/statement/select/SelectItemVisitorAdapter.java index cb702aa87..443b00ca6 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/SelectItemVisitorAdapter.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/SelectItemVisitorAdapter.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; diff --git a/src/main/java/net/sf/jsqlparser/statement/select/SelectVisitor.java b/src/main/java/net/sf/jsqlparser/statement/select/SelectVisitor.java index ab9f9241e..0fff1527c 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/SelectVisitor.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/SelectVisitor.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; diff --git a/src/main/java/net/sf/jsqlparser/statement/select/SelectVisitorAdapter.java b/src/main/java/net/sf/jsqlparser/statement/select/SelectVisitorAdapter.java index 0254e7788..4ceef8515 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/SelectVisitorAdapter.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/SelectVisitorAdapter.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; diff --git a/src/main/java/net/sf/jsqlparser/statement/select/SetOperation.java b/src/main/java/net/sf/jsqlparser/statement/select/SetOperation.java index 25aa06477..0600e5957 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/SetOperation.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/SetOperation.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; @@ -24,11 +12,6 @@ import net.sf.jsqlparser.parser.ASTNodeAccessImpl; import net.sf.jsqlparser.statement.select.SetOperationList.SetOperationType; -/** - * Single Set-Operation (name). Placeholder for one specific set operation, e.g. union, intersect. - * - * @author tw - */ public abstract class SetOperation extends ASTNodeAccessImpl { private SetOperationType type; diff --git a/src/main/java/net/sf/jsqlparser/statement/select/SetOperationList.java b/src/main/java/net/sf/jsqlparser/statement/select/SetOperationList.java index 7bde7cd87..7a96b2276 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/SetOperationList.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/SetOperationList.java @@ -1,34 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; import java.util.List; -/** - * A database set operation. This operation consists of a list of plainSelects connected by set - * operations (UNION,INTERSECT,MINUS,EXCEPT). All these operations have the same priority. - * - * @author tw - */ public class SetOperationList implements SelectBody { private List selects; @@ -132,9 +114,6 @@ public String toString() { return buffer.toString(); } - /** - * list of set operations. - */ public enum SetOperationType { INTERSECT, diff --git a/src/main/java/net/sf/jsqlparser/statement/select/Skip.java b/src/main/java/net/sf/jsqlparser/statement/select/Skip.java index d9237ee69..13a6b838e 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/Skip.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/Skip.java @@ -1,34 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2015 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; import net.sf.jsqlparser.expression.JdbcParameter; -/** - * A skip clause in the form [SKIP row_count] - * - * Initial implementation was done for informix special syntax: - * http://www-01.ibm.com/support/knowledgecenter/SSGU8G_12.1.0/com.ibm.sqls.doc/ids_sqs_0156.htm - */ public class Skip { private Long rowCount; diff --git a/src/main/java/net/sf/jsqlparser/statement/select/SubJoin.java b/src/main/java/net/sf/jsqlparser/statement/select/SubJoin.java index cba6af885..bfed59b8a 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/SubJoin.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/SubJoin.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; @@ -25,9 +13,6 @@ import java.util.List; -/** - * A table created by "(tab1 [join tab2]* )". - */ public class SubJoin implements FromItem { private FromItem left; diff --git a/src/main/java/net/sf/jsqlparser/statement/select/SubSelect.java b/src/main/java/net/sf/jsqlparser/statement/select/SubSelect.java index d6659becc..8bfd7c1c8 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/SubSelect.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/SubSelect.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; @@ -30,9 +18,6 @@ import net.sf.jsqlparser.expression.operators.relational.ItemsListVisitor; import net.sf.jsqlparser.parser.ASTNodeAccessImpl; -/** - * A subselect followed by an optional alias. - */ public class SubSelect extends ASTNodeAccessImpl implements FromItem, Expression, ItemsList { private SelectBody selectBody; diff --git a/src/main/java/net/sf/jsqlparser/statement/select/TableFunction.java b/src/main/java/net/sf/jsqlparser/statement/select/TableFunction.java index 3bb89b7e4..429880dcb 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/TableFunction.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/TableFunction.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2015 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; diff --git a/src/main/java/net/sf/jsqlparser/statement/select/Top.java b/src/main/java/net/sf/jsqlparser/statement/select/Top.java index bb283d57d..f2f3ac521 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/Top.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/Top.java @@ -1,31 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; import net.sf.jsqlparser.expression.Expression; -/** - * A top clause in the form [TOP (row_count) or TOP row_count] - */ public class Top { private boolean hasParenthesis = false; diff --git a/src/main/java/net/sf/jsqlparser/statement/select/UnionOp.java b/src/main/java/net/sf/jsqlparser/statement/select/UnionOp.java index 43eb49469..a9dd91e81 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/UnionOp.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/UnionOp.java @@ -1,32 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; import net.sf.jsqlparser.statement.select.SetOperationList.SetOperationType; -/** - * - * @author tw - */ public class UnionOp extends SetOperation { private boolean distinct; diff --git a/src/main/java/net/sf/jsqlparser/statement/select/ValuesList.java b/src/main/java/net/sf/jsqlparser/statement/select/ValuesList.java index 26f9a919f..f5149e693 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/ValuesList.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/ValuesList.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; @@ -28,12 +16,6 @@ import java.util.List; import net.sf.jsqlparser.expression.Alias; -/** - * This is a container for a values item within a select statement. It holds some syntactical stuff - * that differs from values within an insert statement. - * - * @author toben - */ public class ValuesList implements FromItem { private Alias alias; diff --git a/src/main/java/net/sf/jsqlparser/statement/select/Wait.java b/src/main/java/net/sf/jsqlparser/statement/select/Wait.java index 7de26ba26..984ee318a 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/Wait.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/Wait.java @@ -1,38 +1,22 @@ -/* - * #%L JSQLParser library %% Copyright (C) 2004 - 2017 JSQLParser %% This program is free software: - * you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License - * as published by the Free Software Foundation, either version 2.1 of the License, or (at your - * option) any later version. This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. See the GNU General Lesser Public License for more details. You should have - * received a copy of the GNU General Lesser Public License along with this program. If not, see - * . #L% +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% */ package net.sf.jsqlparser.statement.select; -/** - * A timeout applied to SELECT to specify how long to wait for the row on the lock to be released. - * - * @author janmonterrubio - */ public class Wait { private long timeout; - /** - * Returns the number of seconds specified for the WAIT command - * - * @return the number of seconds specified for the WAIT command - */ public long getTimeout() { return timeout; } - /** - * Sets the number of seconds to WAIT for this {@link Wait} - * - * @param timeout the number of seconds to WAIT for this {@link Wait} - */ public void setTimeout(long timeout) { this.timeout = timeout; } diff --git a/src/main/java/net/sf/jsqlparser/statement/select/WithItem.java b/src/main/java/net/sf/jsqlparser/statement/select/WithItem.java index 6a8b16d30..6bba0498b 100644 --- a/src/main/java/net/sf/jsqlparser/statement/select/WithItem.java +++ b/src/main/java/net/sf/jsqlparser/statement/select/WithItem.java @@ -1,31 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.select; import java.util.List; -/** - * One of the parts of a "WITH" clause of a "SELECT" statement - */ public class WithItem implements SelectBody { private String name; @@ -33,11 +18,6 @@ public class WithItem implements SelectBody { private SelectBody selectBody; private boolean recursive; - /** - * The name of this WITH item (for example, "myWITH" in "WITH myWITH AS (SELECT A,B,C))" - * - * @return the name of this WITH - */ public String getName() { return name; } @@ -54,11 +34,6 @@ public void setRecursive(boolean recursive) { this.recursive = recursive; } - /** - * The {@link SelectBody} of this WITH item is the part after the "AS" keyword - * - * @return {@link SelectBody} of this WITH item - */ public SelectBody getSelectBody() { return selectBody; } diff --git a/src/main/java/net/sf/jsqlparser/statement/truncate/Truncate.java b/src/main/java/net/sf/jsqlparser/statement/truncate/Truncate.java index 998104ada..82b2704b6 100644 --- a/src/main/java/net/sf/jsqlparser/statement/truncate/Truncate.java +++ b/src/main/java/net/sf/jsqlparser/statement/truncate/Truncate.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.truncate; @@ -25,9 +13,6 @@ import net.sf.jsqlparser.statement.Statement; import net.sf.jsqlparser.statement.StatementVisitor; -/** - * A TRUNCATE TABLE statement - */ public class Truncate implements Statement { private Table table; diff --git a/src/main/java/net/sf/jsqlparser/statement/update/Update.java b/src/main/java/net/sf/jsqlparser/statement/update/Update.java index ab9e22c16..5e850a556 100644 --- a/src/main/java/net/sf/jsqlparser/statement/update/Update.java +++ b/src/main/java/net/sf/jsqlparser/statement/update/Update.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.update; @@ -36,9 +24,6 @@ import net.sf.jsqlparser.statement.select.Limit; import net.sf.jsqlparser.statement.select.SelectExpressionItem; -/** - * The update statement. - */ public class Update implements Statement { private List
tables; @@ -76,21 +61,10 @@ public void setWhere(Expression expression) { where = expression; } - /** - * The {@link net.sf.jsqlparser.schema.Column}s in this update (as col1 and col2 in UPDATE - * col1='a', col2='b') - * - * @return a list of {@link net.sf.jsqlparser.schema.Column}s - */ public List getColumns() { return columns; } - /** - * The {@link Expression}s in this update (as 'a' and 'b' in UPDATE col1='a', col2='b') - * - * @return a list of {@link Expression}s - */ public List getExpressions() { return expressions; } diff --git a/src/main/java/net/sf/jsqlparser/statement/upsert/Upsert.java b/src/main/java/net/sf/jsqlparser/statement/upsert/Upsert.java index a5d9a86db..f8f7d2e0b 100644 --- a/src/main/java/net/sf/jsqlparser/statement/upsert/Upsert.java +++ b/src/main/java/net/sf/jsqlparser/statement/upsert/Upsert.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2017 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.upsert; @@ -32,20 +20,6 @@ import net.sf.jsqlparser.statement.select.PlainSelect; import net.sf.jsqlparser.statement.select.Select; -/** - * The UPSERT INTO statement. This statement is basically the combination of - * "insert" and "update". That means it will operate inserts if not present - * and updates otherwise the value in the table. Note the values modified - * will be either a list of values or a select statement. - * - * - * Here is the documentation of the grammar of this operation: - * http://phoenix.apache.org/language/#upsert_values - * http://phoenix.apache.org/language/#upsert_select - * - * @author messfish - * - */ public class Upsert implements Statement { private Table table; diff --git a/src/main/java/net/sf/jsqlparser/statement/values/ValuesStatement.java b/src/main/java/net/sf/jsqlparser/statement/values/ValuesStatement.java index d2bb3c55a..4d34792ab 100644 --- a/src/main/java/net/sf/jsqlparser/statement/values/ValuesStatement.java +++ b/src/main/java/net/sf/jsqlparser/statement/values/ValuesStatement.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.statement.values; @@ -29,9 +17,6 @@ import net.sf.jsqlparser.statement.select.SelectBody; import net.sf.jsqlparser.statement.select.SelectVisitor; -/** - * The replace statement. - */ public class ValuesStatement implements Statement, SelectBody { private List expressions; diff --git a/src/main/java/net/sf/jsqlparser/util/AddAliasesVisitor.java b/src/main/java/net/sf/jsqlparser/util/AddAliasesVisitor.java index 0b34c9174..70f25279d 100644 --- a/src/main/java/net/sf/jsqlparser/util/AddAliasesVisitor.java +++ b/src/main/java/net/sf/jsqlparser/util/AddAliasesVisitor.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.util; @@ -26,13 +14,6 @@ import net.sf.jsqlparser.statement.select.*; import net.sf.jsqlparser.statement.values.ValuesStatement; -/** - * Add aliases to every column and expression selected by a select - statement. Existing aliases are - * recognized and preserved. This class standard uses a prefix of A and a counter to generate new - * aliases (e.g. A1, A5, ...). This behaviour can be altered. - * - * @author tw - */ public class AddAliasesVisitor implements SelectVisitor, SelectItemVisitor { private static final String NOT_SUPPORTED_YET = "Not supported yet."; @@ -88,21 +69,11 @@ public void visit(SelectExpressionItem selectExpressionItem) { } } - /** - * Calculate next alias name to use. - * - * @return - */ protected String getNextAlias() { counter++; return prefix + counter; } - /** - * Set alias prefix. - * - * @param prefix - */ public void setPrefix(String prefix) { this.prefix = prefix; } diff --git a/src/main/java/net/sf/jsqlparser/util/ConnectExpressionsVisitor.java b/src/main/java/net/sf/jsqlparser/util/ConnectExpressionsVisitor.java index 9bfa6b34f..62afe3557 100644 --- a/src/main/java/net/sf/jsqlparser/util/ConnectExpressionsVisitor.java +++ b/src/main/java/net/sf/jsqlparser/util/ConnectExpressionsVisitor.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.util; @@ -26,13 +14,6 @@ import net.sf.jsqlparser.statement.select.*; import net.sf.jsqlparser.statement.values.ValuesStatement; -/** - * Connect all selected expressions with a binary expression. Out of select a,b from table one gets - * select a || b as expr from table. The type of binary expression is set by overwriting this class - * abstract method createBinaryExpression. - * - * @author tw - */ public abstract class ConnectExpressionsVisitor implements SelectVisitor, SelectItemVisitor { private String alias = "expr"; @@ -45,11 +26,6 @@ public ConnectExpressionsVisitor(String alias) { this.alias = alias; } - /** - * Create instances of this binary expression that connects all selected expressions. - * - * @return - */ protected abstract BinaryExpression createBinaryExpression(); @Override diff --git a/src/main/java/net/sf/jsqlparser/util/SelectUtils.java b/src/main/java/net/sf/jsqlparser/util/SelectUtils.java index e28e98e4b..744cd1b39 100644 --- a/src/main/java/net/sf/jsqlparser/util/SelectUtils.java +++ b/src/main/java/net/sf/jsqlparser/util/SelectUtils.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2014 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.util; @@ -38,11 +26,6 @@ import net.sf.jsqlparser.statement.select.WithItem; import net.sf.jsqlparser.statement.values.ValuesStatement; -/** - * Utility function for select statements. - * - * @author toben - */ public final class SelectUtils { private static final String NOT_SUPPORTED_YET = "Not supported yet."; @@ -50,13 +33,6 @@ public final class SelectUtils { private SelectUtils() { } - /** - * Builds select expr1, expr2 from table. - * - * @param table - * @param expr - * @return - */ public static Select buildSelectFromTableAndExpressions(Table table, Expression... expr) { SelectItem[] list = new SelectItem[expr.length]; for (int i = 0; i < expr.length; i++) { @@ -65,14 +41,6 @@ public static Select buildSelectFromTableAndExpressions(Table table, Expression. return buildSelectFromTableAndSelectItems(table, list); } - /** - * Builds select expr1, expr2 from table. - * - * @param table - * @param expr - * @return - * @throws net.sf.jsqlparser.JSQLParserException - */ public static Select buildSelectFromTableAndExpressions(Table table, String... expr) throws JSQLParserException { SelectItem[] list = new SelectItem[expr.length]; for (int i = 0; i < expr.length; i++) { diff --git a/src/main/java/net/sf/jsqlparser/util/TablesNamesFinder.java b/src/main/java/net/sf/jsqlparser/util/TablesNamesFinder.java index f62880b6f..845bf492d 100644 --- a/src/main/java/net/sf/jsqlparser/util/TablesNamesFinder.java +++ b/src/main/java/net/sf/jsqlparser/util/TablesNamesFinder.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.util; @@ -44,6 +32,7 @@ import net.sf.jsqlparser.expression.KeepExpression; import net.sf.jsqlparser.expression.LongValue; import net.sf.jsqlparser.expression.MySQLGroupConcat; +import net.sf.jsqlparser.expression.NextValExpression; import net.sf.jsqlparser.expression.NotExpression; import net.sf.jsqlparser.expression.NullValue; import net.sf.jsqlparser.expression.NumericBind; @@ -139,26 +128,14 @@ import net.sf.jsqlparser.statement.upsert.Upsert; import net.sf.jsqlparser.statement.values.ValuesStatement; -/** - * Find all used tables within an select statement. - * - * Override extractTableName method to modify the extracted table names (e.g. without schema). - */ public class TablesNamesFinder implements SelectVisitor, FromItemVisitor, ExpressionVisitor, ItemsListVisitor, SelectItemVisitor, StatementVisitor { private static final String NOT_SUPPORTED_YET = "Not supported yet."; private List tables; private boolean allowColumnProcessing = false; - /** - * There are special names, that are not table names but are parsed as tables. These names are - * collected here and are not included in the tables - names anymore. - */ private List otherItemNames; - /** - * Main entry for this Tool class. A list of found tables is returned. - */ public List getTableList(Statement statement) { init(false); statement.accept(this); @@ -859,4 +836,8 @@ public void visit(DescribeStatement describe) { public void visit(ExplainStatement explain) { explain.getStatement().accept(this); } + + @Override + public void visit(NextValExpression arg0) { + } } diff --git a/src/main/java/net/sf/jsqlparser/util/cnfexpression/CNFConverter.java b/src/main/java/net/sf/jsqlparser/util/cnfexpression/CNFConverter.java index c572d6b44..81e404989 100644 --- a/src/main/java/net/sf/jsqlparser/util/cnfexpression/CNFConverter.java +++ b/src/main/java/net/sf/jsqlparser/util/cnfexpression/CNFConverter.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2017 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.util.cnfexpression; @@ -31,187 +19,6 @@ import net.sf.jsqlparser.expression.NotExpression; import net.sf.jsqlparser.expression.operators.relational.LikeExpression; -/** - * This class handles the conversion from a normal expression tree into - * the CNF form. - * - * Here is the definition of CNF form: - * https://en.wikipedia.org/wiki/Conjunctive_normal_form - * - * Basically it will follow these steps: - * - * To help understanding, I will generate an example: - * Here is the original tree: - * OR - * / \ - * OR NOT - * / \ | - * NOT H AND - * | / \ - * NOT G OR - * | / \ - * F H NOT - * | - * OR - * / \ - * AND L - * / \ - * ( ) ( ) - * | | - * J K - * - * 1. rebuild the tree by replacing the "and" and "or" operators - * (which are binary) into their counterparts node that could hold - * multiple elements. Also, leave out the parenthesis node between the - * conditional operators to make the tree uniform. - * - * After the transform, the result should be like this: - * OR(M) - * / \ - * OR(M) NOT - * / \ | - * NOT H AND(M) - * | / \ - * NOT G OR(M) - * | / \ - * F H NOT - * | - * OR(M) - * / \ - * AND(M) L - * / \ - * J K - * - * 2. push the not operators into the bottom of the expression. That - * means the not operator will be the root of the expression tree - * where no "and" or "or" exists. Be sure use the De Morgan's law - * and double not law. - * - * How to use De Morgan law: - * For example, here is the original expression tree: - * NOT - * | - * AND(M) - * / \ - * G H - * - * After we use the De Morgan law, the result should be like this: - * OR(M) - * / \ - * NOT NOT - * | | - * G H - * - * After the transform, the result should be like this: - * OR(M) - * / \ - * OR(M) OR(M) - * / \ / \ - * F H NOT AND(M) - * | / \ - * G NOT OR(M) - * | / \ - * H AND(M) L - * / \ - * J K - * - * 3. gather all the adjacent "and" or "or" operator together. - * After doing that, the expression tree will be presented as: - * all the and expression will be in either odd or even levels, - * this will be the same for the or operator. - * - * After the transform, the expression tree should be like this: - * OR(M) - * / / \ \ - * F H NOT AND(M) - * | / \ - * G NOT OR(M) - * | / \ - * H AND(M) L - * / \ - * J K - * - * 4. push the and operator upwards until the root is an and - * operator and all the children are or operators with multiple - * components. At this time we get the result: an expression in CNF form. - * How do we push and up? Use distribution law! - * - * For example, here is the way to push the and up and merge them. - * OR - * / \ - * AND L - * / \ - * J K - * - * In the normal form, it could be: (J AND K) OR L. - * If we apply the distribution law, we will get the result like this: - * (J OR L) AND (K OR L), the tree form of this should be like: - * AND - * / \ - * OR OR - * / \ / \ - * J L K L - * - * So after we push the AND at the deepest level up and merge it with the - * existing add, we get this result. - * OR(M) - * / / \ \ - * F H NOT AND(M) - * | / | \ - * G NOT OR(M) OR(M) - * | / \ / \ - * H J L K L - * - * Now let us push the and up and we will get the result like this: - * AND(M) - * / | \ - * OR(M) OR(M) OR(M) - * / / \ \ / / | \ \ / / | \ \ - * F H NOT NOT F H NOT J L F H NOT K L - * | | | | - * G H G G - * - * 5. The last step, convert the Multiple Expression back to the binary - * form. Note the final tree shall be left-inclined. - * - * The final expression tree shall be like this: - * AND - * / \ - * AND ( ) - * / \ | - * ( ) ( ) part1 - * | | - * OR part2 - * / \ - * OR NOT - * / \ | - * OR NOT H - * / \ | - * F H G - * - * part1: OR - * / \ - * OR L - * / \ - * OR K - * / \ - * OR NOT - * / \ | - * F H G - * - * part2: OR - * / \ - * OR L - * / \ - * OR J - * / \ - * OR NOT - * / \ | - * F H G - * - * @author messfish - * - */ public class CNFConverter { private Expression root; @@ -229,14 +36,6 @@ public class CNFConverter { private boolean isUsed = false; private CloneHelper clone = new CloneHelper(); - /** - * this class is mainly used for gather the parent expression, - * children expression and the level of the children expression - * in the expression tree together. - * - * @author messfish - * - */ private class Mule { private Expression parent; @@ -250,13 +49,6 @@ private Mule(Expression parent, Expression child, int level) { } } - /** - * Since the class is only used once, I create this method to make the rest - * of the methods private. - * - * @param expr the expression that will be converted. - * @return the converted expression. - */ public static Expression convertToCNF(Expression expr) { CNFConverter cnf = new CNFConverter(); return cnf.convert(expr); diff --git a/src/main/java/net/sf/jsqlparser/util/cnfexpression/CloneHelper.java b/src/main/java/net/sf/jsqlparser/util/cnfexpression/CloneHelper.java index ffd8e555b..855c7d724 100644 --- a/src/main/java/net/sf/jsqlparser/util/cnfexpression/CloneHelper.java +++ b/src/main/java/net/sf/jsqlparser/util/cnfexpression/CloneHelper.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2017 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.util.cnfexpression; @@ -31,30 +19,8 @@ import net.sf.jsqlparser.expression.operators.conditional.AndExpression; import net.sf.jsqlparser.expression.operators.conditional.OrExpression; -/** - * This class is mainly used for handling the cloning of an expression tree. - * Note this is the shallow copy of the tree. That means I do not modify - * or copy the expression other than these expressions: - * AND, OR, NOT, (), MULTI-AND, MULTI-OR. - * Since the CNF conversion only change the condition part of the tree. - * @author messfish - * - */ class CloneHelper { - /** - * This method is used for changing the logical structure of the tree. - * The main method is to convert and operator and or operator to let - * them have multiple children (reflected in MultipleExpression.java - * from the conditional package). Note if the value from the conditional - * operator has a not attached to it we need to append an not operator - * ahead of it since the not operator needed to be pushed down during - * the second step. Also, I will leave out all the parenthesis expression - * which is connected to the conditional operator. - * @param express the expression that will be modified - * @return the modified expression. - * - */ public Expression modify(Expression express) { if(express instanceof NotExpression) { return new NotExpression(modify(((NotExpression) express).getExpression())); @@ -96,7 +62,6 @@ public Expression modify(Expression express) { return new NotExpression(modify(binary)); } } - /* at this stage, there is no need to modify, just simply return. */ return express; } diff --git a/src/main/java/net/sf/jsqlparser/util/cnfexpression/MultiAndExpression.java b/src/main/java/net/sf/jsqlparser/util/cnfexpression/MultiAndExpression.java index d5d37d13e..ac94d8758 100644 --- a/src/main/java/net/sf/jsqlparser/util/cnfexpression/MultiAndExpression.java +++ b/src/main/java/net/sf/jsqlparser/util/cnfexpression/MultiAndExpression.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2017 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.util.cnfexpression; @@ -25,11 +13,6 @@ import net.sf.jsqlparser.expression.Expression; -/** - * This helper class is mainly used for handling the CNF conversion. - * @author messfish - * - */ public final class MultiAndExpression extends MultipleExpression { public MultiAndExpression(List childlist) { @@ -41,4 +24,4 @@ public String getStringExpression() { return "AND"; } -} \ No newline at end of file +} diff --git a/src/main/java/net/sf/jsqlparser/util/cnfexpression/MultiOrExpression.java b/src/main/java/net/sf/jsqlparser/util/cnfexpression/MultiOrExpression.java index 9b8bdcba8..8cc6f56df 100644 --- a/src/main/java/net/sf/jsqlparser/util/cnfexpression/MultiOrExpression.java +++ b/src/main/java/net/sf/jsqlparser/util/cnfexpression/MultiOrExpression.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2017 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.util.cnfexpression; @@ -25,11 +13,6 @@ import net.sf.jsqlparser.expression.Expression; -/** - * This helper class is mainly used for handling the CNF conversion. - * @author messfish - * - */ public final class MultiOrExpression extends MultipleExpression { public MultiOrExpression(List childlist) { diff --git a/src/main/java/net/sf/jsqlparser/util/cnfexpression/MultipleExpression.java b/src/main/java/net/sf/jsqlparser/util/cnfexpression/MultipleExpression.java index a2ce6fee2..db8a3ceb2 100644 --- a/src/main/java/net/sf/jsqlparser/util/cnfexpression/MultipleExpression.java +++ b/src/main/java/net/sf/jsqlparser/util/cnfexpression/MultipleExpression.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2017 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.util.cnfexpression; @@ -28,11 +16,6 @@ import net.sf.jsqlparser.expression.NullValue; import net.sf.jsqlparser.parser.ASTNodeAccessImpl; -/** - * This is a helper class that mainly used for handling the CNF conversion. - * @author messfish - * - */ public abstract class MultipleExpression extends ASTNodeAccessImpl implements Expression { private final List childlist; diff --git a/src/main/java/net/sf/jsqlparser/util/deparser/AlterDeParser.java b/src/main/java/net/sf/jsqlparser/util/deparser/AlterDeParser.java index 67bef8cd5..481686dc2 100644 --- a/src/main/java/net/sf/jsqlparser/util/deparser/AlterDeParser.java +++ b/src/main/java/net/sf/jsqlparser/util/deparser/AlterDeParser.java @@ -1,33 +1,16 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2015 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.util.deparser; import net.sf.jsqlparser.statement.alter.Alter; -/** - * very simple alter statement deparser - * - * @author toben - */ public class AlterDeParser { protected StringBuilder buffer; diff --git a/src/main/java/net/sf/jsqlparser/util/deparser/AlterViewDeParser.java b/src/main/java/net/sf/jsqlparser/util/deparser/AlterViewDeParser.java index 4a61d7bb3..6736f57d8 100644 --- a/src/main/java/net/sf/jsqlparser/util/deparser/AlterViewDeParser.java +++ b/src/main/java/net/sf/jsqlparser/util/deparser/AlterViewDeParser.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.util.deparser; @@ -25,18 +13,11 @@ import net.sf.jsqlparser.statement.select.PlainSelect; import net.sf.jsqlparser.statement.select.SelectVisitor; -/** - * A class to de-parse (that is, tranform from JSqlParser hierarchy into a string) a - * {@link net.sf.jsqlparser.statement.create.view.AlterView} - */ public class AlterViewDeParser { protected StringBuilder buffer; private SelectVisitor selectVisitor; - /** - * @param buffer the buffer that will be filled with the select - */ public AlterViewDeParser(StringBuilder buffer) { SelectDeParser selectDeParser = new SelectDeParser(); selectDeParser.setBuffer(buffer); diff --git a/src/main/java/net/sf/jsqlparser/util/deparser/CreateIndexDeParser.java b/src/main/java/net/sf/jsqlparser/util/deparser/CreateIndexDeParser.java index b1737c76c..1a93b3be2 100644 --- a/src/main/java/net/sf/jsqlparser/util/deparser/CreateIndexDeParser.java +++ b/src/main/java/net/sf/jsqlparser/util/deparser/CreateIndexDeParser.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.util.deparser; @@ -26,19 +14,10 @@ import net.sf.jsqlparser.statement.create.index.CreateIndex; import net.sf.jsqlparser.statement.create.table.Index; -/** - * A class to de-parse (that is, tranform from JSqlParser hierarchy into a string) a - * {@link net.sf.jsqlparser.statement.create.index.CreateIndex} - * - * @author Raymond Augé - */ public class CreateIndexDeParser { protected StringBuilder buffer; - /** - * @param buffer the buffer that will be filled with the create - */ public CreateIndexDeParser(StringBuilder buffer) { this.buffer = buffer; } diff --git a/src/main/java/net/sf/jsqlparser/util/deparser/CreateTableDeParser.java b/src/main/java/net/sf/jsqlparser/util/deparser/CreateTableDeParser.java index 5b7e7153f..98275aaec 100644 --- a/src/main/java/net/sf/jsqlparser/util/deparser/CreateTableDeParser.java +++ b/src/main/java/net/sf/jsqlparser/util/deparser/CreateTableDeParser.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.util.deparser; @@ -30,18 +18,11 @@ import net.sf.jsqlparser.statement.select.Select; -/** - * A class to de-parse (that is, tranform from JSqlParser hierarchy into a string) a - * {@link net.sf.jsqlparser.statement.create.table.CreateTable} - */ public class CreateTableDeParser { protected StringBuilder buffer; private StatementDeParser statementDeParser; - /** - * @param buffer the buffer that will be filled with the select - */ public CreateTableDeParser(StringBuilder buffer) { this.buffer = buffer; } diff --git a/src/main/java/net/sf/jsqlparser/util/deparser/CreateViewDeParser.java b/src/main/java/net/sf/jsqlparser/util/deparser/CreateViewDeParser.java index d106e59e3..e6318bad6 100644 --- a/src/main/java/net/sf/jsqlparser/util/deparser/CreateViewDeParser.java +++ b/src/main/java/net/sf/jsqlparser/util/deparser/CreateViewDeParser.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.util.deparser; @@ -28,18 +16,11 @@ import net.sf.jsqlparser.statement.select.SelectVisitor; import net.sf.jsqlparser.statement.select.WithItem; -/** - * A class to de-parse (that is, tranform from JSqlParser hierarchy into a string) a - * {@link net.sf.jsqlparser.statement.create.view.CreateView} - */ public class CreateViewDeParser { protected StringBuilder buffer; private final SelectVisitor selectVisitor; - /** - * @param buffer the buffer that will be filled with the select - */ public CreateViewDeParser(StringBuilder buffer) { SelectDeParser selectDeParser = new SelectDeParser(); selectDeParser.setBuffer(buffer); diff --git a/src/main/java/net/sf/jsqlparser/util/deparser/DeleteDeParser.java b/src/main/java/net/sf/jsqlparser/util/deparser/DeleteDeParser.java index 876e17bbf..3f782f700 100644 --- a/src/main/java/net/sf/jsqlparser/util/deparser/DeleteDeParser.java +++ b/src/main/java/net/sf/jsqlparser/util/deparser/DeleteDeParser.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.util.deparser; @@ -27,10 +15,6 @@ import net.sf.jsqlparser.statement.delete.Delete; import net.sf.jsqlparser.statement.select.Join; -/** - * A class to de-parse (that is, tranform from JSqlParser hierarchy into a string) a - * {@link net.sf.jsqlparser.statement.delete.Delete} - */ public class DeleteDeParser { protected StringBuilder buffer = new StringBuilder(); @@ -39,12 +23,6 @@ public class DeleteDeParser { public DeleteDeParser() { } - /** - * @param expressionVisitor a {@link ExpressionVisitor} to de-parse expressions. It has to share - * the same
- * StringBuilder (buffer parameter) as this object in order to work - * @param buffer the buffer that will be filled with the select - */ public DeleteDeParser(ExpressionVisitor expressionVisitor, StringBuilder buffer) { this.buffer = buffer; this.expressionVisitor = expressionVisitor; diff --git a/src/main/java/net/sf/jsqlparser/util/deparser/DropDeParser.java b/src/main/java/net/sf/jsqlparser/util/deparser/DropDeParser.java index 0327a8264..175a4bd9b 100644 --- a/src/main/java/net/sf/jsqlparser/util/deparser/DropDeParser.java +++ b/src/main/java/net/sf/jsqlparser/util/deparser/DropDeParser.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2015 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.util.deparser; @@ -24,9 +12,6 @@ import net.sf.jsqlparser.statement.drop.Drop; import net.sf.jsqlparser.statement.select.PlainSelect; -/** - * @author tw - */ public class DropDeParser { protected StringBuilder buffer; diff --git a/src/main/java/net/sf/jsqlparser/util/deparser/ExecuteDeParser.java b/src/main/java/net/sf/jsqlparser/util/deparser/ExecuteDeParser.java index a6c99ea0d..fd98dba8f 100644 --- a/src/main/java/net/sf/jsqlparser/util/deparser/ExecuteDeParser.java +++ b/src/main/java/net/sf/jsqlparser/util/deparser/ExecuteDeParser.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.util.deparser; @@ -31,12 +19,6 @@ public class ExecuteDeParser { protected StringBuilder buffer; private ExpressionVisitor expressionVisitor; - /** - * @param expressionVisitor a {@link ExpressionVisitor} to de-parse expressions. It has to share - * the same
- * StringBuilder (buffer parameter) as this object in order to work - * @param buffer the buffer that will be filled with the select - */ public ExecuteDeParser(ExpressionVisitor expressionVisitor, StringBuilder buffer) { this.buffer = buffer; this.expressionVisitor = expressionVisitor; diff --git a/src/main/java/net/sf/jsqlparser/util/deparser/ExpressionDeParser.java b/src/main/java/net/sf/jsqlparser/util/deparser/ExpressionDeParser.java index 9336bfa0d..1780903b7 100644 --- a/src/main/java/net/sf/jsqlparser/util/deparser/ExpressionDeParser.java +++ b/src/main/java/net/sf/jsqlparser/util/deparser/ExpressionDeParser.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.util.deparser; @@ -44,6 +32,7 @@ import net.sf.jsqlparser.expression.KeepExpression; import net.sf.jsqlparser.expression.LongValue; import net.sf.jsqlparser.expression.MySQLGroupConcat; +import net.sf.jsqlparser.expression.NextValExpression; import net.sf.jsqlparser.expression.NotExpression; import net.sf.jsqlparser.expression.NullValue; import net.sf.jsqlparser.expression.NumericBind; @@ -77,7 +66,6 @@ import net.sf.jsqlparser.expression.operators.relational.EqualsTo; import net.sf.jsqlparser.expression.operators.relational.ExistsExpression; import net.sf.jsqlparser.expression.operators.relational.ExpressionList; -import net.sf.jsqlparser.expression.operators.relational.NamedExpressionList; import net.sf.jsqlparser.expression.operators.relational.GreaterThan; import net.sf.jsqlparser.expression.operators.relational.GreaterThanEquals; import net.sf.jsqlparser.expression.operators.relational.InExpression; @@ -89,6 +77,7 @@ import net.sf.jsqlparser.expression.operators.relational.MinorThan; import net.sf.jsqlparser.expression.operators.relational.MinorThanEquals; import net.sf.jsqlparser.expression.operators.relational.MultiExpressionList; +import net.sf.jsqlparser.expression.operators.relational.NamedExpressionList; import net.sf.jsqlparser.expression.operators.relational.NotEqualsTo; import net.sf.jsqlparser.expression.operators.relational.OldOracleJoinBinaryExpression; import net.sf.jsqlparser.expression.operators.relational.RegExpMatchOperator; @@ -101,10 +90,6 @@ import net.sf.jsqlparser.statement.select.SubSelect; import net.sf.jsqlparser.statement.select.WithItem; -/** - * A class to de-parse (that is, tranform from JSqlParser hierarchy into a string) an - * {@link net.sf.jsqlparser.expression.Expression} - */ public class ExpressionDeParser implements ExpressionVisitor, ItemsListVisitor { private static final String NOT = "NOT "; @@ -116,21 +101,6 @@ public class ExpressionDeParser implements ExpressionVisitor, ItemsListVisitor { public ExpressionDeParser() { } - /** - * @param selectVisitor a SelectVisitor to de-parse SubSelects. It has to share the same
- * StringBuilder as this object in order to work, as: - * - *
-     * 
-     * StringBuilder myBuf = new StringBuilder();
-     * MySelectDeparser selectDeparser = new  MySelectDeparser();
-     * selectDeparser.setBuffer(myBuf);
-     * ExpressionDeParser expressionDeParser = new ExpressionDeParser(selectDeparser, myBuf);
-     * 
-     * 
- * - * @param buffer the buffer that will be filled with the expression - */ public ExpressionDeParser(SelectVisitor selectVisitor, StringBuilder buffer) { this(selectVisitor, buffer, new OrderByDeParser()); } @@ -373,7 +343,7 @@ public void visit(Subtraction subtraction) { visitBinaryExpression(subtraction, " - "); } - private void visitBinaryExpression(BinaryExpression binaryExpression, String operator) { + protected void visitBinaryExpression(BinaryExpression binaryExpression, String operator) { if (binaryExpression.isNot()) { buffer.append(NOT); } @@ -447,10 +417,10 @@ public void visit(Function function) { useBracketsInExprList = false; buffer.append("(ALL "); } - if(function.getNamedParameters() != null){ + if (function.getNamedParameters() != null) { visit(function.getNamedParameters()); } - if(function.getParameters() != null){ + if (function.getParameters() != null) { visit(function.getParameters()); } useBracketsInExprList = oldUseBracketsInExprList; @@ -495,12 +465,12 @@ public void visit(NamedExpressionList namedExpressionList) { } List names = namedExpressionList.getNames(); List expressions = namedExpressionList.getExpressions(); - for (int i=0; i0){ + for (int i = 0; i < names.size(); i++) { + if (i > 0) { buffer.append(" "); } String name = names.get(i); - if(! name.equals("")){ + if (!name.equals("")) { buffer.append(name); buffer.append(" "); } @@ -812,4 +782,9 @@ public void visit(DateTimeLiteralExpression literal) { buffer.append(literal.toString()); } + @Override + public void visit(NextValExpression nextVal) { + buffer.append("NEXTVAL FOR ").append(nextVal.getName()); + } + } diff --git a/src/main/java/net/sf/jsqlparser/util/deparser/InsertDeParser.java b/src/main/java/net/sf/jsqlparser/util/deparser/InsertDeParser.java index 26d48334e..672caea5d 100644 --- a/src/main/java/net/sf/jsqlparser/util/deparser/InsertDeParser.java +++ b/src/main/java/net/sf/jsqlparser/util/deparser/InsertDeParser.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.util.deparser; @@ -36,10 +24,6 @@ import net.sf.jsqlparser.statement.select.SubSelect; import net.sf.jsqlparser.statement.select.WithItem; -/** - * A class to de-parse (that is, tranform from JSqlParser hierarchy into a string) an - * {@link net.sf.jsqlparser.statement.insert.Insert} - */ public class InsertDeParser implements ItemsListVisitor { protected StringBuilder buffer; @@ -49,15 +33,6 @@ public class InsertDeParser implements ItemsListVisitor { public InsertDeParser() { } - /** - * @param expressionVisitor a {@link ExpressionVisitor} to de-parse - * {@link net.sf.jsqlparser.expression.Expression}s. It has to share the same
- * StringBuilder (buffer parameter) as this object in order to work - * @param selectVisitor a {@link SelectVisitor} to de-parse {@link net.sf.jsqlparser.statement.select.Select}s. It - * has to share the same
- * StringBuilder (buffer parameter) as this object in order to work - * @param buffer the buffer that will be filled with the insert - */ public InsertDeParser(ExpressionVisitor expressionVisitor, SelectVisitor selectVisitor, StringBuilder buffer) { this.buffer = buffer; this.expressionVisitor = expressionVisitor; diff --git a/src/main/java/net/sf/jsqlparser/util/deparser/LimitDeparser.java b/src/main/java/net/sf/jsqlparser/util/deparser/LimitDeparser.java index 9716b0691..4aa585e63 100644 --- a/src/main/java/net/sf/jsqlparser/util/deparser/LimitDeparser.java +++ b/src/main/java/net/sf/jsqlparser/util/deparser/LimitDeparser.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2015 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.util.deparser; diff --git a/src/main/java/net/sf/jsqlparser/util/deparser/OrderByDeParser.java b/src/main/java/net/sf/jsqlparser/util/deparser/OrderByDeParser.java index f38802fad..9bd4bc018 100644 --- a/src/main/java/net/sf/jsqlparser/util/deparser/OrderByDeParser.java +++ b/src/main/java/net/sf/jsqlparser/util/deparser/OrderByDeParser.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2015 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.util.deparser; diff --git a/src/main/java/net/sf/jsqlparser/util/deparser/ReplaceDeParser.java b/src/main/java/net/sf/jsqlparser/util/deparser/ReplaceDeParser.java index 8e0b03ac5..c39295002 100644 --- a/src/main/java/net/sf/jsqlparser/util/deparser/ReplaceDeParser.java +++ b/src/main/java/net/sf/jsqlparser/util/deparser/ReplaceDeParser.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.util.deparser; @@ -34,10 +22,6 @@ import net.sf.jsqlparser.statement.select.SelectVisitor; import net.sf.jsqlparser.statement.select.SubSelect; -/** - * A class to de-parse (that is, tranform from JSqlParser hierarchy into a string) a - * {@link net.sf.jsqlparser.statement.replace.Replace} - */ public class ReplaceDeParser implements ItemsListVisitor { protected StringBuilder buffer; @@ -47,15 +31,6 @@ public class ReplaceDeParser implements ItemsListVisitor { public ReplaceDeParser() { } - /** - * @param expressionVisitor a {@link ExpressionVisitor} to de-parse expressions. It has to share - * the same
- * StringBuilder (buffer parameter) as this object in order to work - * @param selectVisitor a {@link SelectVisitor} to de-parse - * {@link net.sf.jsqlparser.statement.select.Select}s. It has to share the same
- * StringBuilder (buffer parameter) as this object in order to work - * @param buffer the buffer that will be filled with the select - */ public ReplaceDeParser(ExpressionVisitor expressionVisitor, SelectVisitor selectVisitor, StringBuilder buffer) { this.buffer = buffer; this.expressionVisitor = expressionVisitor; diff --git a/src/main/java/net/sf/jsqlparser/util/deparser/SelectDeParser.java b/src/main/java/net/sf/jsqlparser/util/deparser/SelectDeParser.java index 44696e9a5..48d2ec18c 100644 --- a/src/main/java/net/sf/jsqlparser/util/deparser/SelectDeParser.java +++ b/src/main/java/net/sf/jsqlparser/util/deparser/SelectDeParser.java @@ -1,27 +1,14 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.util.deparser; -import java.util.*; import net.sf.jsqlparser.expression.*; import net.sf.jsqlparser.schema.*; import net.sf.jsqlparser.statement.select.*; @@ -30,10 +17,6 @@ import java.util.Iterator; import java.util.List; -/** - * A class to de-parse (that is, tranform from JSqlParser hierarchy into a string) a - * {@link net.sf.jsqlparser.statement.select.Select} - */ public class SelectDeParser implements SelectVisitor, SelectItemVisitor, FromItemVisitor, PivotVisitor { protected StringBuilder buffer = new StringBuilder(); @@ -42,12 +25,6 @@ public class SelectDeParser implements SelectVisitor, SelectItemVisitor, FromIte public SelectDeParser() { } - /** - * @param expressionVisitor a {@link ExpressionVisitor} to de-parse expressions. It has to share - * the same
- * StringBuilder (buffer parameter) as this object in order to work - * @param buffer the buffer that will be filled with the select - */ public SelectDeParser(ExpressionVisitor expressionVisitor, StringBuilder buffer) { this.buffer = buffer; this.expressionVisitor = expressionVisitor; @@ -188,6 +165,9 @@ public void visit(PlainSelect plainSelect) { buffer.append(plainSelect.getWait()); } } + if (plainSelect.getOptimizeFor() != null) { + deparseOptimizeFor(plainSelect.getOptimizeFor()); + } if (plainSelect.isUseBrackets()) { buffer.append(")"); } @@ -348,9 +328,11 @@ public void visit(SubJoin subjoin) { } public void deparseJoin(Join join) { - if (join.isSimple()) { - buffer.append(", "); - } else { + if (join.isSimple() && join.isOuter()) { + buffer.append(", OUTER "); + } else if (join.isSimple()) { + buffer.append(", "); + } else { if (join.isRight()) { buffer.append(" RIGHT"); @@ -479,4 +461,10 @@ public void visit(ParenthesisFromItem parenthesis) { public void visit(ValuesStatement values) { new ValuesStatementDeParser(expressionVisitor, buffer).deParse(values); } + + private void deparseOptimizeFor(OptimizeFor optimizeFor) { + buffer.append(" OPTIMIZE FOR "); + buffer.append(optimizeFor.getRowCount()); + buffer.append(" ROWS"); + } } diff --git a/src/main/java/net/sf/jsqlparser/util/deparser/SetStatementDeParser.java b/src/main/java/net/sf/jsqlparser/util/deparser/SetStatementDeParser.java index 77477085a..01eb4cfbc 100644 --- a/src/main/java/net/sf/jsqlparser/util/deparser/SetStatementDeParser.java +++ b/src/main/java/net/sf/jsqlparser/util/deparser/SetStatementDeParser.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.util.deparser; @@ -29,12 +17,6 @@ public class SetStatementDeParser { protected StringBuilder buffer; private ExpressionVisitor expressionVisitor; - /** - * @param expressionVisitor a {@link ExpressionVisitor} to de-parse expressions. It has to share - * the same
- * StringBuilder (buffer parameter) as this object in order to work - * @param buffer the buffer that will be filled with the select - */ public SetStatementDeParser(ExpressionVisitor expressionVisitor, StringBuilder buffer) { this.buffer = buffer; this.expressionVisitor = expressionVisitor; diff --git a/src/main/java/net/sf/jsqlparser/util/deparser/ShowStatementDeParser.java b/src/main/java/net/sf/jsqlparser/util/deparser/ShowStatementDeParser.java index 3feb79131..0563afcb8 100644 --- a/src/main/java/net/sf/jsqlparser/util/deparser/ShowStatementDeParser.java +++ b/src/main/java/net/sf/jsqlparser/util/deparser/ShowStatementDeParser.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2017 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.util.deparser; diff --git a/src/main/java/net/sf/jsqlparser/util/deparser/StatementDeParser.java b/src/main/java/net/sf/jsqlparser/util/deparser/StatementDeParser.java index fba4919db..12adc4cdc 100644 --- a/src/main/java/net/sf/jsqlparser/util/deparser/StatementDeParser.java +++ b/src/main/java/net/sf/jsqlparser/util/deparser/StatementDeParser.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.util.deparser; diff --git a/src/main/java/net/sf/jsqlparser/util/deparser/UpdateDeParser.java b/src/main/java/net/sf/jsqlparser/util/deparser/UpdateDeParser.java index 584cae792..370acb40f 100644 --- a/src/main/java/net/sf/jsqlparser/util/deparser/UpdateDeParser.java +++ b/src/main/java/net/sf/jsqlparser/util/deparser/UpdateDeParser.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.util.deparser; @@ -37,10 +25,6 @@ import net.sf.jsqlparser.statement.select.SelectExpressionItem; import net.sf.jsqlparser.statement.select.SelectVisitorAdapter; -/** - * A class to de-parse (that is, tranform from JSqlParser hierarchy into a string) an - * {@link net.sf.jsqlparser.statement.update.Update} - */ public class UpdateDeParser implements OrderByVisitor { protected StringBuilder buffer = new StringBuilder(); @@ -50,15 +34,6 @@ public class UpdateDeParser implements OrderByVisitor { public UpdateDeParser() { } - /** - * @param expressionVisitor a {@link ExpressionVisitor} to de-parse expressions. It has to share - * the same
- * StringBuilder (buffer parameter) as this object in order to work - * @param selectVisitor a {@link SelectVisitor} to de-parse - * {@link net.sf.jsqlparser.statement.select.Select}s. It has to share the same
- * StringBuilder (buffer parameter) as this object in order to work - * @param buffer the buffer that will be filled with the select - */ public UpdateDeParser(ExpressionVisitor expressionVisitor, SelectVisitor selectVisitor, StringBuilder buffer) { this.buffer = buffer; this.expressionVisitor = expressionVisitor; diff --git a/src/main/java/net/sf/jsqlparser/util/deparser/UpsertDeParser.java b/src/main/java/net/sf/jsqlparser/util/deparser/UpsertDeParser.java index 53e8e9591..6c9b3ed39 100644 --- a/src/main/java/net/sf/jsqlparser/util/deparser/UpsertDeParser.java +++ b/src/main/java/net/sf/jsqlparser/util/deparser/UpsertDeParser.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2017 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.util.deparser; @@ -35,28 +23,12 @@ import net.sf.jsqlparser.statement.select.WithItem; import net.sf.jsqlparser.statement.upsert.Upsert; -/** - * A class to de-parse (that is, tranform from JSqlParser hierarchy into a string) - * @author messfish - * - */ public class UpsertDeParser implements ItemsListVisitor { protected StringBuilder buffer; private ExpressionVisitor expressionVisitor; private SelectVisitor selectVisitor; - /** - * Constructor: this constructor is used to assign the values coming from the - * arguments to their global values. - * @param expressionVisitor a {@link ExpressionVisitor} to de-parse - * {@link net.sf.jsqlparser.expression.Expression}s. It has to share the same
- * StringBuilder (buffer parameter) as this object in order to work - * @param selectVisitor a {@link SelectVisitor} to de-parse - * {@link net.sf.jsqlparser.statement.select.Select}s. It has to share the same
- * StringBuilder (buffer parameter) as this object in order to work - * @param buffer the buffer that will be filled with the insert - */ public UpsertDeParser(ExpressionVisitor expressionVisitor, SelectVisitor selectVisitor, StringBuilder buffer) { this.buffer = buffer; this.expressionVisitor = expressionVisitor; diff --git a/src/main/java/net/sf/jsqlparser/util/deparser/UseStatementDeParser.java b/src/main/java/net/sf/jsqlparser/util/deparser/UseStatementDeParser.java index ff7500f75..e28bcae12 100644 --- a/src/main/java/net/sf/jsqlparser/util/deparser/UseStatementDeParser.java +++ b/src/main/java/net/sf/jsqlparser/util/deparser/UseStatementDeParser.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2017 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.util.deparser; diff --git a/src/main/java/net/sf/jsqlparser/util/deparser/ValuesStatementDeParser.java b/src/main/java/net/sf/jsqlparser/util/deparser/ValuesStatementDeParser.java index 508a04a19..b589e821f 100644 --- a/src/main/java/net/sf/jsqlparser/util/deparser/ValuesStatementDeParser.java +++ b/src/main/java/net/sf/jsqlparser/util/deparser/ValuesStatementDeParser.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2017 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.util.deparser; diff --git a/src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjt b/src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjt index f6ae55bc7..cd9bcd17c 100644 --- a/src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjt +++ b/src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjt @@ -4,19 +4,7 @@ * %% * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ @@ -39,27 +27,6 @@ options{ } PARSER_BEGIN(CCJSqlParser) -/* - * #%L - * JSQLParser library - * %% - * Copyright (C) 2004 - 2014 JSQLParser - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . - * #L% - */ package net.sf.jsqlparser.parser; @@ -158,6 +125,7 @@ TOKEN: /* SQL Keywords. prefixed with K_ to avoid name clashes */ | | | +| | | | @@ -206,6 +174,7 @@ TOKEN: /* SQL Keywords. prefixed with K_ to avoid name clashes */ | | | +| | | | @@ -234,6 +203,7 @@ TOKEN: /* SQL Keywords. prefixed with K_ to avoid name clashes */ | | | +| | | | @@ -249,6 +219,7 @@ TOKEN: /* SQL Keywords. prefixed with K_ to avoid name clashes */ | | | +| | | | @@ -1097,7 +1068,7 @@ String RelObjectNameExt(): String result=null; } { - ( result=RelObjectName() | tk= | tk= | tk= | tk= | tk=) + ( result=RelObjectName() | tk= | tk= | tk= | tk= | tk= | ) { if (tk!=null) result=tk.image; return result; @@ -1181,6 +1152,7 @@ PlainSelect PlainSelect() #PlainSelect: Limit limit = null; Offset offset = null; Fetch fetch = null; + OptimizeFor optimize = null; Top top = null; Skip skip = null; First first = null; @@ -1189,6 +1161,7 @@ PlainSelect PlainSelect() #PlainSelect: Table updateTable = null; Wait wait = null; boolean mySqlSqlCalcFoundRows = false; + Token token; } { @@ -1243,6 +1216,8 @@ PlainSelect PlainSelect() #PlainSelect: [ updateTable = Table() { plainSelect.setForUpdateTable(updateTable); } ] [ LOOKAHEAD() wait = Wait() { plainSelect.setWait(wait); } ] ] + [LOOKAHEAD() optimize = OptimizeFor() { plainSelect.setOptimizeFor(optimize); } ] + { plainSelect.setSelectItems(selectItems); plainSelect.setFromItem(fromItem); @@ -1729,7 +1704,7 @@ Join JoinerExpression() #JoinerExpression: | { join.setCross(true); } ] - ( | "," { join.setSimple(true); } ) + ( | "," { join.setSimple(true); } ( { join.setOuter(true); } )? ) right=FromItem() @@ -1995,6 +1970,18 @@ Fetch Fetch(): } } +OptimizeFor OptimizeFor(): +{ + Token token; + LongValue value; +} +{ + token= { value = new LongValue(token.image); } + { + return new OptimizeFor(value.getValue()); + } +} + // according to http://technet.microsoft.com/en-us/library/ms189463.aspx Top Top(): { @@ -2364,6 +2351,20 @@ ExpressionList SimpleExpressionList() #ExpressionList: } } +ExpressionList ConditionExpressionList() #ExpressionList: +{ + ExpressionList retval = new ExpressionList(); + List expressions = new ArrayList(); + Expression expr = null; +} +{ + expr=Condition() { expressions.add(expr); } ("," expr=Condition() { expressions.add(expr); })* + { + retval.setExpressions(expressions); + return retval; + } +} + // trim( [leading|trailing|both] expr from expr) // The [leading|trailing|both] token has already been consumed NamedExpressionList NamedExpressionList1(): @@ -2676,6 +2677,8 @@ Expression PrimaryExpression() #PrimaryExpression: | LOOKAHEAD(JsonExpression()) retval=JsonExpression() + | LOOKAHEAD(FunctionWithCondParams()) retval = FunctionWithCondParams() + | LOOKAHEAD(Function()) retval=Function() | token= { retval = new DoubleValue(token.image); } @@ -2693,7 +2696,9 @@ Expression PrimaryExpression() #PrimaryExpression: | LOOKAHEAD(2) retval = IntervalExpression() - | retval=Column() + | retval = NextValExpression() + + | retval=Column() | LOOKAHEAD("(" SimpleExpression() ")") "(" retval=SimpleExpression() ")" {retval = new Parenthesis(retval); } @@ -2724,6 +2729,16 @@ Expression PrimaryExpression() #PrimaryExpression: } } +NextValExpression NextValExpression() : { + List data = new ArrayList(); +} +{ + data = RelObjectNameList() + { + return new NextValExpression(data); + } +} + JdbcNamedParameter JdbcNamedParameter() : { JdbcNamedParameter parameter = new JdbcNamedParameter(); String name; @@ -3066,6 +3081,28 @@ Execute Execute(): { } } +Function FunctionWithCondParams() #Function: { + Function retval = new Function(); + String funcName = null; + ExpressionList expressionList = null; + Token token = null; +} +{ + (token = | token = ) { funcName=token.image; } + + "(" + expressionList=ConditionExpressionList() + ")" + + { + retval.setParameters(expressionList); + retval.setName(funcName); + linkAST(retval,jjtThis); + return retval; + } +} + + Function Function() #Function: { Function retval = new Function(); @@ -3086,15 +3123,17 @@ Function Function() #Function: funcName=RelObjectNameExt() [ "." tmp=RelObjectNameExt() { funcName+= "." + tmp; } ["." tmp=RelObjectNameExt() { funcName+= "." + tmp; }]] - "(" [ [ { retval.setDistinct(true); } | { retval.setAllColumns(true); }] + "(" [ [ LOOKAHEAD(2)( { retval.setDistinct(true); } | { retval.setAllColumns(true); }) ] ( LOOKAHEAD(4) + "*" { retval.setAllColumns(true); } + | namedExpressionList=NamedExpressionList1() | LOOKAHEAD(NamedExpressionListExprFirst()) namedExpressionList = NamedExpressionListExprFirst() - | - LOOKAHEAD(3) expressionList=SimpleExpressionList() | - "*" { retval.setAllColumns(true); } + LOOKAHEAD(3) expressionList=SimpleExpressionList() + //| + //LOOKAHEAD(ConditionExpressionList()) expressionList=ConditionExpressionList() | expr = SubSelect() { expr.setUseBrackets(false); expressionList = new ExpressionList(expr); } )] @@ -3584,6 +3623,8 @@ List CreateParameter(): tk= { param.add(tk.image); } | tk= { param.add(tk.image); } + | + tk= { param.add(tk.image); } ) {return param;} } @@ -3864,6 +3905,22 @@ AlterExpression AlterExpression(): ) ) | + ( + { + alterExp.setOperation(AlterOperation.CHANGE); + } + ( + { alterExp.setOptionalSpecifier("COLUMN"); } | {} + ) + ( + (tk= | tk=) + alterExpressionColumnDataType = AlterExpressionColumnDataType() { + alterExp.setColOldName(tk.image); + alterExp.addColDataType(alterExpressionColumnDataType); + } + ) + ) + | ( { alterExp.setOperation(AlterOperation.DROP); diff --git a/src/site/site.xml b/src/site/site.xml index 71ff205f3..82c60a6da 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -1,4 +1,14 @@ + + @@ -22,4 +32,4 @@ xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 http://maven.apache - \ No newline at end of file + diff --git a/src/test/java/net/sf/jsqlparser/expression/ExpressionPrecedenceTest.java b/src/test/java/net/sf/jsqlparser/expression/ExpressionPrecedenceTest.java index 7200ad2c1..745162828 100644 --- a/src/test/java/net/sf/jsqlparser/expression/ExpressionPrecedenceTest.java +++ b/src/test/java/net/sf/jsqlparser/expression/ExpressionPrecedenceTest.java @@ -1,20 +1,11 @@ -/* - * Copyright (C) 2017 JSQLParser. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% */ package net.sf.jsqlparser.expression; diff --git a/src/test/java/net/sf/jsqlparser/expression/ExpressionVisitorAdapterTest.java b/src/test/java/net/sf/jsqlparser/expression/ExpressionVisitorAdapterTest.java index 92117eacc..7c78b6694 100644 --- a/src/test/java/net/sf/jsqlparser/expression/ExpressionVisitorAdapterTest.java +++ b/src/test/java/net/sf/jsqlparser/expression/ExpressionVisitorAdapterTest.java @@ -1,20 +1,11 @@ -/* - * Copyright (C) 2015 JSQLParser. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% */ package net.sf.jsqlparser.expression; diff --git a/src/test/java/net/sf/jsqlparser/expression/FunctionWithBooleanParameterTest.java b/src/test/java/net/sf/jsqlparser/expression/FunctionWithBooleanParameterTest.java new file mode 100644 index 000000000..9e377a32b --- /dev/null +++ b/src/test/java/net/sf/jsqlparser/expression/FunctionWithBooleanParameterTest.java @@ -0,0 +1,68 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ +package net.sf.jsqlparser.expression; + +import net.sf.jsqlparser.parser.CCJSqlParserUtil; +import static org.junit.Assert.assertEquals; +import org.junit.Test; + +/** + * Test some cases linked to a boolean (condition) argument as function parameter. + * + * @author Denis Fulachier + * + */ +public class FunctionWithBooleanParameterTest { + + public FunctionWithBooleanParameterTest() { + } + + @Test + public void testParseOpLowerTotally() throws Exception { + Expression result = CCJSqlParserUtil.parseExpression("if(ab, c, d)"); + assertEquals("if(a > b, c, d)", result.toString()); + } + + @Test + public void testParseOpGreaterOrEqual() throws Exception { + Expression result = CCJSqlParserUtil.parseExpression("if(a>=b, c, d)"); + assertEquals("if(a >= b, c, d)", result.toString()); + } + + @Test + public void testParseOpEqual() throws Exception { + Expression result = CCJSqlParserUtil.parseExpression("if(a=b, c, d)"); + assertEquals("if(a = b, c, d)", result.toString()); + } + + @Test + public void testParseOpNotEqualStandard() throws Exception { + Expression result = CCJSqlParserUtil.parseExpression("if(a<>b, c, d)"); + assertEquals("if(a <> b, c, d)", result.toString()); + } + + @Test + public void testParseOpNotEqualBang() throws Exception { + Expression result = CCJSqlParserUtil.parseExpression("if(a!=b, c, d)"); + assertEquals("if(a != b, c, d)", result.toString()); + } +} diff --git a/src/test/java/net/sf/jsqlparser/expression/LongValueTest.java b/src/test/java/net/sf/jsqlparser/expression/LongValueTest.java index 1b952a7f5..301aa65f0 100644 --- a/src/test/java/net/sf/jsqlparser/expression/LongValueTest.java +++ b/src/test/java/net/sf/jsqlparser/expression/LongValueTest.java @@ -1,20 +1,11 @@ -/* - * Copyright (C) 2017 JSQLParser. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% */ package net.sf.jsqlparser.expression; diff --git a/src/test/java/net/sf/jsqlparser/expression/SignedExpressionTest.java b/src/test/java/net/sf/jsqlparser/expression/SignedExpressionTest.java index c190bc74f..be0d13950 100644 --- a/src/test/java/net/sf/jsqlparser/expression/SignedExpressionTest.java +++ b/src/test/java/net/sf/jsqlparser/expression/SignedExpressionTest.java @@ -1,20 +1,11 @@ -/* - * Copyright (C) 2014 JSQLParser. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% */ package net.sf.jsqlparser.expression; diff --git a/src/test/java/net/sf/jsqlparser/expression/StringValueTest.java b/src/test/java/net/sf/jsqlparser/expression/StringValueTest.java index 3cfffb85e..9fecd1046 100644 --- a/src/test/java/net/sf/jsqlparser/expression/StringValueTest.java +++ b/src/test/java/net/sf/jsqlparser/expression/StringValueTest.java @@ -1,20 +1,11 @@ -/* - * Copyright (C) 2016 JSQLParser. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% */ package net.sf.jsqlparser.expression; diff --git a/src/test/java/net/sf/jsqlparser/expression/TimestampValueTest.java b/src/test/java/net/sf/jsqlparser/expression/TimestampValueTest.java index ac74ccd71..b2d097b7f 100644 --- a/src/test/java/net/sf/jsqlparser/expression/TimestampValueTest.java +++ b/src/test/java/net/sf/jsqlparser/expression/TimestampValueTest.java @@ -1,3 +1,12 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ package net.sf.jsqlparser.expression; import net.sf.jsqlparser.JSQLParserException; @@ -8,9 +17,6 @@ import java.util.Date; import java.util.Locale; -/** - * @author Linyu Chen - */ public class TimestampValueTest { @Test diff --git a/src/test/java/net/sf/jsqlparser/expression/mysql/MySqlSqlCalcFoundRowsTest.java b/src/test/java/net/sf/jsqlparser/expression/mysql/MySqlSqlCalcFoundRowsTest.java index d5755e60b..fd32a667f 100644 --- a/src/test/java/net/sf/jsqlparser/expression/mysql/MySqlSqlCalcFoundRowsTest.java +++ b/src/test/java/net/sf/jsqlparser/expression/mysql/MySqlSqlCalcFoundRowsTest.java @@ -1,22 +1,10 @@ -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2017 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ package net.sf.jsqlparser.expression.mysql; diff --git a/src/test/java/net/sf/jsqlparser/expression/operators/relational/LikeExpressionTest.java b/src/test/java/net/sf/jsqlparser/expression/operators/relational/LikeExpressionTest.java index 6d154c9d0..fae8855ca 100644 --- a/src/test/java/net/sf/jsqlparser/expression/operators/relational/LikeExpressionTest.java +++ b/src/test/java/net/sf/jsqlparser/expression/operators/relational/LikeExpressionTest.java @@ -1,20 +1,11 @@ -/* - * Copyright (C) 2018 JSQLParser. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% */ package net.sf.jsqlparser.expression.operators.relational; diff --git a/src/test/java/net/sf/jsqlparser/parser/CCJSqlParserUtilTest.java b/src/test/java/net/sf/jsqlparser/parser/CCJSqlParserUtilTest.java index ccd3a6a41..098c8a20f 100644 --- a/src/test/java/net/sf/jsqlparser/parser/CCJSqlParserUtilTest.java +++ b/src/test/java/net/sf/jsqlparser/parser/CCJSqlParserUtilTest.java @@ -1,3 +1,12 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ package net.sf.jsqlparser.parser; import net.sf.jsqlparser.JSQLParserException; @@ -11,14 +20,15 @@ import org.junit.After; import org.junit.AfterClass; import static org.junit.Assert.*; + +import java.io.ByteArrayInputStream; +import java.io.StringReader; +import java.nio.charset.StandardCharsets; + import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -/** - * - * @author toben - */ public class CCJSqlParserUtilTest { public CCJSqlParserUtilTest() { @@ -65,7 +75,18 @@ public void testParseExpression2() throws Exception { @Test(expected = JSQLParserException.class) public void testParseExpressionNonPartial() throws Exception { - Expression result = CCJSqlParserUtil.parseExpression("a+", false); + CCJSqlParserUtil.parseExpression("a+", false); + + } + + @Test(expected = JSQLParserException.class) + public void testParseExpressionFromStringFail() throws Exception { + CCJSqlParserUtil.parse("whatever$"); + } + + @Test(expected = JSQLParserException.class) + public void testParseExpressionFromRaderFail() throws Exception { + CCJSqlParserUtil.parse(new StringReader("whatever$")); } @Test @@ -80,6 +101,24 @@ public void testParseCondExpression() throws Exception { assertEquals("a + b > 5 AND c < 3", result.toString()); } + @Test(expected = JSQLParserException.class) + public void testParseCondExpressionFail() throws Exception { + CCJSqlParserUtil.parseCondExpression(";"); + + } + + @Test(expected = JSQLParserException.class) + public void testParseFromStreamFail() throws Exception { + CCJSqlParserUtil.parse(new ByteArrayInputStream("BLA".getBytes(StandardCharsets.UTF_8))); + + } + + @Test(expected = JSQLParserException.class) + public void testParseFromStreamWithEncodingFail() throws Exception { + CCJSqlParserUtil.parse(new ByteArrayInputStream("BLA".getBytes(StandardCharsets.UTF_8)), StandardCharsets.UTF_8.name()); + + } + @Test public void testParseCondExpressionNonPartial() throws Exception { Expression result = CCJSqlParserUtil.parseCondExpression("x=92 and y=29", false); @@ -121,6 +160,16 @@ public void testParseStatementsIssue691() throws Exception { + "SELECT * FROM dual;\n", result.toString()); } + @Test(expected = JSQLParserException.class) + public void testParseStatementsFail() throws Exception { + CCJSqlParserUtil.parseStatements("select * from dual;WHATEVER!!"); + } + + @Test(expected = JSQLParserException.class) + public void testParseASTFail() throws Exception { + CCJSqlParserUtil.parseAST("select * from dual;WHATEVER!!"); + } + @Test public void testParseStatementsIssue691_2() throws Exception { Statements result = CCJSqlParserUtil.parseStatements( @@ -128,4 +177,17 @@ public void testParseStatementsIssue691_2() throws Exception { + "---test"); assertEquals("SELECT * FROM dual;\n", result.toString()); } + + @Test + public void testParseStatementIssue742() throws Exception { + Statements result = CCJSqlParserUtil.parseStatements("CREATE TABLE `table_name` (\n" + + " `id` bigint(20) NOT NULL AUTO_INCREMENT,\n" + + " `another_column_id` bigint(20) NOT NULL COMMENT 'column id as sent by SYSTEM',\n" + + " PRIMARY KEY (`id`),\n" + + " UNIQUE KEY `uk_another_column_id` (`another_column_id`)\n" + + ")"); + assertEquals("CREATE TABLE `table_name` (`id` bigint (20) NOT NULL AUTO_INCREMENT, `another_column_id` " + + "bigint (20) NOT NULL COMMENT 'column id as sent by SYSTEM', PRIMARY KEY (`id`), UNIQUE KEY `uk_another_column_id` " + + "(`another_column_id`));\n", result.toString()); + } } diff --git a/src/test/java/net/sf/jsqlparser/parser/JSQLParserExceptionTest.java b/src/test/java/net/sf/jsqlparser/parser/JSQLParserExceptionTest.java new file mode 100644 index 000000000..5b38f25b7 --- /dev/null +++ b/src/test/java/net/sf/jsqlparser/parser/JSQLParserExceptionTest.java @@ -0,0 +1,93 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ +package net.sf.jsqlparser.parser; + +import net.sf.jsqlparser.JSQLParserException; +import org.junit.After; +import org.junit.AfterClass; + +import static org.junit.Assert.*; + +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.nio.charset.StandardCharsets; + +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +/** + * + * @author schwitters + */ +public class JSQLParserExceptionTest { + + public JSQLParserExceptionTest() { + } + + @BeforeClass + public static void setUpClass() { + } + + @AfterClass + public static void tearDownClass() { + } + + @Before + public void setUp() { + } + + @After + public void tearDown() { + } + + /** + * Test of parseExpression method, of class CCJSqlParserUtil. + */ + @Test + public void testExceptionWithCause() throws Exception { + IllegalArgumentException arg1 = new IllegalArgumentException(); + JSQLParserException ex1=new JSQLParserException("", arg1); + assertSame(arg1, ex1.getCause()); + } + @Test + public void testExceptionPrintStacktrace() throws Exception { + IllegalArgumentException arg1 = new IllegalArgumentException("BRATKARTOFFEL"); + JSQLParserException ex1=new JSQLParserException("", arg1); + StringWriter sw = new StringWriter(); + ex1.printStackTrace(new PrintWriter(sw, true)); + assertTrue(sw.toString().contains("BRATKARTOFFEL")); + ByteArrayOutputStream bos = new ByteArrayOutputStream(); + ex1.printStackTrace(new PrintStream(bos, true)); + assertTrue(new String(bos.toByteArray(), StandardCharsets.UTF_8).contains("BRATKARTOFFEL")); + + } + + @Test + public void testExceptionPrintStacktraceNoCause() throws Exception { + JSQLParserException ex1=new JSQLParserException("", null); + StringWriter sw = new StringWriter(); + ex1.printStackTrace(new PrintWriter(sw, true)); + assertFalse(sw.toString().contains("BRATKARTOFFEL")); + ByteArrayOutputStream bos = new ByteArrayOutputStream(); + ex1.printStackTrace(new PrintStream(bos, true)); + assertFalse(new String(bos.toByteArray(), StandardCharsets.UTF_8).contains("BRATKARTOFFEL")); + } + @Test + public void testExceptionDefaultContructorCauseInit() throws Exception { + JSQLParserException ex1=new JSQLParserException(); + assertNull(ex1.getCause()); + ex1=new JSQLParserException((Throwable) null); + assertNull(ex1.getCause()); + } + +} diff --git a/src/test/java/net/sf/jsqlparser/schema/ColumnTest.java b/src/test/java/net/sf/jsqlparser/schema/ColumnTest.java index a32808d9d..970c5ea8b 100644 --- a/src/test/java/net/sf/jsqlparser/schema/ColumnTest.java +++ b/src/test/java/net/sf/jsqlparser/schema/ColumnTest.java @@ -1,20 +1,11 @@ -/* - * Copyright (C) 2016 JSQLParser. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% */ package net.sf.jsqlparser.schema; diff --git a/src/test/java/net/sf/jsqlparser/schema/DatabaseTest.java b/src/test/java/net/sf/jsqlparser/schema/DatabaseTest.java new file mode 100644 index 000000000..86c54a286 --- /dev/null +++ b/src/test/java/net/sf/jsqlparser/schema/DatabaseTest.java @@ -0,0 +1,70 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ +package net.sf.jsqlparser.schema; + +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import static org.junit.Assert.*; + +/** + * + * @author schwitters + */ +public class DatabaseTest { + + public DatabaseTest() { + } + + @BeforeClass + public static void setUpClass() { + } + + @AfterClass + public static void tearDownClass() { + } + + @Before + public void setUp() { + } + + @After + public void tearDown() { + } + + @Test + public void testDatabaseSimple() { + String databaseName = "db1"; + Database database = new Database(databaseName); + assertEquals(databaseName, database.getFullyQualifiedName()); + } + + @Test + public void testDatabaseAndServer() { + final Server server = new Server("SERVER", "INSTANCE"); + String databaseName = "db1"; + Database database = new Database(server, databaseName); + assertEquals("[SERVER\\INSTANCE].db1", database.getFullyQualifiedName()); + assertSame(server, database.getServer()); + assertEquals(databaseName, database.getDatabaseName()); + assertEquals("[SERVER\\INSTANCE].db1", database.toString()); + } + + @Test + public void testNullDatabaseAndServer() { + final Server server = new Server("SERVER", "INSTANCE"); + Database database = new Database(server, null); + assertEquals("[SERVER\\INSTANCE].", database.getFullyQualifiedName()); + assertSame(server, database.getServer()); + } + +} diff --git a/src/test/java/net/sf/jsqlparser/schema/ServerTest.java b/src/test/java/net/sf/jsqlparser/schema/ServerTest.java index 924492c74..741690fb7 100644 --- a/src/test/java/net/sf/jsqlparser/schema/ServerTest.java +++ b/src/test/java/net/sf/jsqlparser/schema/ServerTest.java @@ -1,29 +1,17 @@ -package net.sf.jsqlparser.schema; - -import static org.junit.Assert.assertEquals; -import org.junit.Test; - -/* +/*- * #%L * JSQLParser library * %% - * Copyright (C) 2004 - 2013 JSQLParser + * Copyright (C) 2004 - 2019 JSQLParser * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as - * published by the Free Software Foundation, either version 2.1 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Lesser Public License for more details. - * - * You should have received a copy of the GNU General Lesser Public - * License along with this program. If not, see - * . + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 * #L% */ +package net.sf.jsqlparser.schema; + +import static org.junit.Assert.assertEquals; +import org.junit.Test; + public class ServerTest { @Test @@ -37,6 +25,7 @@ public void testServerNameParsing() throws Exception { assertEquals(fullServerName, server.toString()); } + @Test public void testServerNameAndInstanceParsing() throws Exception { final String serverName = "LOCALHOST"; final String serverInstanceName = "SQLSERVER"; @@ -49,4 +38,50 @@ public void testServerNameAndInstanceParsing() throws Exception { assertEquals(fullServerName, server.toString()); } + @Test + public void testServerNameAndInstanceParsing2() throws Exception { + String simpleName = "LOCALHOST"; + final Server server = new Server(simpleName); + assertEquals(simpleName, server.getFullyQualifiedName()); + } + @Test + public void testServerNameAndInstanceParsingNull() throws Exception { + final Server server = new Server(null); + assertEquals("", server.getFullyQualifiedName()); + } + @Test + public void testServerNameAndInstancePassValues() throws Exception { + final Server server = new Server("SERVER", "INSTANCE"); + assertEquals("SERVER", server.getServerName()); + assertEquals("INSTANCE", server.getInstanceName()); + assertEquals(String.format("[%s\\%s]", "SERVER", "INSTANCE"), server.getFullyQualifiedName()); + } + @Test + public void testServerNameNull() throws Exception { + final Server server = new Server(null, "INSTANCE"); + assertEquals(null, server.getServerName()); + assertEquals("INSTANCE", server.getInstanceName()); + assertEquals("", server.getFullyQualifiedName()); + } + @Test + public void testServerNameEmpty() throws Exception { + final Server server = new Server("", "INSTANCE"); + assertEquals("", server.getServerName()); + assertEquals("INSTANCE", server.getInstanceName()); + assertEquals("", server.getFullyQualifiedName()); + } + @Test + public void testInstanceNameNull() throws Exception { + final Server server = new Server("LOCALHOST", null); + assertEquals("LOCALHOST", server.getServerName()); + assertEquals(null, server.getInstanceName()); + assertEquals("[LOCALHOST]", server.getFullyQualifiedName()); + } + @Test + public void testInstanceNameEmpty() throws Exception { + final Server server = new Server("LOCALHOST", ""); + assertEquals("LOCALHOST", server.getServerName()); + assertEquals("", server.getInstanceName()); + assertEquals("[LOCALHOST]", server.getFullyQualifiedName()); + } } diff --git a/src/test/java/net/sf/jsqlparser/statement/AdaptersTest.java b/src/test/java/net/sf/jsqlparser/statement/AdaptersTest.java index 9997d125b..9eb5fa3ea 100644 --- a/src/test/java/net/sf/jsqlparser/statement/AdaptersTest.java +++ b/src/test/java/net/sf/jsqlparser/statement/AdaptersTest.java @@ -1,3 +1,12 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ package net.sf.jsqlparser.statement; import net.sf.jsqlparser.JSQLParserException; @@ -16,9 +25,6 @@ import static org.junit.Assert.assertEquals; -/** - * @author aalmiray - */ public class AdaptersTest { /** diff --git a/src/test/java/net/sf/jsqlparser/statement/BlockTest.java b/src/test/java/net/sf/jsqlparser/statement/BlockTest.java index 339c90d2a..e5d11d93a 100644 --- a/src/test/java/net/sf/jsqlparser/statement/BlockTest.java +++ b/src/test/java/net/sf/jsqlparser/statement/BlockTest.java @@ -1,20 +1,11 @@ -/* - * Copyright (C) 2018 JSQLParser. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% */ package net.sf.jsqlparser.statement; @@ -23,6 +14,7 @@ import org.junit.After; import org.junit.AfterClass; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; @@ -76,4 +68,18 @@ public void testBlock2() throws JSQLParserException { + "", stmts.toString()); } + @Test + public void testBlock3() throws JSQLParserException { + Statements stmts = CCJSqlParserUtil.parseStatements("begin\nselect * from feature;\nend"); + Block block =(Block) stmts.getStatements().get(0); + assertFalse(block.getStatements().getStatements().isEmpty()); + } + @Test + public void testBlockToStringIsNullSafe() throws JSQLParserException { + Block block = new Block(); + block.setStatements(null); + assertEquals("BEGIN\n" + + "END", block.toString()); + } + } diff --git a/src/test/java/net/sf/jsqlparser/statement/DescribeTest.java b/src/test/java/net/sf/jsqlparser/statement/DescribeTest.java index 0359f050b..79e8b4f9b 100644 --- a/src/test/java/net/sf/jsqlparser/statement/DescribeTest.java +++ b/src/test/java/net/sf/jsqlparser/statement/DescribeTest.java @@ -1,13 +1,18 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ package net.sf.jsqlparser.statement; import net.sf.jsqlparser.JSQLParserException; import static net.sf.jsqlparser.test.TestUtils.*; import org.junit.Test; -/** - * - * @author tw - */ public class DescribeTest { @Test diff --git a/src/test/java/net/sf/jsqlparser/statement/ExplainTest.java b/src/test/java/net/sf/jsqlparser/statement/ExplainTest.java index f7bd9f18d..1780f6d2e 100644 --- a/src/test/java/net/sf/jsqlparser/statement/ExplainTest.java +++ b/src/test/java/net/sf/jsqlparser/statement/ExplainTest.java @@ -1,13 +1,18 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ package net.sf.jsqlparser.statement; import net.sf.jsqlparser.JSQLParserException; import static net.sf.jsqlparser.test.TestUtils.*; import org.junit.Test; -/** - * - * @author tw - */ public class ExplainTest { @Test diff --git a/src/test/java/net/sf/jsqlparser/statement/SetStatementTest.java b/src/test/java/net/sf/jsqlparser/statement/SetStatementTest.java index b938024ec..1b4a8d71f 100644 --- a/src/test/java/net/sf/jsqlparser/statement/SetStatementTest.java +++ b/src/test/java/net/sf/jsqlparser/statement/SetStatementTest.java @@ -1,20 +1,11 @@ -/* - * Copyright (C) 2015 JSQLParser. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% */ package net.sf.jsqlparser.statement; diff --git a/src/test/java/net/sf/jsqlparser/statement/ShowStatementTest.java b/src/test/java/net/sf/jsqlparser/statement/ShowStatementTest.java index 10b6910fa..e77d82ba8 100644 --- a/src/test/java/net/sf/jsqlparser/statement/ShowStatementTest.java +++ b/src/test/java/net/sf/jsqlparser/statement/ShowStatementTest.java @@ -1,20 +1,11 @@ -/* - * Copyright (C) 2015 JSQLParser. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% */ package net.sf.jsqlparser.statement; diff --git a/src/test/java/net/sf/jsqlparser/statement/StatementsTest.java b/src/test/java/net/sf/jsqlparser/statement/StatementsTest.java index 0ec8b9c47..5ae82d230 100644 --- a/src/test/java/net/sf/jsqlparser/statement/StatementsTest.java +++ b/src/test/java/net/sf/jsqlparser/statement/StatementsTest.java @@ -1,3 +1,12 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ package net.sf.jsqlparser.statement; import net.sf.jsqlparser.JSQLParserException; @@ -13,10 +22,6 @@ import org.junit.Test; import static org.junit.Assert.*; -/** - * - * @author toben - */ public class StatementsTest { public StatementsTest() { diff --git a/src/test/java/net/sf/jsqlparser/statement/UseStatementTest.java b/src/test/java/net/sf/jsqlparser/statement/UseStatementTest.java index da59576af..4ff5f387d 100644 --- a/src/test/java/net/sf/jsqlparser/statement/UseStatementTest.java +++ b/src/test/java/net/sf/jsqlparser/statement/UseStatementTest.java @@ -1,20 +1,11 @@ -/* - * Copyright (C) 2015 JSQLParser. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% */ package net.sf.jsqlparser.statement; diff --git a/src/test/java/net/sf/jsqlparser/statement/alter/AlterTest.java b/src/test/java/net/sf/jsqlparser/statement/alter/AlterTest.java index 2ed51f058..dd4cea0b2 100644 --- a/src/test/java/net/sf/jsqlparser/statement/alter/AlterTest.java +++ b/src/test/java/net/sf/jsqlparser/statement/alter/AlterTest.java @@ -1,3 +1,12 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ package net.sf.jsqlparser.statement.alter; import java.util.Arrays; @@ -262,6 +271,34 @@ public void testAlterTableAlterColumn() throws JSQLParserException { assertSqlCanBeParsedAndDeparsed("ALTER TABLE table_name ALTER COLUMN column_name_1 TYPE TIMESTAMP, ALTER COLUMN column_name_2 TYPE BOOLEAN"); } + @Test + public void testAlterTableChangeColumn1() throws JSQLParserException { + Statement stmt = CCJSqlParserUtil.parse("ALTER TABLE tb_test CHANGE COLUMN c1 c2 INT (10)"); + Alter alter = (Alter) stmt; + assertEquals(AlterOperation.CHANGE, alter.getAlterExpressions().get(0).getOperation()); + assertEquals("c1", alter.getAlterExpressions().get(0).getColOldName()); + assertEquals("COLUMN", alter.getAlterExpressions().get(0).getOptionalSpecifier()); + } + + @Test + public void testAlterTableChangeColumn2() throws JSQLParserException { + Statement stmt = CCJSqlParserUtil.parse("ALTER TABLE tb_test CHANGE c1 c2 INT (10)"); + Alter alter = (Alter) stmt; + assertEquals(AlterOperation.CHANGE, alter.getAlterExpressions().get(0).getOperation()); + assertEquals("c1", alter.getAlterExpressions().get(0).getColOldName()); + assertNull(alter.getAlterExpressions().get(0).getOptionalSpecifier()); + } + + @Test + public void testAlterTableChangeColumn3() throws JSQLParserException { + assertSqlCanBeParsedAndDeparsed("ALTER TABLE tb_test CHANGE COLUMN c1 c2 INT (10)"); + } + + @Test + public void testAlterTableChangeColumn4() throws JSQLParserException { + assertSqlCanBeParsedAndDeparsed("ALTER TABLE tb_test CHANGE c1 c2 INT (10)"); + } + @Test public void testAlterTableAddColumnWithZone() throws JSQLParserException { assertSqlCanBeParsedAndDeparsed("ALTER TABLE mytable ADD COLUMN col1 timestamp with time zone"); diff --git a/src/test/java/net/sf/jsqlparser/statement/comment/CommentTest.java b/src/test/java/net/sf/jsqlparser/statement/comment/CommentTest.java index e2c22ac27..3f2fa060c 100755 --- a/src/test/java/net/sf/jsqlparser/statement/comment/CommentTest.java +++ b/src/test/java/net/sf/jsqlparser/statement/comment/CommentTest.java @@ -1,3 +1,12 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ package net.sf.jsqlparser.statement.comment; import java.io.StringReader; diff --git a/src/test/java/net/sf/jsqlparser/statement/create/AlterViewTest.java b/src/test/java/net/sf/jsqlparser/statement/create/AlterViewTest.java index 165975fb5..3e706ef74 100644 --- a/src/test/java/net/sf/jsqlparser/statement/create/AlterViewTest.java +++ b/src/test/java/net/sf/jsqlparser/statement/create/AlterViewTest.java @@ -1,3 +1,12 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ package net.sf.jsqlparser.statement.create; import net.sf.jsqlparser.JSQLParserException; diff --git a/src/test/java/net/sf/jsqlparser/statement/create/CreateIndexTest.java b/src/test/java/net/sf/jsqlparser/statement/create/CreateIndexTest.java index 034a75fde..91e60992b 100644 --- a/src/test/java/net/sf/jsqlparser/statement/create/CreateIndexTest.java +++ b/src/test/java/net/sf/jsqlparser/statement/create/CreateIndexTest.java @@ -1,3 +1,12 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ package net.sf.jsqlparser.statement.create; import java.io.StringReader; @@ -10,9 +19,6 @@ import org.junit.Ignore; import org.junit.Test; -/** - * @author Raymond Augé - */ public class CreateIndexTest { private final CCJSqlParserManager parserManager = new CCJSqlParserManager(); diff --git a/src/test/java/net/sf/jsqlparser/statement/create/CreateTableTest.java b/src/test/java/net/sf/jsqlparser/statement/create/CreateTableTest.java index e0bb0fe94..3f5a22fe5 100644 --- a/src/test/java/net/sf/jsqlparser/statement/create/CreateTableTest.java +++ b/src/test/java/net/sf/jsqlparser/statement/create/CreateTableTest.java @@ -1,3 +1,12 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ package net.sf.jsqlparser.statement.create; import java.io.BufferedReader; @@ -229,7 +238,10 @@ public void testMySqlCreateTableWithTextIndexes() throws JSQLParserException { public void testCreateTableWithCheck() throws JSQLParserException { assertSqlCanBeParsedAndDeparsed("CREATE TABLE table2 (id INT (10) NOT NULL, name TEXT, url TEXT, CONSTRAINT name_not_empty CHECK (name <> ''))"); } - + @Test + public void testCreateTableWithCheckNotNull() throws JSQLParserException { + assertSqlCanBeParsedAndDeparsed("CREATE TABLE table2 (id INT (10) NOT NULL, name TEXT, url TEXT, CONSTRAINT name_not_null CHECK (name IS NOT NULL))"); + } @Test public void testCreateTableIssue270() throws JSQLParserException { assertSqlCanBeParsedAndDeparsed("CREATE TABLE item (i_item_sk integer NOT NULL, i_item_id character (16) NOT NULL, i_rec_start_date date, i_rec_end_date date, i_item_desc character varying(200), i_current_price numeric(7,2), i_wholesale_cost numeric(7,2), i_brand_id integer, i_brand character(50), i_class_id integer, i_class character(50), i_category_id integer, i_category character(50), i_manufact_id integer, i_manufact character(50), i_size character(20), i_formulation character(20), i_color character(20), i_units character(10), i_container character(10), i_manager_id integer, i_product_name character(50) )", true); diff --git a/src/test/java/net/sf/jsqlparser/statement/create/CreateViewTest.java b/src/test/java/net/sf/jsqlparser/statement/create/CreateViewTest.java index 1270c870b..1cb0eb482 100644 --- a/src/test/java/net/sf/jsqlparser/statement/create/CreateViewTest.java +++ b/src/test/java/net/sf/jsqlparser/statement/create/CreateViewTest.java @@ -1,3 +1,12 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ package net.sf.jsqlparser.statement.create; import java.io.StringReader; diff --git a/src/test/java/net/sf/jsqlparser/statement/delete/DeleteTest.java b/src/test/java/net/sf/jsqlparser/statement/delete/DeleteTest.java index 7da26d5ce..a6e851ec1 100644 --- a/src/test/java/net/sf/jsqlparser/statement/delete/DeleteTest.java +++ b/src/test/java/net/sf/jsqlparser/statement/delete/DeleteTest.java @@ -1,3 +1,12 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ package net.sf.jsqlparser.statement.delete; import static net.sf.jsqlparser.test.TestUtils.assertSqlCanBeParsedAndDeparsed; diff --git a/src/test/java/net/sf/jsqlparser/statement/drop/DropTest.java b/src/test/java/net/sf/jsqlparser/statement/drop/DropTest.java index 5998bb58a..9bbc7e92d 100644 --- a/src/test/java/net/sf/jsqlparser/statement/drop/DropTest.java +++ b/src/test/java/net/sf/jsqlparser/statement/drop/DropTest.java @@ -1,3 +1,12 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ package net.sf.jsqlparser.statement.drop; import java.io.StringReader; diff --git a/src/test/java/net/sf/jsqlparser/statement/execute/ExecuteTest.java b/src/test/java/net/sf/jsqlparser/statement/execute/ExecuteTest.java index 89d93cbe9..f7e2348f5 100644 --- a/src/test/java/net/sf/jsqlparser/statement/execute/ExecuteTest.java +++ b/src/test/java/net/sf/jsqlparser/statement/execute/ExecuteTest.java @@ -1,20 +1,11 @@ -/* - * Copyright (C) 2014 JSQLParser. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% */ package net.sf.jsqlparser.statement.execute; diff --git a/src/test/java/net/sf/jsqlparser/statement/insert/InsertTest.java b/src/test/java/net/sf/jsqlparser/statement/insert/InsertTest.java index ced2f5340..46a99a70d 100644 --- a/src/test/java/net/sf/jsqlparser/statement/insert/InsertTest.java +++ b/src/test/java/net/sf/jsqlparser/statement/insert/InsertTest.java @@ -1,3 +1,12 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ package net.sf.jsqlparser.statement.insert; import java.io.StringReader; @@ -284,4 +293,9 @@ public void testInsertKeyWordIntervalIssue682() throws JSQLParserException { public void testWithAtFront() throws JSQLParserException { assertSqlCanBeParsedAndDeparsed("WITH foo AS ( SELECT attr FROM bar ) INSERT INTO lalelu (attr) SELECT attr FROM foo"); } + + @Test + public void testNextVal() throws JSQLParserException { + assertSqlCanBeParsedAndDeparsed("INSERT INTO tracker (monitor_id, user_id, module_name, item_id, item_summary, team_id, date_modified, action, visible, id) VALUES (?, ?, ?, ?, ?, ?, to_date(?, 'YYYY-MM-DD HH24:MI:SS'), ?, ?, NEXTVAL FOR TRACKER_ID_SEQ)"); + } } diff --git a/src/test/java/net/sf/jsqlparser/statement/merge/MergeTest.java b/src/test/java/net/sf/jsqlparser/statement/merge/MergeTest.java index b0bf07bea..0cf0037b7 100644 --- a/src/test/java/net/sf/jsqlparser/statement/merge/MergeTest.java +++ b/src/test/java/net/sf/jsqlparser/statement/merge/MergeTest.java @@ -1,20 +1,11 @@ -/* - * Copyright (C) 2015 JSQLParser. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% */ package net.sf.jsqlparser.statement.merge; diff --git a/src/test/java/net/sf/jsqlparser/statement/replace/ReplaceTest.java b/src/test/java/net/sf/jsqlparser/statement/replace/ReplaceTest.java index cf05830bf..3b93dafec 100644 --- a/src/test/java/net/sf/jsqlparser/statement/replace/ReplaceTest.java +++ b/src/test/java/net/sf/jsqlparser/statement/replace/ReplaceTest.java @@ -1,3 +1,12 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ package net.sf.jsqlparser.statement.replace; import java.io.StringReader; diff --git a/src/test/java/net/sf/jsqlparser/statement/select/HiveTest.java b/src/test/java/net/sf/jsqlparser/statement/select/HiveTest.java index 810e5564e..062517228 100644 --- a/src/test/java/net/sf/jsqlparser/statement/select/HiveTest.java +++ b/src/test/java/net/sf/jsqlparser/statement/select/HiveTest.java @@ -1,3 +1,12 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ package net.sf.jsqlparser.statement.select; import net.sf.jsqlparser.parser.CCJSqlParserUtil; @@ -9,9 +18,6 @@ import static org.junit.Assert.assertTrue; import org.junit.Test; -/** - * Created by nhanitvn on 5/19/16. - */ public class HiveTest { @Test diff --git a/src/test/java/net/sf/jsqlparser/statement/select/KSQLTest.java b/src/test/java/net/sf/jsqlparser/statement/select/KSQLTest.java index b213d4174..3d65f1ffc 100644 --- a/src/test/java/net/sf/jsqlparser/statement/select/KSQLTest.java +++ b/src/test/java/net/sf/jsqlparser/statement/select/KSQLTest.java @@ -1,3 +1,12 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ package net.sf.jsqlparser.statement.select; import net.sf.jsqlparser.parser.CCJSqlParserUtil; diff --git a/src/test/java/net/sf/jsqlparser/statement/select/MemoryTest.java b/src/test/java/net/sf/jsqlparser/statement/select/MemoryTest.java index 167d917d9..e029bc705 100644 --- a/src/test/java/net/sf/jsqlparser/statement/select/MemoryTest.java +++ b/src/test/java/net/sf/jsqlparser/statement/select/MemoryTest.java @@ -1,3 +1,12 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ package net.sf.jsqlparser.statement.select; import java.io.StringReader; @@ -12,36 +21,6 @@ public static void main(String[] args) throws Exception { System.out.println(Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()); CCJSqlParserManager parserManager = new CCJSqlParserManager(); - /* - * String longQuery = new String( - * "select * from ( SELECT intermediate.id as id , intermediate.date as " + - * "date FROM ( SELECT DISTINCT ( id ) FROM ( SELECT " + - * "wct_workflows.workflow_id as id , wct_transaction.date as date FROM " + - * "wct_audit_entry , wct_transaction , wct_workflows WHERE " + - * "( wct_audit_entry.privilege = 'W' or wct_audit_entry.privilege = " + - * "'C' ) and wct_audit_entry.outcome = 't' and " + - * "wct_audit_entry.transaction_id = wct_transaction.transaction_id and " + - * "wct_transaction.user_id = 164 and wct_audit_entry.object_id = " + - * "wct_workflows.active_version_id ))) UNION SELECT wct_workflows.workflow_id as " + - * "id , wct_transaction.date as date FROM wct_audit_entry , " + - * "wct_transaction , wct_workflows WHERE ( wct_audit_entry.privilege = " + - * "'W' or wct_audit_entry.privilege = 'C' ) and wct_audit_entry.outcome " + - * "= 't' and wct_audit_entry.transaction_id = " + - * "wct_transaction.transaction_id and wct_transaction.user_id = 164 and " + - * "afdf= ( select wct_audit_entry.object_id from wct_audit_entry , " + - * "wct_workflow_archive where wct_audit_entry.object_id = " + - * "wct_workflow_archive.archive_id and wct_workflows.workflow_id = " + - * "wct_workflow_archive.workflow_id ) " + - * "UNION SELECT wct_workflows.workflow_id " + - * "as id , wct_transaction.date as date FROM wct_audit_entry , " + - * "wct_transaction , wct_workflows WHERE ( wct_audit_entry.privilege = " + - * "'W' OR wct_audit_entry.privilege = 'E' OR wct_audit_entry.privilege = " + - * "'A' ) and wct_audit_entry.outcome = 't' and " + - * "wct_audit_entry.transaction_id = wct_transaction.transaction_id and " + - * "wct_transaction.user_id = 164 and wct_audit_entry.object_id = " + - * "wct_workflows.workflow_id UNION SELECT * FROM interm2 , wct_workflow_docs WHERE " + - * "interm2.id = wct_workflow_docs.document_id ORDER BY id , date DESC "); - */ String longQuery = "select * from k where ID > 4"; /* diff --git a/src/test/java/net/sf/jsqlparser/statement/select/SelectASTTest.java b/src/test/java/net/sf/jsqlparser/statement/select/SelectASTTest.java index d9d2e1893..3dd01df5a 100644 --- a/src/test/java/net/sf/jsqlparser/statement/select/SelectASTTest.java +++ b/src/test/java/net/sf/jsqlparser/statement/select/SelectASTTest.java @@ -1,20 +1,11 @@ -/* - * Copyright (C) 2015 JSQLParser. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% */ package net.sf.jsqlparser.statement.select; diff --git a/src/test/java/net/sf/jsqlparser/statement/select/SelectTest.java b/src/test/java/net/sf/jsqlparser/statement/select/SelectTest.java index 9a7ad0627..7ee9b3882 100644 --- a/src/test/java/net/sf/jsqlparser/statement/select/SelectTest.java +++ b/src/test/java/net/sf/jsqlparser/statement/select/SelectTest.java @@ -1,3 +1,12 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ package net.sf.jsqlparser.statement.select; import java.io.*; @@ -17,13 +26,24 @@ import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +import org.junit.Before; import org.junit.Ignore; +import org.junit.Rule; import org.junit.Test; +import org.junit.rules.TestName; public class SelectTest { + @Rule + public TestName name = new TestName(); + private final CCJSqlParserManager parserManager = new CCJSqlParserManager(); + @Before + public void setup() { +// System.out.println(name.getMethodName()); + } + // From statement multipart @Test public void testMultiPartTableNameWithServerNameAndDatabaseNameAndSchemaName() throws Exception { @@ -963,7 +983,15 @@ public void testJoin() throws JSQLParserException { statement = "SELECT * FROM foo AS f LEFT OUTER JOIN (bar AS b RIGHT OUTER JOIN baz AS z ON f.id = z.id) ON f.id = b.id"; select = (Select) parserManager.parse(new StringReader(statement)); assertStatementCanBeDeparsedAs(select, statement); - + statement = "SELECT * FROM foo AS f, OUTER bar AS b WHERE f.id = b.id"; + select = (Select) parserManager.parse(new StringReader(statement)); + assertStatementCanBeDeparsedAs(select, statement); + plainSelect = (PlainSelect) select.getSelectBody(); + assertEquals(1, plainSelect.getJoins().size()); + assertTrue(plainSelect.getJoins().get(0).isOuter()); + assertTrue(plainSelect.getJoins().get(0).isSimple()); + assertEquals("bar", ((Table) plainSelect.getJoins().get(0).getRightItem()).getFullyQualifiedName()); + assertEquals("b", ((Table) plainSelect.getJoins().get(0).getRightItem()).getAlias().getName()); } @Test @@ -2597,9 +2625,6 @@ public void testIssue167_singleQuoteEscape() throws JSQLParserException { assertSqlCanBeParsedAndDeparsed("SELECT 'ab\\'ab'"); } - /** - * These are accepted due to reading one backslash and a double quote. - */ @Test public void testIssue167_singleQuoteEscape2() throws JSQLParserException { assertSqlCanBeParsedAndDeparsed("SELECT '\\'''"); @@ -3350,6 +3375,35 @@ public void testCaseThenCondition5() throws JSQLParserException { assertSqlCanBeParsedAndDeparsed("SELECT * FROM col WHERE CASE WHEN a = 'c' THEN a IN (SELECT id FROM mytable) ELSE b IN (SELECT id FROM mytable) END"); } + @Test + public void testOptimizeForIssue348() throws JSQLParserException { + assertSqlCanBeParsedAndDeparsed("SELECT * FROM EMP ORDER BY SALARY DESC OPTIMIZE FOR 20 ROWS"); + } + + @Test + public void testFuncConditionParameter() throws JSQLParserException { + assertSqlCanBeParsedAndDeparsed("SELECT if(a < b)"); + } + + @Test + public void testFuncConditionParameter2() throws JSQLParserException { + assertSqlCanBeParsedAndDeparsed("SELECT if(a < b, c)"); + } + + @Test + public void testFuncConditionParameter3() throws JSQLParserException { + assertSqlCanBeParsedAndDeparsed("SELECT CAST((MAX(CAST(IIF(isnumeric(license_no) = 1, license_no, 0) AS INT)) + 2) AS varchar) FROM lcps.t_license WHERE profession_id = 60 and license_type = 100 and YEAR(issue_date) % 2 = case when YEAR(issue_date) % 2 = 0 then 0 else 1 end and ISNUMERIC(license_no) = 1", true); + } + + @Test + public void testSqlContainIsNullFunctionShouldBeParsed3() throws JSQLParserException { + assertSqlCanBeParsedAndDeparsed("SELECT name, age FROM person WHERE NOT ISNULL(home, 'earn more money')"); + } + +// @Test +// public void testIntervalExpression() throws JSQLParserException { +// assertSqlCanBeParsedAndDeparsed("SELECT count(emails.id) FROM emails WHERE (emails.date_entered + 30 DAYS) > CURRENT_DATE"); +// } @Test public void testRawStringExpressionIssue656() throws JSQLParserException { for (String c : new String[]{"u", "e", "n", "r", "b", "rb"}) { diff --git a/src/test/java/net/sf/jsqlparser/statement/select/SpecialOracleTest.java b/src/test/java/net/sf/jsqlparser/statement/select/SpecialOracleTest.java index 2fe36cd76..22ffc54b0 100644 --- a/src/test/java/net/sf/jsqlparser/statement/select/SpecialOracleTest.java +++ b/src/test/java/net/sf/jsqlparser/statement/select/SpecialOracleTest.java @@ -1,20 +1,11 @@ -/* - * Copyright (C) 2014 JSQLParser. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% */ package net.sf.jsqlparser.statement.select; diff --git a/src/test/java/net/sf/jsqlparser/statement/select/SpeedTest.java b/src/test/java/net/sf/jsqlparser/statement/select/SpeedTest.java index faf79d158..116a2ee75 100644 --- a/src/test/java/net/sf/jsqlparser/statement/select/SpeedTest.java +++ b/src/test/java/net/sf/jsqlparser/statement/select/SpeedTest.java @@ -1,3 +1,12 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ package net.sf.jsqlparser.statement.select; import java.io.BufferedReader; diff --git a/src/test/java/net/sf/jsqlparser/statement/simpleparsing/CCJSqlParserManagerTest.java b/src/test/java/net/sf/jsqlparser/statement/simpleparsing/CCJSqlParserManagerTest.java index b2807d073..3222f01cd 100644 --- a/src/test/java/net/sf/jsqlparser/statement/simpleparsing/CCJSqlParserManagerTest.java +++ b/src/test/java/net/sf/jsqlparser/statement/simpleparsing/CCJSqlParserManagerTest.java @@ -1,3 +1,12 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ package net.sf.jsqlparser.statement.simpleparsing; import java.io.BufferedReader; diff --git a/src/test/java/net/sf/jsqlparser/statement/truncate/TruncateTest.java b/src/test/java/net/sf/jsqlparser/statement/truncate/TruncateTest.java index d31b1ec7c..e558f07f0 100644 --- a/src/test/java/net/sf/jsqlparser/statement/truncate/TruncateTest.java +++ b/src/test/java/net/sf/jsqlparser/statement/truncate/TruncateTest.java @@ -1,3 +1,12 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ package net.sf.jsqlparser.statement.truncate; import java.io.StringReader; diff --git a/src/test/java/net/sf/jsqlparser/statement/update/UpdateTest.java b/src/test/java/net/sf/jsqlparser/statement/update/UpdateTest.java index 8911a1cc0..8f8a7e36a 100644 --- a/src/test/java/net/sf/jsqlparser/statement/update/UpdateTest.java +++ b/src/test/java/net/sf/jsqlparser/statement/update/UpdateTest.java @@ -1,3 +1,12 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ package net.sf.jsqlparser.statement.update; import java.io.StringReader; diff --git a/src/test/java/net/sf/jsqlparser/statement/upsert/UpsertTest.java b/src/test/java/net/sf/jsqlparser/statement/upsert/UpsertTest.java index 3c6af1371..55f2a0241 100644 --- a/src/test/java/net/sf/jsqlparser/statement/upsert/UpsertTest.java +++ b/src/test/java/net/sf/jsqlparser/statement/upsert/UpsertTest.java @@ -1,3 +1,12 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ package net.sf.jsqlparser.statement.upsert; import static net.sf.jsqlparser.test.TestUtils.assertSqlCanBeParsedAndDeparsed; diff --git a/src/test/java/net/sf/jsqlparser/statement/values/ValuesTest.java b/src/test/java/net/sf/jsqlparser/statement/values/ValuesTest.java index c346befa0..36d9262a6 100644 --- a/src/test/java/net/sf/jsqlparser/statement/values/ValuesTest.java +++ b/src/test/java/net/sf/jsqlparser/statement/values/ValuesTest.java @@ -1,3 +1,12 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ package net.sf.jsqlparser.statement.values; import net.sf.jsqlparser.JSQLParserException; diff --git a/src/test/java/net/sf/jsqlparser/test/CommitTest.java b/src/test/java/net/sf/jsqlparser/test/CommitTest.java index 0188cdd6c..79e2348e8 100644 --- a/src/test/java/net/sf/jsqlparser/test/CommitTest.java +++ b/src/test/java/net/sf/jsqlparser/test/CommitTest.java @@ -1,3 +1,12 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ package net.sf.jsqlparser.test; import static net.sf.jsqlparser.test.TestUtils.assertSqlCanBeParsedAndDeparsed; diff --git a/src/test/java/net/sf/jsqlparser/test/TestException.java b/src/test/java/net/sf/jsqlparser/test/TestException.java index 282bbe6b0..92eb27204 100644 --- a/src/test/java/net/sf/jsqlparser/test/TestException.java +++ b/src/test/java/net/sf/jsqlparser/test/TestException.java @@ -1,8 +1,14 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ package net.sf.jsqlparser.test; -/** - * An exception class with stack trace informations - */ public class TestException extends Exception { private Throwable cause = null; diff --git a/src/test/java/net/sf/jsqlparser/test/TestUtils.java b/src/test/java/net/sf/jsqlparser/test/TestUtils.java index 4ab50fb86..fbd010bf2 100644 --- a/src/test/java/net/sf/jsqlparser/test/TestUtils.java +++ b/src/test/java/net/sf/jsqlparser/test/TestUtils.java @@ -1,20 +1,11 @@ -/* - * Copyright (C) 2013 JSQLParser. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% */ package net.sf.jsqlparser.test; diff --git a/src/test/java/net/sf/jsqlparser/util/AddAliasesVisitorTest.java b/src/test/java/net/sf/jsqlparser/util/AddAliasesVisitorTest.java index ccf141ef5..f685b4525 100644 --- a/src/test/java/net/sf/jsqlparser/util/AddAliasesVisitorTest.java +++ b/src/test/java/net/sf/jsqlparser/util/AddAliasesVisitorTest.java @@ -1,3 +1,12 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ package net.sf.jsqlparser.util; import java.io.StringReader; @@ -11,10 +20,6 @@ import org.junit.Test; import static org.junit.Assert.*; -/** - * - * @author tw - */ public class AddAliasesVisitorTest { public AddAliasesVisitorTest() { diff --git a/src/test/java/net/sf/jsqlparser/util/ConnectExpressionsVisitorTest.java b/src/test/java/net/sf/jsqlparser/util/ConnectExpressionsVisitorTest.java index 974d3d61c..608a4ffec 100644 --- a/src/test/java/net/sf/jsqlparser/util/ConnectExpressionsVisitorTest.java +++ b/src/test/java/net/sf/jsqlparser/util/ConnectExpressionsVisitorTest.java @@ -1,3 +1,12 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ package net.sf.jsqlparser.util; import java.io.StringReader; @@ -14,10 +23,6 @@ import org.junit.BeforeClass; import org.junit.Test; -/** - * - * @author tw - */ public class ConnectExpressionsVisitorTest { public ConnectExpressionsVisitorTest() { diff --git a/src/test/java/net/sf/jsqlparser/util/SelectUtilsTest.java b/src/test/java/net/sf/jsqlparser/util/SelectUtilsTest.java index 1d1176441..332fa9454 100644 --- a/src/test/java/net/sf/jsqlparser/util/SelectUtilsTest.java +++ b/src/test/java/net/sf/jsqlparser/util/SelectUtilsTest.java @@ -1,3 +1,12 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ package net.sf.jsqlparser.util; import java.util.Arrays; @@ -22,10 +31,6 @@ import org.junit.Test; import static org.junit.Assert.*; -/** - * - * @author toben - */ public class SelectUtilsTest { public SelectUtilsTest() { diff --git a/src/test/java/net/sf/jsqlparser/util/TablesNamesFinderTest.java b/src/test/java/net/sf/jsqlparser/util/TablesNamesFinderTest.java index e2e7f7740..fd38ac9cd 100644 --- a/src/test/java/net/sf/jsqlparser/util/TablesNamesFinderTest.java +++ b/src/test/java/net/sf/jsqlparser/util/TablesNamesFinderTest.java @@ -1,3 +1,12 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ package net.sf.jsqlparser.util; import java.io.BufferedReader; @@ -563,4 +572,15 @@ public void testDescribe() throws JSQLParserException { assertEquals(1, tableList.size()); assertEquals("foo.product", tableList.get(0)); } + @Test + public void testBetween() throws JSQLParserException { + String sql = "mycol BETWEEN (select col2 from mytable) AND (select col3 from mytable2)"; + Expression expr = (Expression) CCJSqlParserUtil.parseCondExpression(sql); + TablesNamesFinder tablesNamesFinder = new TablesNamesFinder(); + List tableList = tablesNamesFinder.getTableList(expr); + assertEquals(2, tableList.size()); + assertTrue(tableList.contains("mytable")); + assertTrue(tableList.contains("mytable2")); + + } } diff --git a/src/test/java/net/sf/jsqlparser/util/cnfexpression/CNFTest.java b/src/test/java/net/sf/jsqlparser/util/cnfexpression/CNFTest.java index 3f8563a29..f6d852e2f 100644 --- a/src/test/java/net/sf/jsqlparser/util/cnfexpression/CNFTest.java +++ b/src/test/java/net/sf/jsqlparser/util/cnfexpression/CNFTest.java @@ -1,3 +1,12 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ package net.sf.jsqlparser.util.cnfexpression; import static org.junit.Assert.*; @@ -7,13 +16,6 @@ import net.sf.jsqlparser.expression.Expression; import net.sf.jsqlparser.parser.CCJSqlParserUtil; -/** - * this class is mainly used for testing whether we generate the - * correct CNF form of an expression tree. We use the name of - * variables that is reflected in the steps defined in the class. - * @author messfish - * - */ public class CNFTest { /** diff --git a/src/test/java/net/sf/jsqlparser/util/deparser/CreateViewDeParserTest.java b/src/test/java/net/sf/jsqlparser/util/deparser/CreateViewDeParserTest.java index 5288e5717..647726f7e 100644 --- a/src/test/java/net/sf/jsqlparser/util/deparser/CreateViewDeParserTest.java +++ b/src/test/java/net/sf/jsqlparser/util/deparser/CreateViewDeParserTest.java @@ -1,20 +1,11 @@ -/* - * Copyright (C) 2015 JSQLParser. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% */ package net.sf.jsqlparser.util.deparser; diff --git a/src/test/java/net/sf/jsqlparser/util/deparser/ExecuteDeParserTest.java b/src/test/java/net/sf/jsqlparser/util/deparser/ExecuteDeParserTest.java index 47a7a04da..23b88e091 100644 --- a/src/test/java/net/sf/jsqlparser/util/deparser/ExecuteDeParserTest.java +++ b/src/test/java/net/sf/jsqlparser/util/deparser/ExecuteDeParserTest.java @@ -1,3 +1,12 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ package net.sf.jsqlparser.util.deparser; import static org.junit.Assert.assertTrue; diff --git a/src/test/java/net/sf/jsqlparser/util/deparser/ExpressionDeParserTest.java b/src/test/java/net/sf/jsqlparser/util/deparser/ExpressionDeParserTest.java index 891762002..a02db08a4 100644 --- a/src/test/java/net/sf/jsqlparser/util/deparser/ExpressionDeParserTest.java +++ b/src/test/java/net/sf/jsqlparser/util/deparser/ExpressionDeParserTest.java @@ -1,3 +1,12 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ package net.sf.jsqlparser.util.deparser; import static org.junit.Assert.assertEquals; diff --git a/src/test/java/net/sf/jsqlparser/util/deparser/StatementDeParserTest.java b/src/test/java/net/sf/jsqlparser/util/deparser/StatementDeParserTest.java index 7dcd59aa3..69a087dbb 100644 --- a/src/test/java/net/sf/jsqlparser/util/deparser/StatementDeParserTest.java +++ b/src/test/java/net/sf/jsqlparser/util/deparser/StatementDeParserTest.java @@ -1,3 +1,12 @@ +/*- + * #%L + * JSQLParser library + * %% + * Copyright (C) 2004 - 2019 JSQLParser + * %% + * Dual licensed under GNU LGPL 2.1 or Apache License 2.0 + * #L% + */ package net.sf.jsqlparser.util.deparser; import static org.hamcrest.Matchers.equalTo; diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/aggregate01.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/aggregate01.sql index 12da1b1e3..9707c2068 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/aggregate01.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/aggregate01.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- with codes2codelocales as ( diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/analytic_query02.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/analytic_query02.sql index 798824bc7..fb4050c10 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/analytic_query02.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/analytic_query02.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select time_id, product , last_value(quantity ignore nulls) over (partition by product order by time_id) quantity , last_value(quantity respect nulls) over (partition by product order by time_id) quantity diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/analytic_query03.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/analytic_query03.sql index 24bd79532..dad46d577 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/analytic_query03.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/analytic_query03.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select times.time_id, product, quantity from inventory partition by (product) right outer join times on (times.time_id = inventory.time_id) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/analytic_query04.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/analytic_query04.sql index fbe36762d..b4acaba82 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/analytic_query04.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/analytic_query04.sql @@ -1,5 +1,14 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select deptno , ename , hiredate , listagg(ename, ',') within group (order by hiredate) over (partition by deptno) as employees -from emp \ No newline at end of file +from emp diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/analytic_query05.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/analytic_query05.sql index 85336bb42..bb015c113 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/analytic_query05.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/analytic_query05.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select metric_id ,bsln_guid ,timegroup ,obs_value as obs_value , cume_dist () over (partition by metric_id, bsln_guid, timegroup order by obs_value ) as cume_dist , count(1) over (partition by metric_id, bsln_guid, timegroup ) as n diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/analytic_query06.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/analytic_query06.sql index 202854550..cdb2f2dc7 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/analytic_query06.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/analytic_query06.sql @@ -1 +1,10 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select trim(both ' ' from ' a ') from dual where trim(:a) is not null diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/analytic_query07.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/analytic_query07.sql index 78c9df3d6..bb1a26f5c 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/analytic_query07.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/analytic_query07.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- with clus_tab as ( select id, diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/analytic_query08.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/analytic_query08.sql index a2700297f..b4ba23283 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/analytic_query08.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/analytic_query08.sql @@ -1,4 +1,13 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select manager_id, last_name, hire_date, count(*) over (partition by manager_id order by hire_date range numtodsinterval(100, 'day') preceding) as t_count - from employees \ No newline at end of file + from employees diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/analytic_query09.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/analytic_query09.sql index bd38cc4d9..6ef2aa825 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/analytic_query09.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/analytic_query09.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select listagg(column_value, ',') within group (order by column_value) from @@ -10,4 +19,4 @@ from ) as t_str ) ) - \ No newline at end of file + diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/analytic_query10.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/analytic_query10.sql index 2fd86c3c0..97b2378b0 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/analytic_query10.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/analytic_query10.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- SELECT STALENESS, OSIZE, OBJ#, TYPE#, @@ -9,4 +18,4 @@ SELECT STALENESS, :B5 SID, :B4 SERIAL#, PART#, BO#, LOC_STALE_PCT FROM -A \ No newline at end of file +A diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/bindvar01.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/bindvar01.sql index 2192adb9d..32c78f734 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/bindvar01.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/bindvar01.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- insert into p ( a1, diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/bindvar02.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/bindvar02.sql index a93392e30..fe1186794 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/bindvar02.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/bindvar02.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from a where a=:3 diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/bindvar03.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/bindvar03.sql index d5c2bb735..7c8699028 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/bindvar03.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/bindvar03.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select count(*), max(scn) from ( diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/bindvar04.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/bindvar04.sql index fc0f8256b..695e9e260 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/bindvar04.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/bindvar04.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from ( diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/bindvar05.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/bindvar05.sql index 92b3e25cc..a1f353350 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/bindvar05.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/bindvar05.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select object_name, object_id, decode(status, 'INVALID', 'TRUE', 'FALSE') invalid, 'TRUE' runnable, @@ -11,4 +20,4 @@ and object_type = 'PACKAGE' and subobject_name is null and object_id not in ( select purge_object from recyclebin ) and upper(object_name) in upper(:name) - \ No newline at end of file + diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/case_when01.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/case_when01.sql index 357eb37cd..ec29206ca 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/case_when01.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/case_when01.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select ROOT,LEV,OBJ,LinK,PaTH,cycle, case diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/case_when02.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/case_when02.sql index a307d2cc4..59f752de4 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/case_when02.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/case_when02.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select STaLENESS, OSIZE, OBJ#, TYPE#, case diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/case_when03.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/case_when03.sql index 6bb753e17..8d596755d 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/case_when03.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/case_when03.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select case (STaTUS) when 'N' then 1 diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/case_when04.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/case_when04.sql index 92c4761bb..82205dd76 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/case_when04.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/case_when04.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select case when row_number() over (partition by bo# order by staleness, osize, obj#) = 1 then 32 else 0 end + 64 aflags from f diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/case_when05.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/case_when05.sql index 60cca13e8..e26343e37 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/case_when05.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/case_when05.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select staleness , osize, obj# , type# @@ -9,4 +18,4 @@ select staleness , :b3 sid , :b2 serial# , part#, bo# -from st0 \ No newline at end of file +from st0 diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset01.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset01.sql index 13eafc523..74f979df4 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset01.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset01.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select t1.department_id, t2.* from hr_info t1, table diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset02.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset02.sql index cb9631cda..3e438f7d5 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset02.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset02.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select title from table(select courses from department where name = 'history') diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset03.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset03.sql index 412af233c..455d829a8 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset03.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset03.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select 1 , cursor(select 1 from dual) c1 diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset04.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset04.sql index 6fa8a9d09..454ac2fdc 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset04.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset04.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select e1.last_name from employees e1 where f( cursor(select e2.hire_date from employees e2 where e1.employee_id = e2.manager_id), e1.hire_date) = 1 -order by last_name \ No newline at end of file +order by last_name diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset05.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset05.sql index 2985d8230..523e6bad1 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset05.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset05.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from table diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset06.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset06.sql index d2cee8837..f84169880 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset06.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset06.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select cast(collect(cattr(aname, op, to_char(val), support, confidence)) as cattrs) cl_attrs from a diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset07.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset07.sql index 49fd2fb81..018a4834b 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset07.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset07.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select "a3"."r_id" "r_id" from diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset08.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset08.sql index efa17074b..9948f32f2 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset08.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset08.sql @@ -1 +1,10 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from table (cast (f_int_date_varchar2() as table_int_date_varchar2)) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset09.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset09.sql index 5e7d49de8..ec95c0da1 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset09.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset09.sql @@ -1,2 +1,11 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- update customers_demo set cust_address_ntab = cust_address_ntab multiset union cust_address_ntab diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset10.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset10.sql index 741fb5cc4..6bea7535f 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset10.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset10.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select cast(powermultiset(cust_address_ntab) as cust_address_tab_tab_typ) from customers_demo diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset11.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset11.sql index c5dc0a64f..65ffb2675 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset11.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset11.sql @@ -1,4 +1,13 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- update table_name set row = array_of_records(i) where 1=1 - \ No newline at end of file + diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset12.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset12.sql index 3974ec004..85dcc3952 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset12.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset12.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- update customers_demo cd set cust_address2_ntab = cast(multiset(select cust_address diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset13.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset13.sql index 83b69c342..69b1e4443 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset13.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset13.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select customer_id, cust_address_ntab multiset except distinct cust_address2_ntab multiset_except from customers_demo diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset14.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset14.sql index a2013a2d0..7e2ccfce2 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset14.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset14.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select customer_id, cust_address_ntab multiset intersect all cust_address2_ntab multiset_intersect from customers_demo diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset15.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset15.sql index e34fa9317..31b2c9647 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset15.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset15.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select customer_id, cust_address_ntab multiset union cust_address2_ntab multiset_union from customers_demo diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset16.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset16.sql index 848cda55f..62854def3 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset16.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset16.sql @@ -1,6 +1,15 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select deptno , collect(ename) as emps from emp group by deptno - \ No newline at end of file + diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset17.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset17.sql index 1b1c6d05c..eb3ae9c0a 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset17.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset17.sql @@ -1,5 +1,14 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select deptno , cast(collect(ename) as varchar2_ntt) as emps from emp group by - deptno \ No newline at end of file + deptno diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset18.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset18.sql index cfe41df12..8066d08c6 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset18.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset18.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select deptno , cast( collect(ename order by ename) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset19.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset19.sql index 97b764ddf..705a96885 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset19.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset19.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select deptno , cast( collect(ename order by hiredate) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset20.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset20.sql index 40d4ee96c..844e00b88 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset20.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset20.sql @@ -1,5 +1,14 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select deptno , cast(collect(job) as varchar2_ntt) as jobs from emp group by - deptno \ No newline at end of file + deptno diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset21.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset21.sql index 3f4c7a291..fa5e5dc74 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset21.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset21.sql @@ -1,7 +1,16 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select deptno , cast( collect(distinct job) as varchar2_ntt) as distinct_jobs from emp group by - deptno \ No newline at end of file + deptno diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset22.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset22.sql index 9e9712aec..71d722dac 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset22.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset22.sql @@ -1,7 +1,16 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select deptno , cast( collect(unique job) as varchar2_ntt) as distinct_jobs from emp group by - deptno \ No newline at end of file + deptno diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset23.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset23.sql index 48b9d4dba..3437b972a 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset23.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset23.sql @@ -1,7 +1,16 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select deptno , cast( collect(all job) as varchar2_ntt) as distinct_jobs from emp group by - deptno \ No newline at end of file + deptno diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset24.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset24.sql index 905411188..69c5cc2cf 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset24.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset24.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select deptno , cast( collect( @@ -6,4 +15,4 @@ select deptno ) as varchar2_ntt) as distinct_ordered_jobs from emp group by - deptno \ No newline at end of file + deptno diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset25.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset25.sql index 38a017f3d..0e540d15e 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset25.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset25.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select deptno , cast( collect( @@ -5,4 +14,4 @@ select deptno ) as empsal_ntt) as empsals from emp group by - deptno \ No newline at end of file + deptno diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset26.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset26.sql index 61bae8f4f..bb72ff8ee 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset26.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset26.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select deptno , cast( collect( @@ -5,4 +14,4 @@ select deptno ) as empsal_ntt) as empsals from emp group by - deptno \ No newline at end of file + deptno diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset27.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset27.sql index 01705a355..ecc78ee4d 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset27.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset27.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select deptno , cast( collect( diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset28.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset28.sql index 86dd3cc1d..1d1bd4891 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset28.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset28.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select deptno , cast( collect( @@ -5,4 +14,4 @@ select deptno ) as empsal_ntt) as empsals from emp group by - deptno \ No newline at end of file + deptno diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset29.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset29.sql index 5a3f19e00..64683ad70 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset29.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset29.sql @@ -1,5 +1,14 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select cast( collect( distinct empsal_ot(ename, sal) ) as empsal_ntt) as empsals - from emp \ No newline at end of file + from emp diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset30.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset30.sql index 9cc97fa1e..405ebbe9b 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset30.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset30.sql @@ -1,6 +1,15 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select cast( collect( distinct empsal_ot(ename, sal) ) as empsal_ntt) as empsals from emp - \ No newline at end of file + diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset31.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset31.sql index 6b253fb1c..9e6c60ce7 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset31.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset31.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select e.deptno , cast( multiset( @@ -11,4 +20,4 @@ select e.deptno group by e.deptno order by - e.deptno \ No newline at end of file + e.deptno diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset32.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset32.sql index 88fe053ec..32cefcda0 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset32.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset32.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select deptno , set( cast( @@ -5,4 +14,4 @@ select deptno as varchar2_ntt)) as distinct_jobs from emp group by - deptno \ No newline at end of file + deptno diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset33.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset33.sql index 7df97a907..eedb32d7b 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset33.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset33.sql @@ -1,7 +1,16 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select deptno , cast( set(collect(job)) as varchar2_ntt) as distinct_jobs from emp group by - deptno \ No newline at end of file + deptno diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset34.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset34.sql index 41769aa6d..b2abfb167 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset34.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset34.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select deptno , cast( collect(job) @@ -5,4 +14,4 @@ select deptno ) multiset union distinct varchar2_ntt() as distinct_jobs from emp group by - deptno \ No newline at end of file + deptno diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset35.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset35.sql index a3983c811..b253b68ba 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset35.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset35.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select owner , object_type , cast( @@ -6,4 +15,4 @@ select owner from all_objects group by owner - , object_type \ No newline at end of file + , object_type diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset36.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset36.sql index 76b56b970..818c57900 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset36.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset36.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select owner , object_type , set( @@ -7,4 +16,4 @@ select owner from all_objects group by owner - , object_type \ No newline at end of file + , object_type diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset37.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset37.sql index c8e7cd0e2..1127899b2 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset37.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset37.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select owner , object_type , cast( diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset38.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset38.sql index 6f00721f7..e32fe76e7 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset38.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset38.sql @@ -1,4 +1,13 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from table( varchar2_ntt('a','b','c') multiset union distinct - varchar2_ntt('b','c','d') ) \ No newline at end of file + varchar2_ntt('b','c','d') ) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset39.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset39.sql index d38c1b223..4f42a749d 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset39.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset39.sql @@ -1,4 +1,13 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select varchar2_ntt('a','b','c') multiset except varchar2_ntt('b','c','d') as multiset_except - from dual \ No newline at end of file + from dual diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset40.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset40.sql index f3bb07748..2c56bb620 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset40.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset40.sql @@ -1,4 +1,13 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select cast( powermultiset( varchar2_ntt('a','b','c')) as varchar2_ntts) as pwrmltset - from dual \ No newline at end of file + from dual diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset41.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset41.sql index 70e247d40..f73942ec0 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset41.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset41.sql @@ -1,4 +1,13 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from table( powermultiset_by_cardinality( - varchar2_ntt('a','b','c','d','d'), 3)) \ No newline at end of file + varchar2_ntt('a','b','c','d','d'), 3)) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset42.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset42.sql index 308bc17cb..8adb10f97 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset42.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset42.sql @@ -1,6 +1,15 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from table( set( complex_ntt(complex_ot('data', 'more data', 1), complex_ot('data', 'some data', 2), complex_ot('data', 'dupe data', 3), - complex_ot('data', 'dupe data', 3)) )) \ No newline at end of file + complex_ot('data', 'dupe data', 3)) )) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset43.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset43.sql index df011071b..61514d714 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset43.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cast_multiset43.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select deptno , avg(sal) avg_sal , cast diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cluster_set01.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cluster_set01.sql index dd06e45db..ca13bf495 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cluster_set01.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/cluster_set01.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- with clus_tab as ( select id, diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/columns01.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/columns01.sql index a750245bd..f8f47efd3 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/columns01.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/columns01.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select a, b, a d, ddd as ddd, diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition01.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition01.sql index df5362c75..9a7fc9bc9 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition01.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition01.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select department_id, last_name, salary from employees x where salary > (select avg(salary) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition02.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition02.sql index 07188ef01..e1210ef38 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition02.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition02.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from employees x where salary > (select avg(salary) from x) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition03.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition03.sql index 5aa4cba81..1cc52f1b7 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition03.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition03.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from employees x where salary > (select avg(salary) from x) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition04.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition04.sql index e5463cb78..c314b37f6 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition04.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition04.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from t where diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition05.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition05.sql index e9bb8642d..ba5215ac8 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition05.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition05.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from t where diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition06.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition06.sql index fccc0f962..aedda4b6d 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition06.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition06.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from t1, t2 where (trunc(t1.timestamp) between to_date('110226','yymmdd') and to_date('110326','yymmdd')) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition07.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition07.sql index 769a7724c..e3bd02b7f 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition07.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition07.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from append where diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition08.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition08.sql index 80a0cca36..fbf79904f 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition08.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition08.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from "p" where diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition09.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition09.sql index 4d1f738c4..a7ff8fb59 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition09.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition09.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select sum(nvl(pl.qty,0)) from diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition10.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition10.sql index 4b7394928..1ff4d72dc 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition10.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition10.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select department_id, last_name, salary from employees x where diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition11.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition11.sql index d93cfbd56..23be3d864 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition11.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition11.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select distinct X from X,Y,Z where diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition12.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition12.sql index 71a5428e2..29041d1ce 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition12.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition12.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from v.e where cid <> rid diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition14.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition14.sql index bff0216df..8ba03db31 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition14.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition14.sql @@ -1,2 +1,11 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from dual where trim(sxhnode_key) is not null diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition15.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition15.sql index a7c151378..d79d29a24 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition15.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition15.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select "a3"."r_id" "r_id" from diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition16.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition16.sql index dd711ee7a..8c2039b1b 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition16.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition16.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from persons p where value(p) is of type(only employee_t) - \ No newline at end of file + diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition17.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition17.sql index 6d8b2691e..6c71acc8b 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition17.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition17.sql @@ -1,2 +1,11 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- delete from table_name where current of cursor_name diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition18.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition18.sql index e66f6fbcb..457f74ffa 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition18.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition18.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- update tab1 set c1 = 'x' where current of c_cur1 diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition19.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition19.sql index de23d2486..d3e618cab 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition19.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition19.sql @@ -1,5 +1,14 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from employees where (salary, salary) >= some ( 1400, 3000) order by employee_id - \ No newline at end of file + diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition20.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition20.sql index 77419b653..cdecbaac5 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition20.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/condition20.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from employees where (salary, salary) >= some ( select 1, 2 from dual ) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/connect_by01.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/connect_by01.sql index 2dd3cd199..c51aaf569 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/connect_by01.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/connect_by01.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- with o as ( select 'a' obj, 'b' link from dual union all diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/connect_by02.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/connect_by02.sql index f960c524a..1b97f3b82 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/connect_by02.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/connect_by02.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select lpad(' ',2*(level-1)) || last_name org_chart, employee_id, manager_id, job_id from employees diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/connect_by03.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/connect_by03.sql index 2f8d7d320..68af12785 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/connect_by03.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/connect_by03.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select lpad(' ',2*(level-1)) || last_name org_chart, employee_id, manager_id, job_id from employees diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/connect_by04.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/connect_by04.sql index e4b829905..bc334ae08 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/connect_by04.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/connect_by04.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select lpad(' ',2*(level-1)) || last_name org_chart, employee_id, manager_id, job_id from employees diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/connect_by05.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/connect_by05.sql index 72e565aa7..6e6716cb9 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/connect_by05.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/connect_by05.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- with liste as ( select substr(:liste, instr(','||:liste||',', ',', 1, rn), instr(','||:liste||',', ',', 1, rn+1) - diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/connect_by06.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/connect_by06.sql index fbe3b0cb1..6b7ed37cb 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/connect_by06.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/connect_by06.sql @@ -1,7 +1,16 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select last_name "Employee", connect_by_root last_name "Manager", level-1 "Pathlen", sys_connect_by_path(last_name, '/') "Path" from employees where level > 1 and department_id = 110 connect by prior employee_id = manager_id order by "Employee", "Manager", "Pathlen", "Path" - \ No newline at end of file + diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/connect_by07.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/connect_by07.sql index 382ff583b..8b4520eb1 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/connect_by07.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/connect_by07.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select t.*, connect_by_root id from test t start with t.id = 1 diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/datetime01.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/datetime01.sql index 2d9e99d8b..afebc11c2 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/datetime01.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/datetime01.sql @@ -1 +1,10 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select from_tz(cast(to_date('1999-12-01 11:00:00','yyyy-mm-dd hh:mi:ss') as timestamp), 'america/new_york') at time zone 'america/los_angeles' "west coast time" from dual diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/datetime02.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/datetime02.sql index d001db41c..36bfd1271 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/datetime02.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/datetime02.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select dbin.db_name, dbin.instance_name, diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/datetime03.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/datetime03.sql index 1c9ccf5ef..1423abf2f 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/datetime03.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/datetime03.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select timestamp '2009-10-29 01:30:00' at time zone 'us/pacific'from dual diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/datetime04.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/datetime04.sql index aae6733ab..2ecaaa9b4 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/datetime04.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/datetime04.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select timestamp '2009-10-29 01:30:00' from dual diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/datetime05.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/datetime05.sql index 452954429..dd3e7144d 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/datetime05.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/datetime05.sql @@ -1 +1,10 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select date '1900-01-01' from dual diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/datetime06.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/datetime06.sql index c157eedbf..0c6dfc6c3 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/datetime06.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/datetime06.sql @@ -1 +1,10 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from dual where sysdate > date '2013-04-10' diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/dblink01.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/dblink01.sql index 77d3634a7..a97586ec3 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/dblink01.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/dblink01.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select last_name, department_name from employees@remote, departments where employees.department_id = departments.department_id diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/explain01.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/explain01.sql index 49537cb82..a8a859378 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/explain01.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/explain01.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- explain plan set statement_id = 'raise in tokyo' into plan_table diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/flashback01.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/flashback01.sql index 52f945993..b40320c3d 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/flashback01.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/flashback01.sql @@ -1 +1,10 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select value(p$) from "XDB"."XDB$SCHEMA" as of snapshot(:2) p$ where SYS_NC_OID$ = :1 diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/for_update01.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/for_update01.sql index ad5980b24..cdf9ec5e9 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/for_update01.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/for_update01.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select employee_id from (select * from employees) for update of employee_id diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/for_update02.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/for_update02.sql index 6ea9a8d3e..ba4d1ab7e 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/for_update02.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/for_update02.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select employee_id from (select employee_id+1 as employee_id from employees) for update diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/for_update03.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/for_update03.sql index 27a7ae027..e567c0df9 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/for_update03.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/for_update03.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select employee_id from (select employee_id+1 as employee_id from employees) for update of employee_id diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/for_update04.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/for_update04.sql index d41b21615..be02fab85 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/for_update04.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/for_update04.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select employee_id from (select employee_id+1 as employee_id from employees) for update of employee_id nowait diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/for_update05.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/for_update05.sql index 0b83ea8e3..cdc281924 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/for_update05.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/for_update05.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select employee_id from (select employee_id+1 as employee_id from employees) for update of employee_id wait 10 diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/for_update06.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/for_update06.sql index 06a8e6fde..a4db0e5d0 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/for_update06.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/for_update06.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select employee_id from (select employee_id+1 as employee_id from employees) for update of employee_id skip locked diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/for_update07.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/for_update07.sql index 7736043c4..49ac51d73 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/for_update07.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/for_update07.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select employee_id from (select employee_id+1 as employee_id from employees) for update of a, b.c, d skip locked diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/for_update08.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/for_update08.sql index b1b247378..f3068fbd5 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/for_update08.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/for_update08.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select su.ttype ,su.cid ,su.s_id ,sessiontimezone from sku su where (nvl(su.up,'n')='n' and su.ttype=:b0) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/function01.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/function01.sql index 1a9bb90bb..ff2865291 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/function01.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/function01.sql @@ -1 +1,10 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select decode(decode(decode( (select count(1) from dual), a, 1, 0), 0, 1), 1, 0) from dual diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/function02.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/function02.sql index 492cb9d05..d6832f338 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/function02.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/function02.sql @@ -1 +1,10 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select set(x) from dual diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/function03.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/function03.sql index e8f8f02d3..f93b63aad 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/function03.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/function03.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select trim(both from con.ke) from dual diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/function04.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/function04.sql index c65722f8a..77262351f 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/function04.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/function04.sql @@ -1 +1,10 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select lnnvl( 2 > 1) from dual diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/function05.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/function05.sql index 105727cf4..b023c7ef7 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/function05.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/function05.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select count(*) from employees where lnnvl(commission_pct >= .2) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/function06.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/function06.sql index ed4e2ebea..c44dad724 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/function06.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/function06.sql @@ -1 +1,10 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- call dbms_scheduler.auto_purge ( ) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/function07.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/function07.sql index 82169ce17..a529757b9 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/function07.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/function07.sql @@ -1,7 +1,16 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select cust_gender, count(*) as cnt, round(avg(age)) as avg_age from mining_data_apply_v where prediction(dt_sh_clas_sample cost model using cust_marital_status, education, household_size) = 1 group by cust_gender order by cust_gender - \ No newline at end of file + diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby01.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby01.sql index fb6f3619e..eecd8b676 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby01.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby01.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select :b3 as l_snap_id , :b2 as p_dbid , :b1 as p_instance_number , nvl(pid, -9) pid , nvl(serial#, -9) serial# , decode(pid, null, null, max(spid)) spid , decode(pid, null, null, max(program)) program , decode(pid, null, null, max(background)) background , sum(pga_used_mem) pga_used_mem , sum(pga_alloc_mem) pga_alloc_mem , sum(pga_freeable_mem) pga_freeable_mem , max(pga_alloc_mem) max_pga_alloc_mem , max(pga_max_mem) max_pga_max_mem , diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby02.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby02.sql index bb36a5680..7d4e38eed 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby02.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby02.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select decode(pid, null, null, max(program)) program , decode(pid, null, null, max(background)) background , sum(pga_used_mem) pga_used_mem , sum(pga_alloc_mem) pga_alloc_mem , sum(pga_freeable_mem) pga_freeable_mem , max(pga_alloc_mem) max_pga_alloc_mem , max(pga_max_mem) max_pga_max_mem , @@ -8,4 +17,4 @@ where program != 'pseudo' group by grouping sets ( (), ((pid+1), serial#) ) - \ No newline at end of file + diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby03.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby03.sql index 64b1783f4..144442b1d 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby03.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby03.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from x group by grouping sets ( a, 1 ) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby04.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby04.sql index 1d37e20d1..21370b98f 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby04.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby04.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from x group by grouping sets ( (a),1 ) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby05.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby05.sql index 6a9f76bf5..3305ad15f 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby05.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby05.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from x group by grouping sets ( ((a),b), ((a),b) ) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby06.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby06.sql index 04330a875..0288b5563 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby06.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby06.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select prod_category, prod_subcategory, country_id, cust_city, count(*) from products, sales, customers diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby07.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby07.sql index 0c43829ad..6accaf851 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby07.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby07.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select decode((tt || tc), '56', count(distinct cn), '57', sum(nu)) as q from t where tt='500' diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby08.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby08.sql index d40e47d05..d543c517c 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby08.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby08.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select c.constraint_name , max(r.constraint_name) as r_constraint_name @@ -15,4 +24,4 @@ select a.r_owner = :f1 and a.constraint_type = 'r' group by c.constraint_name, rollup (c.column_name) - \ No newline at end of file + diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby09.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby09.sql index e67b35e9b..4dac65c9f 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby09.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby09.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select fact_1_id, fact_2_id, sum(sales_value) as sales_value, diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby10.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby10.sql index 8de57ab4d..c41556f87 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby10.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby10.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select fact_1_id, fact_2_id, sum(sales_value) as sales_value, diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby11.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby11.sql index d6643660f..b53ee5feb 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby11.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby11.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select fact_1_id, fact_2_id, sum(sales_value) as sales_value, diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby12.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby12.sql index 8c75f15fe..3e61a0482 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby12.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby12.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select fact_1_id, fact_2_id, fact_3_id, @@ -5,4 +14,4 @@ select fact_1_id, grouping_id(fact_1_id, fact_2_id, fact_3_id) as grouping_id from dimension_tab group by cube(fact_1_id, fact_2_id, fact_3_id) -order by fact_1_id, fact_2_id, fact_3_id \ No newline at end of file +order by fact_1_id, fact_2_id, fact_3_id diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby13.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby13.sql index 6633347a5..9c055ef73 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby13.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby13.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select fact_1_id, fact_2_id, fact_3_id, @@ -5,4 +14,4 @@ select fact_1_id, grouping_id(fact_1_id, fact_2_id, fact_3_id) as grouping_id from dimension_tab group by grouping sets((fact_1_id, fact_2_id), (fact_1_id, fact_3_id)) -order by fact_1_id, fact_2_id, fact_3_id \ No newline at end of file +order by fact_1_id, fact_2_id, fact_3_id diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby14.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby14.sql index 104826440..3e61a0482 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby14.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby14.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select fact_1_id, fact_2_id, fact_3_id, diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby15.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby15.sql index bd3da1c5f..6e6f3ed5b 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby15.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby15.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select fact_1_id, fact_2_id, fact_3_id, diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby16.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby16.sql index d5aeb49b5..107804a6d 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby16.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby16.sql @@ -1,7 +1,16 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select fact_1_id, fact_2_id, sum(sales_value) as sales_value, grouping_id(fact_1_id, fact_2_id) as grouping_id from dimension_tab group by grouping sets(fact_1_id, fact_2_id) -order by fact_1_id, fact_2_id \ No newline at end of file +order by fact_1_id, fact_2_id diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby17.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby17.sql index 03166a8d1..4a8ff6ea3 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby17.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby17.sql @@ -1,7 +1,16 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select fact_3_id, fact_4_id, sum(sales_value) as sales_value, grouping_id(fact_3_id, fact_4_id) as grouping_id from dimension_tab group by grouping sets(fact_3_id, fact_4_id) -order by fact_3_id, fact_4_id \ No newline at end of file +order by fact_3_id, fact_4_id diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby18.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby18.sql index 92b7ad767..0cc908ea0 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby18.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby18.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select fact_1_id, fact_2_id, fact_3_id, @@ -6,4 +15,4 @@ select fact_1_id, grouping_id(fact_1_id, fact_2_id, fact_3_id, fact_4_id) as grouping_id from dimension_tab group by grouping sets(fact_1_id, fact_2_id), grouping sets(fact_3_id, fact_4_id) -order by fact_1_id, fact_2_id, fact_3_id, fact_4_id \ No newline at end of file +order by fact_1_id, fact_2_id, fact_3_id, fact_4_id diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby19.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby19.sql index 4344eb303..e3fb61557 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby19.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby19.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select channels.channel_desc, countries.country_iso_code, to_char(sum(amount_sold), '9,999,999,999') sales$ from sales, customers, times, channels, countries diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby20.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby20.sql index afa085fe4..562a90c28 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby20.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby20.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select channels.channel_desc, calendar_month_desc, countries.country_iso_code, to_char(sum(amount_sold), '9,999,999,999') sales$ @@ -10,4 +19,4 @@ where sales.time_id=times.time_id and times.calendar_month_desc in ('2000-09', '2000-10') and countries.country_iso_code in ('gb', 'us') group by - rollup(channels.channel_desc, calendar_month_desc, countries.country_iso_code) \ No newline at end of file + rollup(channels.channel_desc, calendar_month_desc, countries.country_iso_code) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby21.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby21.sql index a9686aa02..0210886e5 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby21.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby21.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select channel_desc, calendar_month_desc, countries.country_iso_code, to_char(sum(amount_sold), '9,999,999,999') sales$ from sales, customers, times, channels, countries @@ -7,4 +16,4 @@ where sales.time_id=times.time_id and sales.cust_id=customers.cust_id and and channels.channel_desc in ('direct sales', 'internet') and times.calendar_month_desc in ('2000-09', '2000-10') and countries.country_iso_code in ('gb', 'us') -group by cube(channel_desc, calendar_month_desc, countries.country_iso_code) \ No newline at end of file +group by cube(channel_desc, calendar_month_desc, countries.country_iso_code) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby22.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby22.sql index 5b0c9c69b..db5cf6dd7 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby22.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby22.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select channel_desc, calendar_month_desc, country_iso_code, to_char(sum(amount_sold), '9,999,999,999') sales$, grouping(channel_desc) as ch, grouping(calendar_month_desc) as mo, grouping(country_iso_code) as co diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby23.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby23.sql index 4b16c2cae..a7ead49cb 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby23.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/groupby23.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select channel_desc, calendar_month_desc, country_iso_code, to_char( sum(amount_sold), '9,999,999,999') sales$, grouping(channel_desc) ch, grouping (calendar_month_desc) mo, grouping(country_iso_code) co diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert01.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert01.sql index fa035f942..d883e2942 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert01.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert01.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- insert when mod( object_id, 2 ) = 1 then into t1 ( x, y ) values ( s.nextval, object_id ) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert02.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert02.sql index 7c561e5df..be1078391 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert02.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert02.sql @@ -1,2 +1,11 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- -- insert pl/sql recond insert into t values trec diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert03.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert03.sql index 6f6d62637..d0e930946 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert03.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert03.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- -- insert when insert when (deptno=10) then diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert04.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert04.sql index 001a9ebe6..bff7a5882 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert04.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert04.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- -- insert all insert all into ap_cust values (customer_id, program_id, delivered_date) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert05.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert05.sql index 2c136e30b..abbad97cb 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert05.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert05.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- -- insert all insert all into t (pid, fname, lname) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert06.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert06.sql index e42048f17..5b60e78af 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert06.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert06.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- insert all when (deptno=10) then into emp_10 (empno,ename,job,mgr,sal,deptno) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert07.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert07.sql index 3b7f5afa3..728b9a6c1 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert07.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert07.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- insert first when customer_id < 'i' then into cust_ah diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert08.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert08.sql index 01cc8acc1..d8214f414 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert08.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert08.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- -- without check option insert into ( select deptno, dname, loc diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert09.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert09.sql index c8e2035a4..7b39b0f18 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert09.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert09.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- insert into ( select deptno, dname, loc from dept diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert10.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert10.sql index ff5fb5b8a..b1c9c715b 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert10.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert10.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- insert into ( select empno, ename, job, sal, deptno from emp) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert11.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert11.sql index 0e3047d24..d122b3232 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert11.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert11.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- insert into emp (empno, ename) values diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert12.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert12.sql index afdff6da8..716f3d6d6 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert12.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/insert12.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- insert into emp (empno, ename) values diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/interval01.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/interval01.sql index e9ac9ec36..7398a9bee 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/interval01.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/interval01.sql @@ -1,2 +1,11 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select (systimestamp - order_date) day(9) to second from orders where order_id = 2458 diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/interval02.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/interval02.sql index 1b82cc4fc..d58baa4c0 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/interval02.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/interval02.sql @@ -1 +1,10 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select interval '42' day from dual diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/interval03.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/interval03.sql index 7114766cc..7ab4a2525 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/interval03.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/interval03.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select interval '4 5:12:10.222' day to second(3) ,interval '4 5:12' day to minute diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/interval04.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/interval04.sql index 920251681..9f65c891e 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/interval04.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/interval04.sql @@ -1 +1,10 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select interval '20' day - interval '240' hour from dual diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/interval05.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/interval05.sql index e379aad37..6feb8cd2a 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/interval05.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/interval05.sql @@ -1,2 +1,11 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- -- see metalink note 1056382.1 select 'yes' from dual where (sysdate-5,sysdate) overlaps (sysdate-2,sysdate-1) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join01.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join01.sql index efee6caec..a1ec8ac5d 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join01.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join01.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select d.department_id as d_dept_id, e.department_id as e_dept_id, e.last_name from departments d full outer join employees e on d.department_id = e.department_id diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join02.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join02.sql index 33df17c7f..582885bca 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join02.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join02.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select department_id as d_e_dept_id, e.last_name from departments d full outer join employees e using (department_id) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join03.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join03.sql index 3d779a491..e73a822b9 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join03.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join03.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select d.department_id, e.last_name from m.departments d right outer join n.employees e on d.department_id = e.department_id diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join04.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join04.sql index e7f07cb0a..8a2600074 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join04.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join04.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select d.department_id, e.last_name from departments d, employees e where d.department_id = e.department_id(+) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join05.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join05.sql index 24bd79532..dad46d577 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join05.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join05.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select times.time_id, product, quantity from inventory partition by (product) right outer join times on (times.time_id = inventory.time_id) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join06.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join06.sql index 8a17093a0..4846a1ef1 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join06.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join06.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from dual d1 join dual d2 on (d1.dummy = d2.dummy) join dual d3 on(d1.dummy = d3.dummy) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join07.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join07.sql index 5fcb6eef0..8ace20c14 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join07.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join07.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from t1 join t2 tt2 using(c) join t3 tt3 using(d) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join08.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join08.sql index cd1dc6178..e90cb27ae 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join08.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join08.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from dual t1 join (select * from dual) tt2 using(dummy) join (select * from dual) using(dummy) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join09.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join09.sql index 07eb7796c..f14759a49 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join09.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join09.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from dual t1 left outer join (select * from dual) tt2 using(dummy) left outer join (select * from dual) using(dummy) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join10.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join10.sql index d0c849794..1a424b710 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join10.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join10.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from dual t1, ( dual left outer join (select * from dual) tt2 using(dummy) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join11.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join11.sql index ca1db6050..49d4e00d3 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join11.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join11.sql @@ -1 +1,10 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from t1, ( t2 left outer join t3 using(dummy) ) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join12.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join12.sql index 88756517c..98c35428b 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join12.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join12.sql @@ -1,2 +1,11 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from dual,( dual left outer join tt2 using(dummy) ) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join13.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join13.sql index 67fc99df7..7a1ae75ff 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join13.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join13.sql @@ -1,5 +1,14 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from t1, (((( t2 left outer join t3 using(dummy) )))) - \ No newline at end of file + diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join14.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join14.sql index 89a995f77..c0dd56c62 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join14.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join14.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from dual t1, ( ( @@ -7,4 +16,4 @@ select * from dual t1, left outer join dual t5 using(dummy) ) - \ No newline at end of file + diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join15.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join15.sql index 7a7f70857..9aaece140 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join15.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join15.sql @@ -1,4 +1,13 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from dual t1, ( dual t2 join dual t3 using(dummy)) left outer join dual t4 using (dummy) - \ No newline at end of file + diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join16.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join16.sql index e1ef22280..507443516 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join16.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join16.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from dual t1, dual t2 join dual t3 using(dummy) left outer join dual t4 using(dummy) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join17.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join17.sql index 24cfc6f21..e5de76bb4 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join17.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join17.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from hdr a inner join sh s diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join18.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join18.sql index 01aa0b4ce..b68c1cbdc 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join18.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join18.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select department_id as d_e_dept_id, e.last_name from departments full outer join employees on (a=b) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join19.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join19.sql index 6ac41ea06..41b59111a 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join19.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join19.sql @@ -1 +1,10 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select d1.*, d2.* from dual d1 cross join dual d2 diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join20.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join20.sql index c95dfae0b..7b4fe87cf 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join20.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join20.sql @@ -1 +1,10 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select d1.*, d2.* from dual cross join dual diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join21.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join21.sql index 918212b43..d3c438bc4 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join21.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/join21.sql @@ -1,2 +1,11 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from sys.dual natural join sys.dual diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/keywordasidentifier01.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/keywordasidentifier01.sql index 0628c08d0..7e1bbb37d 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/keywordasidentifier01.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/keywordasidentifier01.sql @@ -1 +1,10 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select timestamp, avg, cume_dist from nulls diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/keywordasidentifier02.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/keywordasidentifier02.sql index a2b6c0ae7..b05550e00 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/keywordasidentifier02.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/keywordasidentifier02.sql @@ -1 +1,10 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select m.model from model diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/keywordasidentifier03.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/keywordasidentifier03.sql index c05b25640..58b1a1e32 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/keywordasidentifier03.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/keywordasidentifier03.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select ind.index_owner,ind.index_name,ind.uniqueness , ind.status,ind.index_type,ind.temporary, ind.partitioned,ind.funcidx_status , ind.join_index,ind.columns,ie.column_expression diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/keywordasidentifier04.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/keywordasidentifier04.sql index ce69961ec..de336157d 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/keywordasidentifier04.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/keywordasidentifier04.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- (select bs.keep keep, bs.keep_until keep_until from v$backup_set bs) union all diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/keywordasidentifier05.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/keywordasidentifier05.sql index 87e839116..fb50b7dad 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/keywordasidentifier05.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/keywordasidentifier05.sql @@ -1 +1,10 @@ -select exception from exception \ No newline at end of file +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- +select exception from exception diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/lexer01.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/lexer01.sql index f9eae8c00..1bc175271 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/lexer01.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/lexer01.sql @@ -1,2 +1,11 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from dual where 1 < > 2 and 1 ! = 2 and 1 ^ /*aaa */ = 2 diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/lexer02.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/lexer02.sql index 15aaf848a..c7722b8e8 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/lexer02.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/lexer02.sql @@ -1,2 +1,11 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select 'A' | | 'B' from dual diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/lexer03.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/lexer03.sql index 23769197e..13b7a7c6d 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/lexer03.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/lexer03.sql @@ -1,2 +1,11 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select :1, :X, :1 + 1, 1 + :2 from A where A=:3 and b= :4 and c= :5 and :A = :b diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/lexer04.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/lexer04.sql index c3931e035..a7ff5e9b5 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/lexer04.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/lexer04.sql @@ -1 +1,10 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select tbl$or$idx$part$num("sys"."wrh$_seg_stat",0,4,0,"rowid") as c1 from t1 diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/lexer05.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/lexer05.sql index 8dcc674cf..33dfd3bde 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/lexer05.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/lexer05.sql @@ -1 +1,10 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select tbl$or$idx$part$num("sys"."wrh:_seg_stat",0,4,0,"rowid") as c1 from t1 diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/like01.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/like01.sql index 5b41b6d8c..18fe4a402 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/like01.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/like01.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select last_name from employees where last_name diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/loop01.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/loop01.sql index 05c25327b..65677be0c 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/loop01.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/loop01.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- begin forall i in indices of :jobs update emp diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/loop02.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/loop02.sql index bcaf92473..198e1369e 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/loop02.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/loop02.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- BEGIN <> FOR i IN 1..3 LOOP @@ -10,4 +19,4 @@ BEGIN END IF; END LOOP inner_loop; END LOOP outer_loop; -END; \ No newline at end of file +END; diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/merge01.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/merge01.sql index 464bbcd64..d709618e5 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/merge01.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/merge01.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- merge into bonuses d using (select employee_id.* from employees) s on (employee_id = a) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/merge02.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/merge02.sql index 28baf2f42..ba00db86a 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/merge02.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/merge02.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- merge into bonuses d using (select employee_id.* from employees) s on (employee_id = a) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/merge03.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/merge03.sql index c8756c532..9e16d5019 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/merge03.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/merge03.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- merge /*+ dynamic_sampling(mm 4) dynamic_sampling_est_cdn(mm) dynamic_sampling(m 4) dynamic_sampling_est_cdn(m) */ diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/merge04.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/merge04.sql index 53e3ccd3d..5fe26e217 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/merge04.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/merge04.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- merge /*+ dynamic_sampling(mm 4) dynamic_sampling_est_cdn(mm) dynamic_sampling(m 4) dynamic_sampling_est_cdn(m) */ diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause01.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause01.sql index 300b0f6cf..6eb6ee2f1 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause01.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause01.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select country,prod,year,s from sales_view_ref model diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause02.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause02.sql index 7559ebb54..397e2d6d4 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause02.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause02.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select country, year, sale, csum from (select country, year, sum(sale) sale diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause03.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause03.sql index 1459be944..67ed7d545 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause03.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause03.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select country,prod,year,s from sales_view_ref model diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause04.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause04.sql index cc40f3835..f2e9c525e 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause04.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause04.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select country, year, sale, csum from (select country, year, salex sale @@ -12,4 +21,4 @@ select country, year, sale, csum ) order by country, year - \ No newline at end of file + diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause05.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause05.sql index bb3b96ab5..77e3f2cdc 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause05.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause05.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select country, year, sale, csum from (select country, year, salex sale diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause06.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause06.sql index 37f0d19b4..fff30faca 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause06.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause06.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select key , dummy diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause07.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause07.sql index 36225b0ef..cc9c01cb0 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause07.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause07.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select group_2 , num_val , diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause08.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause08.sql index 9cb5a45f4..be4da4d34 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause08.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause08.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select key , num_val , diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause09.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause09.sql index 202994b52..1008093f8 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause09.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause09.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select key , num_val , diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause10.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause10.sql index 131bc16b3..aea6951aa 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause10.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause10.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select key , num_val , diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause11.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause11.sql index d1aa6dcb6..1e1326738 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause11.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause11.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select bio, rtrim (str_new, ';') new_str from db_temp model diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause12.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause12.sql index 544d5002c..e19022a9b 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause12.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause12.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select organisation, level1, level2, level3, level4 from ( select 'org_name' as organisation, level as org_level, ename diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause13.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause13.sql index 08d155c9d..6c05d0ca6 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause13.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause13.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- -- http://oracle101.blogspot.de/2008/08/oracle-model-clause.html select organisation, level1, nvl(level2,level1) as level2, nvl(level3,nvl(level2,level1)) as level3, diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause14.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause14.sql index 523c8a6f4..56f4b120f 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause14.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause14.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- -- http://www.adp-gmbh.ch/ora/sql/model_clause/ex_generate_dates.html select dt from (select trunc(sysdate) dt from dual) model diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause15.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause15.sql index 7357a877b..27d21f9bd 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause15.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause15.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- -- http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:8912311513313 select name, to_char(dt,'DD-MM-YYYY') dt, amt, cum_amt diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause16.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause16.sql index 01b5dd144..d83fa7aeb 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause16.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/model_clause16.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select a, b, d, c, dt, p, pp, tech_pp, tech_p from ( diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/numbers01.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/numbers01.sql index 3987650a1..78896edb4 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/numbers01.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/numbers01.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select 25 , +6.34 , 0.5 diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/object_access01.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/object_access01.sql index 236c23bb8..fd5e5e436 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/object_access01.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/object_access01.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select extractvalue(value(t), '/select_list_item/pos') + 1 pos, extractvalue(value(t), '/select_list_item/value') res, diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/only-parse-test/comment01.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/only-parse-test/comment01.sql index e75f3fc74..fe3c4bb54 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/only-parse-test/comment01.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/only-parse-test/comment01.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- -- com1 select * /* com2 */ diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/only-parse-test/comment02.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/only-parse-test/comment02.sql index da9654be0..c74c8b49a 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/only-parse-test/comment02.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/only-parse-test/comment02.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- WITH REFS AS ( diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/only-parse-test/numbers02.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/only-parse-test/numbers02.sql index 064058168..edf80bca6 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/only-parse-test/numbers02.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/only-parse-test/numbers02.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select 25 , 1.-+.5 , 1.+.5 diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/order_by01.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/order_by01.sql index ab2a794fb..9e0d9908a 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/order_by01.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/order_by01.sql @@ -1 +1,10 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from dual order by 1 diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/order_by02.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/order_by02.sql index 2abe954fc..aa06c9aca 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/order_by02.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/order_by02.sql @@ -1 +1,10 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from dual order by 1 asc diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/order_by03.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/order_by03.sql index 517b05a53..58cb61e6e 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/order_by03.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/order_by03.sql @@ -1 +1,10 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from dual order by m.year, m.title, f(a) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/order_by04.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/order_by04.sql index 0c60c3404..78d6c22a5 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/order_by04.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/order_by04.sql @@ -1 +1,10 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from dual order by a nulls first, b nulls last diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/order_by05.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/order_by05.sql index 5ae8f4268..bb78fb272 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/order_by05.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/order_by05.sql @@ -1 +1,10 @@ -select * from dual order siblings by a nulls first, b nulls last, c nulls last, d nulls last, e nulls last \ No newline at end of file +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- +select * from dual order siblings by a nulls first, b nulls last, c nulls last, d nulls last, e nulls last diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/order_by06.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/order_by06.sql index 9127e6297..f99478ec7 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/order_by06.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/order_by06.sql @@ -1 +1,10 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- with a as (select * from dual order by 1) select * from a diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot01.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot01.sql index 98db57467..d2bf8660e 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot01.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot01.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from pivot_table unpivot (yearly_total for order_mode in (store as 'direct', internet as 'online')) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot02.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot02.sql index a29895aef..ae476cbcd 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot02.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot02.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from ( select times_purchased as "puchase frequency", state_code from customers t @@ -9,4 +18,4 @@ select * from ( ) order by 1 - \ No newline at end of file + diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot03.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot03.sql index 27c912147..409414860 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot03.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot03.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from ( select times_purchased as "purchase frequency", state_code from customers t @@ -9,4 +18,4 @@ select * from ( ) order by 1 - \ No newline at end of file + diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot04.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot04.sql index 899d21212..9747e709a 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot04.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot04.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select value from ( diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot05.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot05.sql index 2b65d13bd..bbca72561 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot05.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot05.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from (select customer_id, product_code, quantity from pivot_test) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot06.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot06.sql index 224aaa08b..5b6b1c6c9 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot06.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot06.sql @@ -1,6 +1,15 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from (select product_code, quantity from pivot_test) pivot xml (sum(quantity) as sum_quantity for product_code in (select distinct product_code from pivot_test - where id < 10)) \ No newline at end of file + where id < 10)) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot07.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot07.sql index bc7f8bfe4..3edb744f0 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot07.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot07.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from (select customer_id, product_code, quantity from pivot_test) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot08.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot08.sql index db7d56764..108e708b6 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot08.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot08.sql @@ -1,4 +1,13 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from (select product_code, quantity from pivot_test) -pivot (sum(quantity) as sum_quantity for product_code in ('a' as a, 'b' as b, 'c' as c)) \ No newline at end of file +pivot (sum(quantity) as sum_quantity for product_code in ('a' as a, 'b' as b, 'c' as c)) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot09.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot09.sql index b1ebd96aa..e30d94927 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot09.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot09.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from (s join d using(c)) pivot diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot10.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot10.sql index 82bf6359a..bced374fd 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot10.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot10.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from s join d using(c) pivot diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot11.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot11.sql index dd9dff6ab..a7f120985 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot11.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot11.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from s pivot diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot12.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot12.sql index 79387a433..91d32a79b 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot12.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/pivot12.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select value from ( ( @@ -15,4 +24,4 @@ for value_type in (v1, v2,v3,v4,v5) -- Also can give ANY here. ) - ) \ No newline at end of file + ) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring01.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring01.sql index 79df737aa..be8ec6910 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring01.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring01.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- with reports_to_101 (eid, emp_last, mgr_id, reportlevel) as ( diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring02.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring02.sql index bff7e8b86..ad699b743 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring02.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring02.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- with reports_to_101 (eid, emp_last, mgr_id, reportlevel, mgr_list) as diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring03.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring03.sql index 0db9ed13d..84fef75c2 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring03.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring03.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- with reports_to_101 (eid, emp_last, mgr_id, reportlevel) as ( diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring04.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring04.sql index 1229d6644..23efa6687 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring04.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring04.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- with org_chart (eid, emp_last, mgr_id, reportlevel, salary, job_id) as ( diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring05.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring05.sql index 099548ca6..9bb17638b 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring05.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring05.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- with x1 as (select max(y1) from klm1), x2 as (select max(y2) from klm2), diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring06.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring06.sql index 7858876f2..26c1fcd4a 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring06.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring06.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- with dept_costs as ( select department_name, sum(salary) dept_total diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring07.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring07.sql index 7c568a3f1..6eeac7829 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring07.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring07.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- with timegrouped_rawdata as ( diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring08.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring08.sql index 498a8af6e..7d3144702 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring08.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring08.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- with x1 as ( select * from t1 ), x2 as ( select * from t2 join t3 on (t2.a2 = t3.a3)) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring09.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring09.sql index b7a1f3657..ac0fed065 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring09.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring09.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- with rn as ( select rownum rn from dual diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring10.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring10.sql index c20131da8..091a33582 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring10.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring10.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- with o(obj,link) as ( select 'a', 'b' from dual union all diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring11.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring11.sql index 36b47aa78..2bbb0bf3f 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring11.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring11.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- with col_generator as ( select t1.batch_id, decode(t1.action, 'sent', t1.actdate) sent, decode(t2.action,'recv', t2.actdate) received diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring12.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring12.sql index 00bd06f23..d88bcb98e 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring12.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring12.sql @@ -1,2 +1,11 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- with days as (select (select trunc(sysdate, 'MONTH') from dual) + rownum -1 as d from dual connect by rownum < 31) -select d from days where (trunc(d) - trunc(d,'IW') +1 ) not in (6,7) and d <= last_day(sysdate) \ No newline at end of file +select d from days where (trunc(d) - trunc(d,'IW') +1 ) not in (6,7) and d <= last_day(sysdate) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring13.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring13.sql index 068f9f699..e2150e229 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring13.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring13.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- with dup_hiredate (eid, emp_last, mgr_id, reportlevel, hire_date, job_id) as ( select employee_id, last_name, manager_id, 0 reportlevel, hire_date, job_id from employees diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring14.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring14.sql index ca646e152..25da69e8d 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring14.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/query_factoring14.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- with emp_count (eid, emp_last, mgr_id, mgrlevel, salary, cnt_employees) as ( select employee_id, last_name, manager_id, 0 mgrlevel, salary, 0 cnt_employees from employees diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/returning01.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/returning01.sql index 0aacd037c..a69a66c33 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/returning01.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/returning01.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- update emp set ename = lower(ename) where job = :jobs(i) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/sample01.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/sample01.sql index 605b0338d..80f5031ff 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/sample01.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/sample01.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from ( select 1 as c1 from "sys"."obj$" sample block (14.285714 , 1) seed (1) "o" diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/set01.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/set01.sql index b370b47ce..99682a138 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/set01.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/set01.sql @@ -1,6 +1,15 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select nt , set(nt) as nt_set from ( select varchar2_ntt('a','b','c','c') as nt from dual - ) \ No newline at end of file + ) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/set02.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/set02.sql index fee2c7749..117126b1f 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/set02.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/set02.sql @@ -1,2 +1,11 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select nt.column_value as distinct_element - from table(set(varchar2_ntt('a','b','c','c'))) nt \ No newline at end of file + from table(set(varchar2_ntt('a','b','c','c'))) nt diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple02.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple02.sql index 459fb2059..091b07026 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple02.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple02.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select employee_id from (select employee_id+1 as employee_id from employees) for update diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple03.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple03.sql index 3ca7d8927..2329ce066 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple03.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple03.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select employee_id from (select employee_id+1 as employee_id from employees) for update of employee_id diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple04.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple04.sql index 07aacdcb5..091e2fe11 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple04.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple04.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from ( ( diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple05.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple05.sql index b1d5077ae..e7089d5c5 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple05.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple05.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from ( select * from a diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple06.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple06.sql index 3a4438047..b8a9ea6ef 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple06.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple06.sql @@ -1,2 +1,11 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from (( select * from dual)) a diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple07.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple07.sql index c5a603627..44b266242 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple07.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple07.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from dual for update of dual diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple08.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple08.sql index d9980f3b9..de56d0346 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple08.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple08.sql @@ -1,2 +1,11 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select a, b, c, d, e, 1, 2, f(a,b,c,1+1) from dual diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple09.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple09.sql index d2637f4b8..8d73ff962 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple09.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple09.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select a||last_name, employee_id from employees diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple10.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple10.sql index 753ad3ad2..625c07d1a 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple10.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple10.sql @@ -1 +1,10 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select a as over from over diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple11.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple11.sql index ed2205330..195591544 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple11.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple11.sql @@ -1 +1,10 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select a.* from dual diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple12.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple12.sql index 33f65c6b6..bb239ac7a 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple12.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple12.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select +1, t2.division_name as aaaa, diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple13.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple13.sql index e09eef0cb..e45d215eb 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple13.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/simple13.sql @@ -1 +1,10 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from (dual), (dual d), (dual) d diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/string01.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/string01.sql index 12c46c20b..704fbf30f 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/string01.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/string01.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select 'hello' , 'oracle.dbs' diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union01.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union01.sql index 69ad28451..1d340bffe 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union01.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union01.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- (select 'a' obj, 'b' link from dual) union all (select 'a', 'c' from dual) union all (select 'c', 'd' from dual) union all diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union02.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union02.sql index a4fad19ac..1168c0e69 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union02.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union02.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- (select distinct job_id from hr.jobs) union all (select distinct job_id from hr.job_history) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union03.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union03.sql index 19275978b..63ac88f78 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union03.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union03.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- (select distinct job_id from hr.jobs) union all ( diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union04.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union04.sql index 911f952bc..46adc54fc 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union04.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union04.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- ( select distinct job_id from hr.jobs ) diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union05.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union05.sql index 87a46aa34..3faf460d3 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union05.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union05.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- (select * from dual) union all ( diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union06.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union06.sql index 2ca578726..ee1246d24 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union06.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union06.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- (( select "x"."r_no", "x"."i_id", "x"."ind", diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union07.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union07.sql index e169acd99..7d45ccade 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union07.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union07.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from ( select row_.*, rownum rownum_ from ( diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union08.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union08.sql index 27039011d..127f30492 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union08.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union08.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from dual where exists ( (select * from dual) union all diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union09.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union09.sql index a63f49935..5bb988edb 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union09.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union09.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select * from ( select row_.* from ( diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union10.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union10.sql index a697a08ab..09584ad2c 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union10.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/union10.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select ( ( diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/xmltable01.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/xmltable01.sql index 7d0bd5912..cc5902330 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/xmltable01.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/xmltable01.sql @@ -1,3 +1,12 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select warehouse_name warehouse, warehouse2."water", warehouse2."rail" from warehouses, xmltable('/warehouse' diff --git a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/xmltable02.sql b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/xmltable02.sql index c5f544091..4a266b2a5 100644 --- a/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/xmltable02.sql +++ b/src/test/resources/net/sf/jsqlparser/statement/oracle-tests/xmltable02.sql @@ -1,2 +1,11 @@ +--- +-- #%L +-- JSQLParser library +-- %% +-- Copyright (C) 2004 - 2019 JSQLParser +-- %% +-- Dual licensed under GNU LGPL 2.1 or Apache License 2.0 +-- #L% +--- select xmlelement("other_attrs", xmlelement("parsing_user_id", parsing_user_id)).getClobVal() other from f