Skip to content

Commit e0de595

Browse files
committed
Fix names, samples, deps
1 parent 449fe1d commit e0de595

4 files changed

Lines changed: 8 additions & 10 deletions

File tree

DOCUMENTATION.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1809,13 +1809,12 @@ following key benefits:
18091809
```fsharp
18101810
18111811
open Equinox.CosmosStore.Core
1812-
// open MyCodecs.Json // example of using specific codec which can yield UTF-8
1813-
// byte arrays from a type using `Json.toBytes` via Fleece
1814-
// or similar
1812+
// open MyCodecs.Json // example of using specific codecs that can yield JsonElements
1813+
// from a type using `Json.toBytes` using FsCodec or similar
18151814
18161815
type EventData with
18171816
static member FromT eventType value =
1818-
EventData.FromUtf8Bytes(eventType, Json.toBytes value)
1817+
EventData.FromJsonElement(eventType, Request.toJsonElement value)
18191818
18201819
// Load connection sring from your Key Vault (example here is the CosmosDB
18211820
// simulator's well known key)
@@ -1849,8 +1848,8 @@ let ctx = EventsContext(storeClient, gatewayLog)
18491848
//
18501849
18511850
let expectedSequenceNumber = 0 // new stream
1852-
let streamName, eventType, eventJson = "stream-1", "myEvent", Request.ToJson event
1853-
let eventData = EventData.fromT(eventType, eventJson) |> Array.singleton
1851+
let streamName, eventType, eventJson = "stream-1", "myEvent", Request.ToJsonElement event
1852+
let eventData = EventData.FromJsonElement(eventType, eventJson) |> Array.singleton
18541853
18551854
let! res =
18561855
Events.append

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ The components within this repository are delivered as multi-targeted Nuget pack
136136
- `Equinox.Core` [![NuGet](https://img.shields.io/nuget/v/Equinox.Core.svg)](https://www.nuget.org/packages/Equinox.Core/): Interfaces and helpers used in the concrete Store implementations, together with the default [`System.Runtime.Caching.Cache`-based] `Cache` implementation. Hosts generic utility types frequently useful alongside Equinox: [`AsyncCacheCell`](https://github.com/jet/equinox/blob/master/src/Equinox.Core/AsyncCacheCell.fs#L36), [`AsyncBatchingGate`](https://github.com/jet/equinox/blob/master/src/Equinox.Core/AsyncBatchingGate.fs#L41). ([depends](https://www.fuget.org/packages/Equinox.Core) on `Equinox`, `System.Runtime.Caching`)
137137
- `Equinox.MemoryStore` [![MemoryStore NuGet](https://img.shields.io/nuget/v/Equinox.MemoryStore.svg)](https://www.nuget.org/packages/Equinox.MemoryStore/): In-memory store for integration testing/performance base-lining/providing out-of-the-box zero dependency storage for examples. ([depends](https://www.fuget.org/packages/Equinox.MemoryStore) on `Equinox.Core`, `FsCodec`)
138138
- `Equinox.EventStore` [![EventStore NuGet](https://img.shields.io/nuget/v/Equinox.EventStore.svg)](https://www.nuget.org/packages/Equinox.EventStore/): [EventStoreDB](https://eventstore.org/) Adapter designed to meet Jet's production monitoring requirements. ([depends](https://www.fuget.org/packages/Equinox.EventStore) on `Equinox.Core`, `EventStore.Client >= 20.6`, `FSharp.Control.AsyncSeq >= 2.0.23`)
139-
- `Equinox.CosmosStore` [![CosmosStore NuGet](https://img.shields.io/nuget/v/Equinox.CosmosStore.svg)](https://www.nuget.org/packages/Equinox.CosmosStore/): Azure CosmosDB Adapter with integrated 'unfolds' feature, facilitating optimal read performance in terms of latency and RU costs, instrumented to meet Jet's production monitoring requirements. ([depends](https://www.fuget.org/packages/Equinox.CosmosStore) on `Equinox.Core`, `Microsoft.Azure.Cosmos >= 3.17`, `FsCodec.NewtonsoftJson`, `FSharp.Control.AsyncSeq >= 2.0.23`)
139+
- `Equinox.CosmosStore` [![CosmosStore NuGet](https://img.shields.io/nuget/v/Equinox.CosmosStore.svg)](https://www.nuget.org/packages/Equinox.CosmosStore/): Azure CosmosDB Adapter with integrated 'unfolds' feature, facilitating optimal read performance in terms of latency and RU costs, instrumented to meet Jet's production monitoring requirements. ([depends](https://www.fuget.org/packages/Equinox.CosmosStore) on `Equinox.Core`, `Microsoft.Azure.Cosmos >= 3.17`, `FsCodec >= 2.3.0`, `System.Text.Json >= 6.0.1`, `FSharp.Control.AsyncSeq >= 2.0.23`)
140140
- `Equinox.CosmosStore.Prometheus` [![CosmosStore.Prometheus NuGet](https://img.shields.io/nuget/v/Equinox.CosmosStore.Prometheus.svg)](https://www.nuget.org/packages/Equinox.CosmosStore.Prometheus/): Integration package providing a `Serilog.Core.ILogEventSink` that extracts detailed metrics information attached to the `LogEvent`s and feeds them to the `prometheus-net`'s `Prometheus.Metrics` static instance. ([depends](https://www.fuget.org/packages/Equinox.CosmosStore.Prometheus) on `Equinox.CosmosStore`, `prometheus-net >= 3.6.0`)
141141
- `Equinox.SqlStreamStore` [![SqlStreamStore NuGet](https://img.shields.io/nuget/v/Equinox.SqlStreamStore.svg)](https://www.nuget.org/packages/Equinox.SqlStreamStore/): [SqlStreamStore](https://github.com/SQLStreamStore/SQLStreamStore) Adapter derived from `Equinox.EventStore` - provides core facilities (but does not connect to a specific database; see sibling `SqlStreamStore`.* packages). ([depends](https://www.fuget.org/packages/Equinox.SqlStreamStore) on `Equinox.Core`, `FsCodec`, `SqlStreamStore >= 1.2.0-beta.8`, `FSharp.Control.AsyncSeq`)
142142
- `Equinox.SqlStreamStore.MsSql` [![MsSql NuGet](https://img.shields.io/nuget/v/Equinox.SqlStreamStore.MsSql.svg)](https://www.nuget.org/packages/Equinox.SqlStreamStore.MsSql/): [SqlStreamStore.MsSql](https://sqlstreamstore.readthedocs.io/en/latest/sqlserver) Sql Server `Connector` implementation for `Equinox.SqlStreamStore` package). ([depends](https://www.fuget.org/packages/Equinox.SqlStreamStore.MsSql) on `Equinox.SqlStreamStore`, `SqlStreamStore.MsSql >= 1.2.0-beta.8`)

src/Equinox.CosmosStore/CosmosStore.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1592,7 +1592,7 @@ type EventsContext internal
15921592
/// Provides mechanisms for building `EventData` records to be supplied to the `Events` API
15931593
type EventData() =
15941594
/// Creates an Event record, suitable for supplying to Append et al
1595-
static member FromUtf8Bytes(eventType, data, ?meta) : IEventData<_> = FsCodec.Core.EventData.Create(eventType, data, ?meta = meta) :> _
1595+
static member FromJsonElements(eventType, data, ?meta) : IEventData<_> = FsCodec.Core.EventData.Create(eventType, data, ?meta = meta) :> _
15961596

15971597
/// Api as defined in the Equinox Specification
15981598
/// Note the CosmosContext APIs can yield better performance due to the fact that a Position tracks the etag of the Stream's Tip

tests/Equinox.CosmosStore.Integration/CosmosCoreIntegration.fs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,13 @@ open Newtonsoft.Json.Linq
88
open Swensen.Unquote
99
open Serilog
1010
open System
11-
open System.Text
1211

1312
#nowarn "1182" // From hereon in, we may have some 'unused' privates (the tests)
1413

1514
type TestEvents() =
1615
static member private Create(i, ?eventType, ?json) =
1716
let ser = System.Text.Json.JsonSerializer.SerializeToElement
18-
EventData.FromUtf8Bytes
17+
EventData.FromJsonElements
1918
( sprintf "%s:%d" (defaultArg eventType "test_event") i,
2019
ser <| defaultArg json "{\"d\":\"d\"}",
2120
ser "{\"m\":\"m\"}")

0 commit comments

Comments
 (0)