Skip to content

Commit 194e3c0

Browse files
author
Stefan Plantikow
committed
Merge pull request #84 from boggle/driver-v1
Driver versioning and renaming
2 parents a0fdd32 + 1a54da0 commit 194e3c0

File tree

187 files changed

+824
-845
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

187 files changed

+824
-845
lines changed

driver/src/main/java/org/neo4j/driver/Config.java renamed to driver/src/main/java/org/neo4j/driver/v1/Config.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616
* See the License for the specific language governing permissions and
1717
* limitations under the License.
1818
*/
19-
package org.neo4j.driver;
19+
package org.neo4j.driver.v1;
2020

2121
import java.io.File;
2222
import java.util.logging.Level;
2323

24-
import org.neo4j.driver.internal.logging.JULogging;
25-
import org.neo4j.driver.internal.spi.Logging;
24+
import org.neo4j.driver.v1.internal.logging.JULogging;
25+
import org.neo4j.driver.v1.internal.spi.Logging;
2626

27-
import static org.neo4j.driver.Config.TlsAuthenticationConfig.*;
27+
import static org.neo4j.driver.v1.Config.TlsAuthenticationConfig.*;
2828

2929
/**
3030
* A configuration class to config driver properties.

driver/src/main/java/org/neo4j/driver/Directed.java renamed to driver/src/main/java/org/neo4j/driver/v1/Directed.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* See the License for the specific language governing permissions and
1717
* limitations under the License.
1818
*/
19-
package org.neo4j.driver;
19+
package org.neo4j.driver.v1;
2020

2121
/**
2222
* An item that can be considered to have <em>direction</em>.

driver/src/main/java/org/neo4j/driver/Driver.java renamed to driver/src/main/java/org/neo4j/driver/v1/Driver.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
* See the License for the specific language governing permissions and
1717
* limitations under the License.
1818
*/
19-
package org.neo4j.driver;
19+
package org.neo4j.driver.v1;
2020

2121
import java.net.URI;
2222

23-
import org.neo4j.driver.internal.StandardSession;
24-
import org.neo4j.driver.internal.pool.StandardConnectionPool;
25-
import org.neo4j.driver.internal.spi.ConnectionPool;
23+
import org.neo4j.driver.v1.internal.StandardSession;
24+
import org.neo4j.driver.v1.internal.pool.StandardConnectionPool;
25+
import org.neo4j.driver.v1.internal.spi.ConnectionPool;
2626

