Skip to content

Commit

Permalink
fix build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
quinchs committed Oct 31, 2023
1 parent 2c28916 commit 4dd10c3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/EdgeDB.Net.Driver/Binary/Protocol/IProtocolProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ internal interface IProtocolProvider

IReadOnlyDictionary<string, object?> ServerConfig { get; }

int? SuggestedPoolConcurrency { get; }

public static IProtocolProvider GetDefaultProvider(EdgeDBBinaryClient client)
=> (_defaultProvider ??= Providers[ProtocolVersion.EdgeDBBinaryDefaultVersion].Factory)(client);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public V1ProtocolProvider(EdgeDBBinaryClient client)
_client = client;
}

public int SuggestedPoolConcurrency { get; private set; }
public int? SuggestedPoolConcurrency { get; private set; }

public ref ReadOnlyMemory<byte> ServerKey
=> ref _serverKey;
Expand Down
5 changes: 4 additions & 1 deletion src/EdgeDB.Net.Driver/Clients/EdgeDBBinaryClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using System.Collections.Immutable;
using System.Diagnostics;
using System.Reflection;
using ProtocolExecuteResult = EdgeDB.Binary.Protocol.ExecuteResult;

Expand Down Expand Up @@ -34,7 +35,9 @@ internal abstract class EdgeDBBinaryClient : BaseEdgeDBClient
private Guid _stateDescriptorId;

internal byte[] ServerKey;
internal int? SuggestedPoolConcurrency;

internal int? SuggestedPoolConcurrency
=> _protocolProvider.SuggestedPoolConcurrency;

/// <summary>
/// Creates a new binary client with the provided conection and config.
Expand Down
6 changes: 6 additions & 0 deletions src/EdgeDB.Net.Driver/Models/DataTypes/MultiRange.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ internal MultiRange(Range<T>[] ranges)
_ranges = ranges;
}

/// <summary>
/// Returns a hashset that represents this multirange.
/// </summary>
/// <returns>A hashset, derived from the contents of this multirange.</returns>
public HashSet<Range<T>> ToSet() => new(_ranges);

#region Enumerator
private sealed class MultiRangeEnumerator : IEnumerator<Range<T>>
{
Expand Down

0 comments on commit 4dd10c3

Please sign in to comment.