Merge lp:~akiban-technologies/akiban-sql-parser/1.0.17-update into lp:~akiban-technologies/akiban-sql-parser/trunk

Proposed by Nathan Williams
Status: Merged
Approved by: Nathan Williams
Approved revision: 307
Merged at revision: 306
Proposed branch: lp:~akiban-technologies/akiban-sql-parser/1.0.17-update
Merge into: lp:~akiban-technologies/akiban-sql-parser/trunk
Diff against target: 180 lines (+106/-35)
2 files modified
README.rst (+105/-34)
pom.xml (+1/-1)
To merge this branch: bzr merge lp:~akiban-technologies/akiban-sql-parser/1.0.17-update
Reviewer Review Type Date Requested Status
Thomas Jones-Low Needs Fixing
Review via email: mp+179731@code.launchpad.net

Description of the change

Bump version to 1.0.17 after release.

To post a comment you must log in.
Revision history for this message
Thomas Jones-Low (tjoneslo) wrote :

There were 2 failures during build/test:

* job sql-parser-build failed at build number 306: http://sneezy.softstart.com:8080/job/sql-parser-build/306/

* view must-pass failed: sql-parser-build is red

review: Needs Fixing

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'README.rst'
--- README.rst 2013-07-30 22:18:45 +0000
+++ README.rst 2013-08-12 15:34:45 +0000
@@ -1,58 +1,129 @@
1************************************
2Akiban SQL Parser1Akiban SQL Parser
3************************************2=================
43
5Overview4Overview
6========5--------
76
8The Akiban SQL Parser is a complete, production-quality Java parser for the SQL7The Akiban SQL Parser is a complete, production-quality Java parser for the SQL
9language. It defines the SQL grammar as implemented by Akiban, but can be used8language. It defines the SQL grammar as implemented by Akiban, but can be used
10independently. It is derived from the Apache Derby parser.9independently. It is derived from the Apache Derby parser.
1110
12Building the Akiban SQL Parser From Source11
13==========================================12Building From Source
1413--------------------
15Use Maven (http://maven.apache.org) to build the Akiban SQL Parser.14
1615`Maven <http://maven.apache.org>`_ is used to build, test, and deploy.
17To build::16
1817Run tests and create jars::
19 mvn install18
2019 mvn package
21The resulting jar files are in the ``target`` directory. To build the Javadoc::20
21The resulting jar files are in the ``target`` directory.
22
23Generate the documentation::
2224
23 mvn javadoc:javadoc25 mvn javadoc:javadoc
2426
25The resulting Javadoc HTML files are in ``target/site/apidocs``.27The resulting Javadoc HTML files are in ``target/site/apidocs``.
2628
27Install Akiban SQL Parser from Binaries29
28=======================================30Using From Maven
31----------------
32
33The Akiban SQL Parser is in the standard Maven Central repository. Any Maven
34project can use it directly by adding the appropriate entries to the
35``dependencies`` section of its ``pom.xml`` file:
36
37.. code-block:: xml
38
39 <dependencies>
40 <dependency>
41 <groupId>com.akiban</groupId>
42 <artifactId>akiban-sql-parser</artifactId>
43 <version>1.0.16</version>
44 </dependency>
45 </dependencies>
46
47
48Installing From Binaries
49------------------------
2950
30Pre-built jars can be downloaded directly from51Pre-built jars can be downloaded directly from
31https://launchpad.net/akiban-sql-parser/+download52https://launchpad.net/akiban-sql-parser/+download. Expand the package into a
3253into a convenient directory using the appropriate utility
33Unpack the distribution kit into a convenient directory using the54(e.g. ``unzip`` or ``tar``).
34appropriate utility (e.g. unzip or tar).
3555
36Review the ``LICENSE.txt`` file located in the root of the installation56Review the ``LICENSE.txt`` file located in the root of the installation
37directory. The Akiban SQL Parser is licensed under the Eclipse Public57directory. The Akiban SQL Parser is licensed under the Apache License,
38License or a free-use community license, see our58Version 2.0. By installing, copying or otherwise using the Software
39`licensing options <http://www.akiban.com/akiban-licensing-options>`_
40for more details. By installing, copying or otherwise using the Software
41contained in the distribution kit, you agree to be bound by the terms of the59contained in the distribution kit, you agree to be bound by the terms of the
42license agreement. If you do not agree to these terms, remove and destroy all60license agreement. If you do not agree to these terms, remove and destroy all
43copies of the software in your possession immediately.61copies of the software in your possession immediately.
4462
63
45Working with the Akiban SQL Parser64Working with the Akiban SQL Parser
46==================================65----------------------------------
4766
48Add the jar file (e.g. ``akiban-sql-parser-1.0.12.jar``), found in the root67The following example demonstrates the simplest usage:
49directory of the distribution kit, to your project's classpath. For example,68
50copy it to ``jre/lib/ext`` in your Java Runtime Environment, or add it to69.. code-block:: java
51your classpath environment variable..70
71 import com.akiban.sql.parser.SQLParser;
72 import com.akiban.sql.parser.StatementNode;
73
74 public class ParserHello {
75 public static void main(String[] args) throws Exception {
76 SQLParser parser = new SQLParser();
77 for(String s : args) {
78 StatementNode stmt = parser.parseStatement(s);
79 stmt.treePrint();
80 }
81 }
82 }
83
84A new `SQLParser <http://akiban.github.io/sql-parser/javadoc/com/akiban/sql/parser/SQLParser.html>`_
85is instantiated and each command line argument is
86`parsed <http://akiban.github.io/sql-parser/javadoc/com/akiban/sql/parser/SQLParser.html#parseStatement%28java.lang.String%29>`_
87and `printed <http://akiban.github.io/sql-parser/javadoc/com/akiban/sql/parser/QueryTreeNode.html#treePrint%28%29>`_
88to standard output. The result is a debug dump of all nodes in the underlying Abstract Syntax Tree.
89More advanced usages will generally parse a statement and then pass a custom
90`Visitor <http://akiban.github.io/sql-parser/javadoc/com/akiban/sql/parser/Visitor.html>`_ to the
91`accept() <http://akiban.github.io/sql-parser/javadoc/com/akiban/sql/parser/QueryTreeNode.html#accept%28com.akiban.sql.parser.Visitor%29>`_ method.
92
93To compile and run the example from the command line, copy the code into a
94file named ``ParserHello.java`` and ensure the parser jar file, found in
95the root directory of the binary package, is in your ``classpath``::
96
97 $ export CLASSPATH="akiban-sql-parser-1.0.16.jar:."
98
99Compile::
100
101 $ javac ParserHello.java
102
103Run (output trimmed for simplicity)::
104
105 $ java ParserHello "SELECT a FROM b"
106 com.akiban.sql.parser.CursorNode@5889dee2
107 statementType: SELECT
108 resultSet:
109 com.akiban.sql.parser.SelectNode@4387f4d7
110 resultColumns:
111 [0]:
112 com.akiban.sql.parser.ResultColumn@5123968
113 name: a
114 expression:
115 com.akiban.sql.parser.ColumnReference@6f76dd71
116 columnName: a
117 fromList:
118 [0]:
119 com.akiban.sql.parser.FromBaseTable@18317b1d
120 tableName: b
121
52122
53More Information123More Information
54================124----------------
55125
56For more information, join the Aiban mailing list on google groups126For more information, join the
57(https://groups.google.com/a/akiban.com/d/forum/akiban-user) or hop on the127`akiban-user <https://groups.google.com/a/akiban.com/d/forum/akiban-user>`_
58#akiban channel on irc.freenode.net128mailing list on Google Groups or hop on the #akiban channel on irc.freenode.net
129
59130
=== modified file 'pom.xml'
--- pom.xml 2013-07-31 18:33:32 +0000
+++ pom.xml 2013-08-12 15:34:45 +0000
@@ -13,7 +13,7 @@
1313
14 <groupId>com.akiban</groupId>14 <groupId>com.akiban</groupId>
15 <artifactId>akiban-sql-parser</artifactId>15 <artifactId>akiban-sql-parser</artifactId>
16 <version>1.0.16-SNAPSHOT</version>16 <version>1.0.17-SNAPSHOT</version>
17 <packaging>jar</packaging>17 <packaging>jar</packaging>
1818
19 <name>Akiban SQL Parser</name>19 <name>Akiban SQL Parser</name>

Subscribers

People subscribed via source and target branches

to all changes: