Skip to content

Commit

Permalink
Initial commit (base version: 0.7.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
Florent Bécart committed Jun 20, 2011
0 parents commit 67c9150
Show file tree
Hide file tree
Showing 429 changed files with 120,361 additions and 0 deletions.
109 changes: 109 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
<project name="jsqlparser" default="main" basedir=".">

<property environment="env"/>

<property file="src/net/sf/jsqlparser/version.properties" />

<property name="javacchome" value="./javacc-5.0"/>
<property name="build.compiler" value="modern"/>
<property name="build.dir" value="./classes" />
<property name="src.dir" value="./src"/>
<property name="test.build.dir" value="./testclasses" />
<property name="test.src.dir" value="./testsrc"/>
<property name="junit.jar" value="./testlib/junit.jar"/>
<property name="parser.dir" value="${src.dir}/net/sf/jsqlparser/parser"/>
<property name="jar.file" value="jsqlparser"/>
<property name="jar.file.name" value="${jar.file}-${version}.jar"/>
<property name="binjar.file.name" value="./lib/${jar.file}.jar"/>

<path id="project.class.path">
<pathelement path="${build.dir}"/>
</path>

<path id="testproject.class.path">
<path refid="project.class.path" />
<pathelement path="${test.build.dir}" />
<pathelement path="${junit.jar}" />
</path>

<target name="clean">
<delete dir="${build.dir}" includeEmptyDirs="true" />
<delete dir="${test.build.dir}" includeEmptyDirs="true" />
</target>


<target name="prep">
<mkdir dir="${build.dir}"/>
<mkdir dir="${test.build.dir}"/>
</target>

<target name="javacc">
<delete file="${parser.dir}/TokenMgrError.java" />
<delete file="${parser.dir}/ParseException.java" />
<delete file="${parser.dir}/Token.java" />
<delete file="${parser.dir}/ASCII_CharStream.java" />
<delete file="${parser.dir}/CCJSqlParser.java" />
<delete file="${parser.dir}/CCJSqlParserConstants.java" />
<delete file="${parser.dir}/CCJSqlParserTokenManager.java" />
<delete file="${parser.dir}/ParseException.java" />
<delete file="${parser.dir}/SimpleCharStream.java" />
<delete file="${parser.dir}/TokenMgrError.java" />
<javacc target="${parser.dir}/JSqlParserCC.jj"
outputdirectory="${src.dir}/net/sf/jsqlparser/parser"
javacchome="${javacchome}" />
</target>

<target name="compile" >
<javac srcdir="${src.dir}" destdir="${build.dir}" debug="true" debuglevel="lines,vars,source" source="1.5">
<classpath refid="project.class.path" />
</javac>
<javac srcdir="${test.src.dir}" destdir="${test.build.dir}" debug="true" debuglevel="lines,vars,source" source="1.5">
<classpath refid="testproject.class.path" />
</javac>
</target>

<target name="test">
<junit haltonfailure="yes">
<classpath refid="testproject.class.path"/>
<formatter type="plain" usefile="false"/>
<test name="net.sf.jsqlparser.test.tablesfinder.TablesNamesFinderTest"/>
<test name="net.sf.jsqlparser.test.simpleparsing.CCJSqlParserManagerTest"/>
<test name="net.sf.jsqlparser.test.select.SelectTest"/>
<test name="net.sf.jsqlparser.test.delete.DeleteTest"/>
<test name="net.sf.jsqlparser.test.insert.InsertTest"/>
<test name="net.sf.jsqlparser.test.replace.ReplaceTest"/>
<test name="net.sf.jsqlparser.test.update.UpdateTest"/>
<test name="net.sf.jsqlparser.test.create.CreateTableTest"/>
<test name="net.sf.jsqlparser.test.drop.DropTest"/>
<test name="net.sf.jsqlparser.test.truncate.TruncateTest"/>
<test name="net.sf.jsqlparser.test.select.SpeedTest"/>
</junit>
</target>

<target name="binjar">
<delete file="${binjar.file.name}" />
<jar destfile="${binjar.file.name}" >
<fileset dir="./classes"/>
</jar>
</target>

<target name="jar">
<delete file="${jar.file.name}" />
<jar destfile="${jar.file.name}"
basedir="./../"
includes="jsqlparser/docs/**,jsqlparser/src/**,jsqlparser/testsrc/**,jsqlparser/testfiles/**,jsqlparser/lib/**,jsqlparser/build.xml,jsqlparser/change.log" excludes="**/cvs/*,**/cvs"/>
</target>

<target name="javadoc">
<javadoc destdir="docs" access="private" use="true" source="1.5"
notree="false" nonavbar="false" noindex="false"
splitindex="true" author="true" version="true"
nodeprecatedlist="false" nodeprecated="false"
packagenames="net.sf.jsqlparser.*"
sourcepath="src"
classpath="testclasses;classes;./testlib/junit.jar" additionalparam="-tag to.do:a:&quot;To Do:&quot;"/>
</target>

<target name="main" depends="clean, prep,javacc,compile, test, binjar, javadoc, jar"/>

</project>
143 changes: 143 additions & 0 deletions change.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
0.2
added optional ';' at the end of the statements
LIMIT
fixed "all columns" parsing bug, as in "select table_name.* from table_name"
UNION

0.2.1
DISTINCT ON clause
OFFSET without LIMIT

0.3
added select test cases
Fixed bug in table name (schema was swapped with the name)
Changed tableName field into table (since it is a Table object) in AllTableColumns class
added INNER join
fixed bug in IN,BETWEEN,IS NULL
fixed bug in GROUP BY (comma between list of columns was missing)
HAVING is not tied to GROUP BY anymore
Changed OrderBy in OrderByElement and OrderByClause in OrderBy
added all different syntaxes for REPLACE
Changed Update in order to be more similar to Replace
Added CREATE TABLE, DROP

0.3.1
added SpeedTest

0.3.2
added Truncate

0.3.3
Added de-parsers
Removed OrderBy (it was just a list of collection of ColumnRefences)
Removed GroupBy (it was just a list of collection of GroupByElements)
Removed list in case they are empty (just leave them as null)

0.3.4
table name and schema default to null

0.3.5
added USING in Joins and functions handling

0.3.6
proper numbers management

0.3.7
added date,time and timestamp parsing
fixed double alias in deparser

0.3.8
escaped functions
SQLExpressionList is a list of Expressions, not SimpleExpressions

0.3.9
fixed bug in no-args function deparser

0.3.10
fixed bug in GROUP BY and LIMIT in DeParser

0.3.11
fixed ASC/DESC bug in SelectDeParser
added toString methods
added TOP


0.3.12
toStrings

0.3.13
fixed minor toString bug

0.3.16
escape clause
fixed bug in order of having and order by items

0.4.0
added EXISTS clause


0.4.1
removed bug on Function names

0.4.2
Added ANY, SOME, ALL conditions

0.4.3
Removed bug 1928388

0.4.4
Added NOT to binaryexpressions
Fixed double handling (1e2, e3 etc)

0.4.5
Fixed NOT handling
Fixed not-SQL statement parsing (lots of changes in the parser)

0.5.0
Fixed "case when a > 0 then b + a"
Fixed "from tab1, left join tab2 on ..., tab3" case

0.5.1
Added RIGHT NATURAL FULL joins

0.5.2
Added SubJoin for: select * from foo as f LEFT JOIN
(bar as b RIGHT JOIN baz as z ON f.id=z.id)
ON f.id=b.id

0.6.0
Added WITH clause

0.6.1
fixed tab1, tab2 treated as INNER JOIN
Added UNION ALL or DISTINCT (but works only for first UNION)

0.6.1.a
Docs dir was missing

0.6.2
where expr1 and NOT (expr2) was not working

0.6.2.a
right expression in AND NOT didn't use NOT

0.6.3
better join.toString method

0.6.4
Alias was missing in Join SelectDeParser handling
Added DISINCT
Fixed alias in table for update

0.6.5
Added backtick ` as a quote identifier
Added support for "__" identifiers

0.6.6
Added concat (||) operator
Arithmetic expressions in CASE expression

0.7.0
Added matches (@@) operator
Changed order by and group by to be Expressions
Added bitwise operators (|, ^, &)
Loading

0 comments on commit 67c9150

Please sign in to comment.