Dzoukr / CosmoStore

F# Event store for Azure Cosmos DB, Table Storage, Postgres, LiteDB & ServiceStack
MIT License
168 stars 21 forks source link

Migrate WindowsAzure.Storage to Azure.Data.Tables #54

Closed ninjarobot closed 2 years ago

ninjarobot commented 2 years ago

@Dzoukr I hope you don't mind, I pulled in some nice code I found from another project of yours for building OData table queries :). I didn't want to use a package dependency since it would cause the FSharp.Core dependency for this to go to 6.0.1.

ninjarobot commented 2 years ago

A few of the queries don't seem to be working now that I'm running them against Azure instead of Azurite. It may be related to the queries that go by version or position. It may be missing some parentheses:

((PartitionKey eq 'TestStream_baab0bbf-4bf3-4d3c-9113-8be119de5425') and RowKey ne 'Stream') and (Version ge '6') or Position ge '6'

and I think it should be

((PartitionKey eq 'TestStream_baab0bbf-4bf3-4d3c-9113-8be119de5425') and RowKey ne 'Stream') and (Version ge '6' or Position ge '6')

[EDIT] nevermind...it wasn't the parentheses.

ninjarobot commented 2 years ago

It wasn't parentheses. Everything passes if I do this minor change in FilterConverter.forLong:

let forLong (value:int64) =
    Convert.ToString(value, formatProvider)
    |> sprintf "%sL"

The change is from sprintf "'%s'" to sprintf "%sL" (formatting as a long instead of a stringified integer).

ninjarobot commented 2 years ago

@Dzoukr I converted this to a draft since it needs this fix for int64 filters.

Dzoukr commented 2 years ago

Fix is released, so I hope I am not blocking you anymore 😄

ninjarobot commented 2 years ago

Fix is released, so I hope I am not blocking you anymore 😄

Thank you @Dzoukr - I updated the version for the reference to pull in the fix and marked this as ready for review again.

ninjarobot commented 2 years ago

@Dzoukr I switched to using the new Tables.FSharp package. Can you please give it a final review?

Dzoukr commented 2 years ago

Thanks for all the work - published as v3.3.0