Skip to content

Commit bbf38d0

Browse files
committed
Merge origin/master
2 parents 0020c79 + e12b864 commit bbf38d0

1 file changed

Lines changed: 16 additions & 245 deletions

File tree

README.md

Lines changed: 16 additions & 245 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,22 @@ Look here for more information and examples: https://github.com/JSQLParser/JSqlP
66

77
Version **0.9** released.
88

9-
Version **0.8.9** released.
10-
11-
Version **0.8.8** released.
12-
13-
Due to incompatibilities using maven release with git v1.8.5 I skipped version 0.8.7. So the actual released version is **0.8.8**.
14-
15-
Recent changes in **0.8.7-SNAPSHOT** for some alias support changes introducing some API changes.
16-
17-
Version **0.8.6** released.
18-
19-
20-
The first release version **0.8.5** is available at maven central (**http://repo1.maven.org/maven2/**) and at repository
21-
**https://oss.sonatype.org/content/groups/public/**.
9+
More news can be found here: https://github.com/JSQLParser/JSqlParser/wiki/News.
2210

11+
## JSqlParser
2312

24-
The maven repository settings have been changed. Version **0.8.5-SNAPSHOT** will be the
25-
first snapshot at sonatypes open source repository location. The following releases will
26-
go there as well and published to maven central. To avoid problems with the original
27-
projects artifacts the *groupid* was changed to **com.github.jsqlparser**. You will find
28-
configuration details below.
13+
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.
2914

30-
## JSqlParser
15+
## Contributions
16+
To help JSqlParsers development you are encouraged to provide
17+
* feedback
18+
* bugreports
19+
* pull requests for new features
20+
* improvement requests
3121

32-
JSqlParser parses an SQL statement and translate it into a hierarchy of Java classes.
33-
The generated hierarchy can be navigated using the Visitor Pattern.
22+
Also I would like to know about needed examples or documentation stuff.
3423

35-
## Extensions Version 0.9.1
24+
## Extensions in the latest SNAPSHOT version 0.9.1
3625

3726
* Included support for returning for insert statements.
3827

@@ -46,224 +35,14 @@ INSERT INTO mytable (mycolumn) VALUES ('1') RETURNING id
4635
UPDATE table1, table2 SET table1.col2 = table2.col2, table2.col3 = 'UPDATED' WHERE table1.col1 = table2.col1
4736
```
4837

49-
## Extensions Version 0.9
50-
51-
* Included support for some keyword object names.
52-
53-
```sql
54-
SELECT cast, do FROM tableName
55-
```
56-
57-
* Included support for named primary keys in create table statements.
58-
* Include adapter classes for visitor interfaces to simplify visitor usage.
59-
* included a huge amount of oracle test sqls. There is much room for improvement supporting all oracle syntax specials.
60-
* pivot support for subqueries implemented
61-
62-
```sql
63-
SELECT * FROM (SELECT times_purchased, state_code FROM customers t) PIVOT (count(state_code) FOR state_code IN ('NY', 'CT')) ORDER BY times_purchased
64-
```
65-
66-
* "!=" support corrected to not give "<>" while deparsing
67-
* Improved **COUNT(ALL expr)** support
68-
* lax test utils implemented
69-
* toString() for window elements corrected
70-
* Character Set support included.
71-
72-
```sql
73-
CAST(col2 AS CHAR(255) CHARACTER SET utf8)
74-
```
75-
76-
## Extensions Version 0.8.9
77-
78-
* First multi statements or script support.
79-
* Backported window option from fork to analytic expression.
80-
* Added **NULLS FIRST** and **NULLS LAST** to order by.
81-
* Improved parsing of **top**.
82-
* Improved support for multi part names (SQLServer)
83-
* Better support for signed expressions. The sign is stored in the parse tree.
84-
85-
```sql
86-
SELECT +col, -col FROM mytable
87-
```
88-
89-
* Added **CCJSqlParserUtil.parseExpression** to parse a simple expression. Now you can build expressions from a String like "a+b".
90-
91-
```java
92-
Expression expr = CCJSqlParserUtil.parseExpression("a*(5+mycolumn)");
93-
```
94-
95-
* Improved **SelectUtils** to build simple select statements.
96-
97-
```java
98-
Select select = SelectUtils.buildSelectFromTable(new Table("mytable"));
99-
```
100-
101-
## Extensions Version 0.8.8
102-
103-
* Startet a simple utility class **SelectUtils** to collect basic **select** modification tools.
104-
* addExpression adds a new expression to the select list.
105-
* addJoin adds a new join to the select.
106-
* Added support for optional " AS " for aliases.
107-
108-
```sql
109-
SELECT * FROM mytable myalias
110-
```
111-
112-
* Added first support for ALTER TABLE statements
113-
114-
```sql
115-
ALTER TABLE mytable ADD COLUMN mycolumn varchar (255)
116-
```
117-
118-
* Added support for PostgreSQL regular expression match operators.
119-
120-
```sql
121-
SELECT a, b FROM foo WHERE a ~ '[help].*';
122-
SELECT a, b FROM foo WHERE a ~* '[help].*';
123-
SELECT a, b FROM foo WHERE a !~ '[help].*';
124-
SELECT a, b FROM foo WHERE a !~* '[help].*';
125-
```
126-
127-
## Extensions Version 0.8.6
128-
129-
* Added first support for Oracle hierarchical queries
130-
131-
```sql
132-
SELECT * FROM employees CONNECT BY employee_id = manager_id ORDER BY last_name;
133-
SELECT * FROM employees START WITH employee_id = 100 CONNECT BY PRIOR employee_id = manager_id ORDER SIBLINGS BY last_name;
134-
```
135-
136-
## Extensions Version 0.8.5
137-
138-
* Added support for mysql truncate function
139-
* Changed repository location and groupid of JSqlParsers artifact.
140-
141-
```xml
142-
<dependency>
143-
<groupId>com.github.jsqlparser</groupId>
144-
<artifactId>jsqlparser</artifactId>
145-
<version>0.8.5</version>
146-
</dependency>
147-
```
148-
149-
* Added support for postgresql type **character varying**.
150-
151-
## Extensions Version 0.8.4
152-
153-
* Added support for named JDBC parameters
154-
155-
```sql
156-
SELECT * FROM mytable WHERE b = :param
157-
```
158-
* Added support for pivot expressions
159-
* Added support for boolean functions in where statements
160-
161-
```sql
162-
select * from my_table where bool_func(col)
163-
```
164-
* Added support for Oracles old join syntax for more compare operations
165-
166-
```sql
167-
select * from taba, tabb where taba.a<tabb.a(+)
168-
```
169-
* Added support for foreign keys in create table statements
170-
171-
```sql
172-
create table testTable1 (a varchar(10), b varchar(20), foreign key a references testTable2(a))
173-
create table testTable1 (a varchar(10), b varchar(20), constraint fkIdx foreign key a references testTable2(a))
174-
```
175-
* Added support for simple intervals
176-
177-
```sql
178-
select 5 - INTERVAL '45 MINUTE' from mytable
179-
```
180-
* Added support for multi values IN expression
181-
182-
```sql
183-
select * from mytable where (a,b,c) in (select a,b,c from mytable2)
184-
```
185-
186-
## Extensions Version 0.8.3
187-
188-
* Added support for cross join
189-
* Allowed complex expressions in extract from
190-
* Corrected cast expression to make type parameters usable (e.g. cast(col1 as varchar(255))
191-
* Added support for column comma list in partition by statements
192-
* Added support for columns names in create view statements
193-
194-
```sql
195-
create view testView (col1,col2) as select a, b from table
196-
```
197-
* Added support for column cast using ::
198-
* Added support for from clause in update statements
199-
200-
```sql
201-
update tab1 set c=5 from tab1 inner join tab2 on tab1.col1=tab2.col2
202-
```
203-
* Corrected TableNamesFinder to work with update statements additions.
204-
* Added support for simple create materialized view statements without additional parameters.
205-
206-
```sql
207-
create materialized view testView as select a, b from table
208-
```
209-
* Added support for simple create index statements
210-
211-
```sql
212-
create index myindex on mytab (mycol, mycol2)
213-
```
214-
215-
## Extensions til Version 0.8.2
216-
217-
* Changed project tests to junit 4
218-
* Changed project layout to maven project
219-
* Added regexp (REGEXP) operator
220-
* Added support for SELECT without FROM (e.g. "SELECT 1+2")
221-
* Moved parser from using StringBuffer to using StringBuilder
222-
* Added support for CAST expression
223-
224-
```sql
225-
select cast(col as varchar) from table
226-
```
227-
* Added support for modulo (a % b)
228-
* Added support for brackets quotation
229-
* Added support for NOT expr IS (expr IS NOT was already supported)
230-
* Added support for Oracles (+) Join Syntax
231-
232-
```sql
233-
select * from taba, tabb where taba.a=tabb.a(+)
234-
```
235-
* Added alias visitor to add aliases to selections
236-
* Added connect visitor
237-
* TableNamesFinder moved from tests to main source
238-
* Added proper support for sets (union, intersect)
38+
## Extensions of JSqlParser releases
23939

240-
```sql
241-
select a from taba union select b from tabb
242-
select a from taba intersect select b from tabb
243-
select a from taba except select b from tabb
244-
select a from taba minus select b from tabb
245-
```
246-
* Added support for `extract(year from datetime-expr)`
247-
* Start implementation of analytical expressions
248-
* merged support for CREATE VIEW
249-
* Added lateral subquery support
250-
* Added support for multi values insert statement
251-
252-
```sql
253-
insert taba (col1,col2) values (1,2), (2,5), (3,20)
254-
```
255-
* Added support for multi values in select statement
40+
* [Release Notes](https://github.com/JSQLParser/JSqlParser/releases)
41+
* Modifications before GitHubs release tagging are listed in the [Older Releases](https://github.com/JSQLParser/JSqlParser/wiki/Older-Releases) page.
25642

257-
```sql
258-
SELECT col FROM (VALUES 1,2) AS MY_TABLE(col)
259-
```
260-
* Added extended support for analytic expressions (empty over clause, parameter within aggregat function)
26143

262-
```sql
263-
SELECT sum(a) over () FROM taba
264-
```
26544

266-
## BUILDING
45+
## BUILDING from the sources
26746

26847
As the project is a Maven project, building is rather simple by running:
26948

@@ -295,15 +74,7 @@ And this is the dependency declaration in your pom:
29574
<dependency>
29675
<groupId>com.github.jsqlparser</groupId>
29776
<artifactId>jsqlparser</artifactId>
298-
<version>0.8.6</version>
77+
<version>0.9</version>
29978
</dependency>
30079
```
30180

302-
## Original project
303-
304-
This is a fork of the jsqlparser originally developed by ultimoamore.
305-
306-
Original project websites:
307-
308-
* http://jsqlparser.sourceforge.net
309-
* http://sourceforge.net/projects/jsqlparser/

0 commit comments

Comments
 (0)