2727
/**
2828
* A Neo4j database driver, through which you can create {@link Session sessions} to run statements against the database.
@@ -40,7 +40,7 @@
4040
* session.run( "CREATE (n {name:'Bob'})" );
4141
*
4242
* // Or, run multiple statements together in an atomic transaction:
43-
* try( Transaction tx = session.newTransaction() )
43+
* try( Transaction tx = session.beginTransaction() )
4444
* {
4545
* tx.run( "CREATE (n {name:'Alice'})" );
4646
* tx.run( "CREATE (n {name:'Tina'})" );
@@ -84,7 +84,7 @@ public Driver( URI url, Config config )
8484
/**
8585
* Establish a session
8686
* @return a session that could be used to run {@link Session#run(String) a statement} or
87-
* {@link Session#newTransaction() a transaction }.
87+
* {@link Session#beginTransaction() a transaction }.
8888
*/
8989
public Session session()
9090
{

driver/src/main/java/org/neo4j/driver/Entity.java renamed to driver/src/main/java/org/neo4j/driver/v1/Entity.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616
* See the License for the specific language governing permissions and
1717
* limitations under the License.
1818
*/
19-
package org.neo4j.driver;
19+
package org.neo4j.driver.v1;
2020

2121
/**
2222
* A uniquely identifiable property container that can form part of a Neo4j graph.
2323
*/
2424
public interface Entity
2525
{
2626
/**
27-
* A unique {@link org.neo4j.driver.Identity identity} for this Entity. Identities are guaranteed
27+
* A unique {@link Identity identity} for this Entity. Identities are guaranteed
2828
* to remain stable for the duration of the session they were found in, but may be re-used for other
2929
* entities after that. As such, if you want a public identity to use for your entities, attaching
3030
* an explicit 'id' property or similar persistent and unique identifier is a better choice.
@@ -48,7 +48,7 @@ public interface Entity
4848
int propertyCount();
4949

5050
/**
51-
* Return a specific property {@link org.neo4j.driver.Value}. If no value could be found with the specified key,
51+
* Return a specific property {@link Value}. If no value could be found with the specified key,
5252
* null will be returned.
5353
*
5454
* @param key a property key

driver/src/main/java/org/neo4j/driver/Function.java renamed to driver/src/main/java/org/neo4j/driver/v1/Function.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* See the License for the specific language governing permissions and
1717
* limitations under the License.
1818
*/
19-
package org.neo4j.driver;
19+
package org.neo4j.driver.v1;
2020

2121
/**
2222
* Same as {@link java.util.function.Function}, but defined here to work in versions older than java 8.

driver/src/main/java/org/neo4j/driver/GraphDatabase.java renamed to driver/src/main/java/org/neo4j/driver/v1/GraphDatabase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* See the License for the specific language governing permissions and
1717
* limitations under the License.
1818
*/
19-
package org.neo4j.driver;
19+
package org.neo4j.driver.v1;
2020

2121
import java.net.URI;
2222

driver/src/main/java/org/neo4j/driver/Identity.java renamed to driver/src/main/java/org/neo4j/driver/v1/Identity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
* See the License for the specific language governing permissions and
1717
* limitations under the License.
1818
*/
19-
package org.neo4j.driver;
19+
package org.neo4j.driver.v1;
2020

2121
/**
22-
* A unique identifier for an {@link org.neo4j.driver.Entity}.
22+
* A unique identifier for an {@link Entity}.
2323
* <p>
2424
* The identity can be used to correlate entities in one response with entities received earlier. The identity of an
2525
* entity is guaranteed to be stable within the scope of a session. Beyond that, the identity may change. If you want

driver/src/main/java/org/neo4j/driver/InputPosition.java renamed to driver/src/main/java/org/neo4j/driver/v1/InputPosition.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* See the License for the specific language governing permissions and
1717
* limitations under the License.
1818
*/
19-
package org.neo4j.driver;
19+
package org.neo4j.driver.v1;
2020

2121
/**
2222
* An input position refers to a specific character in a statement.

driver/src/main/java/org/neo4j/driver/Node.java renamed to driver/src/main/java/org/neo4j/driver/v1/Node.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* See the License for the specific language governing permissions and
1717
* limitations under the License.
1818
*/
19-
package org.neo4j.driver;
19+
package org.neo4j.driver.v1;
2020

2121
/**
2222
* The <strong>Node</strong> interface describes the characteristics of a node from a Neo4j graph.
@@ -29,5 +29,4 @@ public interface Node extends Entity
2929
* @return a label Collection
3030
*/
3131
Iterable<String> labels();
32-
3332
}

driver/src/main/java/org/neo4j/driver/Notification.java renamed to driver/src/main/java/org/neo4j/driver/v1/Notification.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* See the License for the specific language governing permissions and
1717
* limitations under the License.
1818
*/
19-
package org.neo4j.driver;
19+
package org.neo4j.driver.v1;
2020

2121
/**
2222
* Representation for notifications found when executing a statement.

driver/src/main/java/org/neo4j/driver/Path.java renamed to driver/src/main/java/org/neo4j/driver/v1/Path.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* See the License for the specific language governing permissions and
1717
* limitations under the License.
1818
*/
19-
package org.neo4j.driver;
19+
package org.neo4j.driver.v1;
2020

2121
/**
2222
* A <strong>Path</strong> is a directed sequence of relationships between two nodes. This generally

driver/src/main/java/org/neo4j/driver/Plan.java renamed to driver/src/main/java/org/neo4j/driver/v1/Plan.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* See the License for the specific language governing permissions and
1717
* limitations under the License.
1818
*/
19-
package org.neo4j.driver;
19+
package org.neo4j.driver.v1;
2020

2121
import java.util.List;
2222
import java.util.Map;

driver/src/main/java/org/neo4j/driver/ProfiledPlan.java renamed to driver/src/main/java/org/neo4j/driver/v1/ProfiledPlan.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* See the License for the specific language governing permissions and
1717
* limitations under the License.
1818
*/
19-
package org.neo4j.driver;
19+
package org.neo4j.driver.v1;
2020

2121
import java.util.List;
2222

driver/src/main/java/org/neo4j/driver/Record.java renamed to driver/src/main/java/org/neo4j/driver/v1/Record.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
* See the License for the specific language governing permissions and
1717
* limitations under the License.
1818
*/
19-
package org.neo4j.driver;
19+
package org.neo4j.driver.v1;
2020

2121
/**
2222
* A record is a collection of named fields, and is what makes up the individual items in a {@link
23-
* org.neo4j.driver.Result}
23+
* Result}
2424
*/
2525
public interface Record
2626
{

driver/src/main/java/org/neo4j/driver/Relationship.java renamed to driver/src/main/java/org/neo4j/driver/v1/Relationship.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* See the License for the specific language governing permissions and
1717
* limitations under the License.
1818
*/
19-
package org.neo4j.driver;
19+
package org.neo4j.driver.v1;
2020

2121
/**
2222
* The <strong>Relationship</strong> interface describes the characteristics of a relationship from a Neo4j graph.

driver/src/main/java/org/neo4j/driver/Result.java renamed to driver/src/main/java/org/neo4j/driver/v1/Result.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
* See the License for the specific language governing permissions and
1717
* limitations under the License.
1818
*/
19-
package org.neo4j.driver;
19+
package org.neo4j.driver.v1;
20+
21+
import org.neo4j.driver.v1.exceptions.ClientException;
2022

2123
/**
2224
* The result of running a statement, a stream of records. The result interface can be used to iterate over all the
@@ -36,7 +38,7 @@ public interface Result
3638
*
3739
* This cannot be used if you have already started iterating through the stream using {@link #next()}.
3840
*
39-
* @return {@link org.neo4j.driver.ReusableResult}
41+
* @return {@link ReusableResult}
4042
*/
4143
ReusableResult retain();
4244

@@ -83,7 +85,7 @@ public interface Result
8385
* </pre>
8486
*
8587
* @return a single record from the stream
86-
* @throws org.neo4j.driver.exceptions.ClientException if the stream is empty
88+
* @throws ClientException if the stream is empty
8789
*/
8890
Record single();
8991

driver/src/main/java/org/neo4j/driver/ResultSummary.java renamed to driver/src/main/java/org/neo4j/driver/v1/ResultSummary.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* See the License for the specific language governing permissions and
1717
* limitations under the License.
1818
*/
19-
package org.neo4j.driver;
19+
package org.neo4j.driver.v1;
2020

2121
import java.util.List;
2222

driver/src/main/java/org/neo4j/driver/ReusableResult.java renamed to driver/src/main/java/org/neo4j/driver/v1/ReusableResult.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* See the License for the specific language governing permissions and
1717
* limitations under the License.
1818
*/
19-
package org.neo4j.driver;
19+
package org.neo4j.driver.v1;
2020

2121
/**
2222
* A {@link Result} that has been fully retrieved and stored from the server.

driver/src/main/java/org/neo4j/driver/Session.java renamed to driver/src/main/java/org/neo4j/driver/v1/Session.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* See the License for the specific language governing permissions and
1717
* limitations under the License.
1818
*/
19-
package org.neo4j.driver;
19+
package org.neo4j.driver.v1;
2020

2121
/**
2222
* A live session with a Neo4j instance.
@@ -45,8 +45,8 @@ public interface Session extends AutoCloseable, StatementRunner
4545
*
4646
* @return a new transaction
4747
*/
48-
Transaction newTransaction();
48+
Transaction beginTransaction();
4949

5050
@Override
5151
void close();
52-
}
52+
}

