Azure / azure-cosmos-dotnet-v3

.NET SDK for Azure Cosmos DB for the core SQL API
MIT License
741 stars 494 forks source link

Union Monad #1726

Closed bchong95 closed 3 years ago

bchong95 commented 4 years ago

Add a Union Monad to the code base.

Something like

public readonly struct Union<A,B,C>
{
       public void Match(Action<A> onA, Action<B> onB, Action<C> onC);
}

The first use case is partition key values that can be one of { null, none, string, double, boolean} and we currently use object, which causes boxing and unboxing.

ghost commented 2 years ago

Closing due to in-activity, pease feel free to re-open.