Skip to content

Commit

Permalink
Rename experimental to preview (#694)
Browse files Browse the repository at this point in the history
* Rename folder

* Adjust namespaces

* Rename in comments etc

* More replacements
  • Loading branch information
RichardIrons-neo4j authored Mar 31, 2023
1 parent df22aeb commit 2de28b4
Show file tree
Hide file tree
Showing 21 changed files with 231 additions and 231 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using Neo4j.Driver.Experimental;
using Neo4j.Driver.Preview;
using Newtonsoft.Json;

namespace Neo4j.Driver.Tests.TestBackend;
Expand Down Expand Up @@ -62,7 +62,7 @@ async Task NotifyBookmarks(string[] bookmarks, CancellationToken _)
}

BookmarkManager =
Experimental.GraphDatabase.BookmarkManagerFactory.NewBookmarkManager(
Preview.GraphDatabase.BookmarkManagerFactory.NewBookmarkManager(
new BookmarkManagerConfig(initialBookmarks, BookmarkSupplier, NotifyBookmarks));

return Task.CompletedTask;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Neo4j.Driver.Experimental;
using Neo4j.Driver.Preview;
using Newtonsoft.Json;

namespace Neo4j.Driver.Tests.TestBackend;
Expand Down
2 changes: 1 addition & 1 deletion Neo4j.Driver/Neo4j.Driver.Tests/AsyncSessionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
using System.Threading.Tasks;
using FluentAssertions;
using Moq;
using Neo4j.Driver.Experimental;
using Neo4j.Driver.Internal;
using Neo4j.Driver.Internal.Connector;
using Neo4j.Driver.Internal.MessageHandling;
using Neo4j.Driver.Internal.Messaging;
using Neo4j.Driver.Internal.Routing;
using Neo4j.Driver.Preview;
using Xunit;

namespace Neo4j.Driver.Tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
using System;
using System.Threading.Tasks;
using FluentAssertions;
using Neo4j.Driver.Experimental;
using Neo4j.Driver.Preview;
using Xunit;

namespace Neo4j.Driver.Internal.BookmarkManager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
using System.Threading.Tasks;
using FluentAssertions;
using Moq;
using Neo4j.Driver.Experimental;
using Neo4j.Driver.Preview;
using Xunit;

namespace Neo4j.Driver.Internal.BookmarkManager
Expand Down
2 changes: 1 addition & 1 deletion Neo4j.Driver/Neo4j.Driver/Internal/AsyncSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Neo4j.Driver.Experimental;
using Neo4j.Driver.Internal.Connector;
using Neo4j.Driver.Preview;
using static Neo4j.Driver.Internal.Logging.DriverLoggerUtil;
using static Neo4j.Driver.Internal.Util.ConfigBuilders;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using Neo4j.Driver.Experimental;
using Neo4j.Driver.Preview;

namespace Neo4j.Driver.Internal;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Neo4j.Driver.Experimental;
using Neo4j.Driver.Preview;

namespace Neo4j.Driver.Internal;

Expand Down
2 changes: 1 addition & 1 deletion Neo4j.Driver/Neo4j.Driver/Internal/Driver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Neo4j.Driver.Experimental;
using Neo4j.Driver.Internal.Metrics;
using Neo4j.Driver.Internal.Routing;
using Neo4j.Driver.Internal.Util;
using Neo4j.Driver.Preview;

namespace Neo4j.Driver.Internal;

Expand Down
2 changes: 1 addition & 1 deletion Neo4j.Driver/Neo4j.Driver/Internal/IInternalDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Neo4j.Driver.Experimental;
using Neo4j.Driver.Preview;

namespace Neo4j.Driver.Internal;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,72 +1,72 @@
// Copyright (c) "Neo4j"
// Neo4j Sweden AB [http://neo4j.com]
//
// This file is part of Neo4j.
//
// 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.

#nullable enable
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;

namespace Neo4j.Driver.Experimental;

/// <summary>
/// The <see cref="BookmarkManagerConfig"/> record encapsulates configuration values for initializing a new
/// default <see cref="IBookmarkManager"/> implementation. The <see cref="BookmarkManagerConfig"/> instance should be
/// passed to an <see cref="IBookmarkManagerFactory.NewBookmarkManager"/> factory method to construct a new
/// <see cref="IBookmarkManager"/> instance.
/// </summary>
/// <remarks>
/// The default <see cref="IBookmarkManagerFactory"/> can be accessed from
/// <see cref="Experimental.GraphDatabase.BookmarkManagerFactory"/>.
/// </remarks>
public record BookmarkManagerConfig
{
/// <summary>
/// Initializes a new instance of the <see cref="BookmarkManagerConfig"/> record using the optional bookmark
/// collection and delegate parameters.
/// </summary>
/// <param name="initialBookmarks">The initial bookmarks to populate a new <see cref="IBookmarkManager"/> with.</param>
/// <param name="bookmarkSupplierAsync">
/// A function for supplying the <see cref="IBookmarkManager"/> instance with bookmarks
/// from user code.<br/> The function is invoked when updating routing tables, beginning transactions, and running queries
/// in sessions configured with the <see cref="IBookmarkManager"/> instance.
/// </param>
/// <param name="notifyBookmarksAsync">
/// A function for the <see cref="IBookmarkManager"/> instance to notify user code of
/// new bookmarks received by sessions configured with the <see cref="IBookmarkManager"/>.<br/> The function is invoked
/// when a transaction completes or session query completes in sessions configured with the <see cref="IBookmarkManager"/>
/// instance.
/// </param>
public BookmarkManagerConfig(
IEnumerable<string>? initialBookmarks = null,
Func<CancellationToken, Task<string[]>>? bookmarkSupplierAsync = null,
Func<string[], CancellationToken, Task>? notifyBookmarksAsync = null)
{
InitialBookmarks = initialBookmarks;
BookmarkSupplierAsync = bookmarkSupplierAsync;
NotifyBookmarksAsync = notifyBookmarksAsync;
}

/// <summary>Gets the collection of initial bookmarks to provide the <see cref="IBookmarkManager"/>.</summary>
public IEnumerable<string>? InitialBookmarks { get; }

/// <summary>Gets the function for supplying the <see cref="IBookmarkManager"/> with bookmarks from user code.</summary>
public Func<CancellationToken, Task<string[]>>? BookmarkSupplierAsync { get; }

/// <summary>Gets the function to notify user code of new bookmarks received by the <see cref="IBookmarkManager"/>.</summary>
public Func<string[], CancellationToken, Task>? NotifyBookmarksAsync { get; }
}
// Copyright (c) "Neo4j"
// Neo4j Sweden AB [http://neo4j.com]
//
// This file is part of Neo4j.
//
// 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.

#nullable enable
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;

namespace Neo4j.Driver.Preview;

/// <summary>
/// The <see cref="BookmarkManagerConfig"/> record encapsulates configuration values for initializing a new
/// default <see cref="IBookmarkManager"/> implementation. The <see cref="BookmarkManagerConfig"/> instance should be
/// passed to an <see cref="IBookmarkManagerFactory.NewBookmarkManager"/> factory method to construct a new
/// <see cref="IBookmarkManager"/> instance.
/// </summary>
/// <remarks>
/// The default <see cref="IBookmarkManagerFactory"/> can be accessed from
/// <see cref="GraphDatabase.BookmarkManagerFactory"/>.
/// </remarks>
public record BookmarkManagerConfig
{
/// <summary>
/// Initializes a new instance of the <see cref="BookmarkManagerConfig"/> record using the optional bookmark
/// collection and delegate parameters.
/// </summary>
/// <param name="initialBookmarks">The initial bookmarks to populate a new <see cref="IBookmarkManager"/> with.</param>
/// <param name="bookmarkSupplierAsync">
/// A function for supplying the <see cref="IBookmarkManager"/> instance with bookmarks
/// from user code.<br/> The function is invoked when updating routing tables, beginning transactions, and running queries
/// in sessions configured with the <see cref="IBookmarkManager"/> instance.
/// </param>
/// <param name="notifyBookmarksAsync">
/// A function for the <see cref="IBookmarkManager"/> instance to notify user code of
/// new bookmarks received by sessions configured with the <see cref="IBookmarkManager"/>.<br/> The function is invoked
/// when a transaction completes or session query completes in sessions configured with the <see cref="IBookmarkManager"/>
/// instance.
/// </param>
public BookmarkManagerConfig(
IEnumerable<string>? initialBookmarks = null,
Func<CancellationToken, Task<string[]>>? bookmarkSupplierAsync = null,
Func<string[], CancellationToken, Task>? notifyBookmarksAsync = null)
{
InitialBookmarks = initialBookmarks;
BookmarkSupplierAsync = bookmarkSupplierAsync;
NotifyBookmarksAsync = notifyBookmarksAsync;
}

/// <summary>Gets the collection of initial bookmarks to provide the <see cref="IBookmarkManager"/>.</summary>
public IEnumerable<string>? InitialBookmarks { get; }

/// <summary>Gets the function for supplying the <see cref="IBookmarkManager"/> with bookmarks from user code.</summary>
public Func<CancellationToken, Task<string[]>>? BookmarkSupplierAsync { get; }

/// <summary>Gets the function to notify user code of new bookmarks received by the <see cref="IBookmarkManager"/>.</summary>
public Func<string[], CancellationToken, Task>? NotifyBookmarksAsync { get; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

namespace Neo4j.Driver.Experimental;
namespace Neo4j.Driver.Preview;

/// <summary>
/// There is no guarantee that anything in Neo4j.Driver.Experimental namespace will be in a next minor version.
/// There is no guarantee that anything in Neo4j.Driver.Preview namespace will be in a next minor version.
/// Complete result from a cypher query.
/// </summary>
public sealed class EagerResult<T>
Expand All @@ -31,19 +31,19 @@ internal EagerResult(T result, IResultSummary summary, string[] keys)
}

/// <summary>
/// There is no guarantee that anything in Neo4j.Driver.Experimental namespace will be in a next minor version.
/// There is no guarantee that anything in Neo4j.Driver.Preview namespace will be in a next minor version.
/// Least common set of fields in <see cref="Result"/>.
/// </summary>
public string[] Keys { get; init; }

/// <summary>
/// There is no guarantee that anything in Neo4j.Driver.Experimental namespace will be in a next minor version.
/// There is no guarantee that anything in Neo4j.Driver.Preview namespace will be in a next minor version.
/// All Records from query.
/// </summary>
public T Result { get; init; }

/// <summary>
/// There is no guarantee that anything in Neo4j.Driver.Experimental namespace will be in a next minor version.
/// There is no guarantee that anything in Neo4j.Driver.Preview namespace will be in a next minor version.
/// Query summary.
/// </summary>
public IResultSummary Summary { get; init; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
using System.Threading.Tasks;
using Neo4j.Driver.Internal;

namespace Neo4j.Driver.Experimental.FluentQueries;
namespace Neo4j.Driver.Preview.FluentQueries;

internal class ExecutableQuery<T> : IExecutableQuery<T>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,29 @@
using System.Threading;
using System.Threading.Tasks;

namespace Neo4j.Driver.Experimental.FluentQueries;
namespace Neo4j.Driver.Preview.FluentQueries;

/// <summary>There is no guarantee that anything in Neo4j.Driver.Experimental namespace will be in a next minor version.</summary>
/// <summary>There is no guarantee that anything in Neo4j.Driver.Preview namespace will be in a next minor version.</summary>
public interface IExecutableQuery<T>
{
/// <summary>
/// There is no guarantee that anything in Neo4j.Driver.Experimental namespace will be in a next minor version.
/// There is no guarantee that anything in Neo4j.Driver.Preview namespace will be in a next minor version.
/// Adds the specified config to the executable query.
/// </summary>
/// <param name="config">The query config to use.</param>
/// <returns>The executable query object allowing method chaining.</returns>
IExecutableQuery<T> WithConfig(QueryConfig config);

/// <summary>
/// There is no guarantee that anything in Neo4j.Driver.Experimental namespace will be in a next minor version.
/// There is no guarantee that anything in Neo4j.Driver.Preview namespace will be in a next minor version.
/// Sets the named parameters on the query.
/// </summary>
/// <param name="parameters">The query parameters, specified as an object which is then converted into key-value pairs.</param>
/// <returns>The executable query object allowing method chaining.</returns>
IExecutableQuery<T> WithParameters(object parameters);

/// <summary>
/// There is no guarantee that anything in Neo4j.Driver.Experimental namespace will be in a next minor version.
/// There is no guarantee that anything in Neo4j.Driver.Preview namespace will be in a next minor version.
/// Sets the named parameters on the query.
/// </summary>
/// <param name="parameters">
Expand All @@ -53,7 +53,7 @@ public interface IExecutableQuery<T>
IExecutableQuery<T> WithParameters(Dictionary<string, object> parameters);

/// <summary>
/// There is no guarantee that anything in Neo4j.Driver.Experimental namespace will be in a next minor version.
/// There is no guarantee that anything in Neo4j.Driver.Preview namespace will be in a next minor version.
/// Adds a stream processor function that will be called, passing the <see cref="IAsyncEnumerable{IRecord}"/> of records
/// returned from the query. The value returned from this callback property will be present in the
/// <see cref="EagerResult{T}.Result"/> property of the result returned from executing the query.
Expand Down
Loading

0 comments on commit 2de28b4

Please sign in to comment.