driver/src/main/java/org/neo4j/driver/Statement.java renamed to driver/src/main/java/org/neo4j/driver/v1/Statement.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,24 @@
1616
* See the License for the specific language governing permissions and
1717
* limitations under the License.
1818
*/
19-
package org.neo4j.driver;
19+
package org.neo4j.driver.v1;
2020

2121
import java.util.Collections;
2222
import java.util.HashMap;
2323
import java.util.Map;
2424

25-
import org.neo4j.driver.internal.ParameterSupport;
25+
import org.neo4j.driver.v1.internal.ParameterSupport;
2626

2727
import static java.lang.String.format;
2828

2929
/**
3030
* An executable statement, i.e. the statements' text and its parameters.
3131
*
32-
* @see org.neo4j.driver.Session
33-
* @see org.neo4j.driver.Transaction
34-
* @see org.neo4j.driver.Result
35-
* @see org.neo4j.driver.Result#summarize()
36-
* @see org.neo4j.driver.ResultSummary
32+
* @see Session
33+
* @see Transaction
34+
* @see Result
35+
* @see Result#summarize()
36+
* @see ResultSummary
3737
*/
3838
public class Statement
3939
{

driver/src/main/java/org/neo4j/driver/StatementRunner.java renamed to driver/src/main/java/org/neo4j/driver/v1/StatementRunner.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616
* See the License for the specific language governing permissions and
1717
* limitations under the License.
1818
*/
19-
package org.neo4j.driver;
19+
package org.neo4j.driver.v1;
2020

2121
import java.util.Map;
2222

2323
/**
2424
* Common interface for components that can execute Neo4j statements.
2525
*
26-
* @see org.neo4j.driver.Session
27-
* @see org.neo4j.driver.Transaction
26+
* @see Session
27+
* @see Transaction
2828
*/
2929
public interface StatementRunner
3030
{

driver/src/main/java/org/neo4j/driver/StatementType.java renamed to driver/src/main/java/org/neo4j/driver/v1/StatementType.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
* See the License for the specific language governing permissions and
1717
* limitations under the License.
1818
*/
19-
package org.neo4j.driver;
19+
package org.neo4j.driver.v1;
2020

21-
import org.neo4j.driver.exceptions.ClientException;
21+
import org.neo4j.driver.v1.exceptions.ClientException;
2222

2323
public enum StatementType
2424
{

driver/src/main/java/org/neo4j/driver/Transaction.java renamed to driver/src/main/java/org/neo4j/driver/v1/Transaction.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* See the License for the specific language governing permissions and
1717
* limitations under the License.
1818
*/
19-
package org.neo4j.driver;
19+
package org.neo4j.driver.v1;
2020

2121
/**
2222
* Represents a transaction in the Neo4j database.
@@ -29,7 +29,7 @@
2929
*
3030
* <pre class="docTest:TransactionDocIT#classDoc">
3131
* {@code
32-
* try( Transaction tx = session.newTransaction() )
32+
* try( Transaction tx = session.beginTransaction() )
3333
* {
3434
* tx.run( "CREATE (n)" );
3535
* tx.success();
@@ -56,7 +56,7 @@ public interface Transaction extends AutoCloseable, StatementRunner
5656
*
5757
* <pre class="docTest:TransactionDocIT#failure">
5858
* {@code
59-
* try(Transaction tx = session.newTransaction() )
59+
* try(Transaction tx = session.beginTransaction() )
6060
* {
6161
* tx.run( "CREATE (n)" );
6262
* tx.failure();

driver/src/main/java/org/neo4j/driver/UpdateStatistics.java renamed to driver/src/main/java/org/neo4j/driver/v1/UpdateStatistics.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* See the License for the specific language governing permissions and
1717
* limitations under the License.
1818
*/
19-
package org.neo4j.driver;
19+
package org.neo4j.driver.v1;
2020

2121
/**
2222
* Contains counters for the number of update operations performed by a statement.

driver/src/main/java/org/neo4j/driver/Value.java renamed to driver/src/main/java/org/neo4j/driver/v1/Value.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* See the License for the specific language governing permissions and
1717
* limitations under the License.
1818
*/
19-
package org.neo4j.driver;
19+
package org.neo4j.driver.v1;
2020

2121
import java.util.List;
2222
import java.util.Map;
@@ -34,7 +34,7 @@
3434
* <h2>Navigating a tree structure</h2>
3535
*
3636
* Because Neo4j often handles dynamic structures, this interface is designed to help
37-
* you handle such structures in Java. Specifically, {@link org.neo4j.driver.Value} lets you navigate arbitrary tree
37+
* you handle such structures in Java. Specifically, {@link Value} lets you navigate arbitrary tree
3838
* structures without having to resort to type casting.
3939
*
4040
* Given a tree structure like:

0 commit comments

Comments
 (0)