gpt4 book ai didi

neventstore - EventStore 只在 Payload 列中显示十六进制字符串

转载 作者:行者123 更新时间:2023-12-04 05:04:17 34 4
gpt4 key购买 nike

据我所知,我的 SQL 数据库提交表的 Payload 列中应该显示 JSON,但是我有一个很长的十六进制字符串。

我的接线代码按照示例进行了以下编辑:

private static IStoreEvents WireupEventStore()
{
return Wireup.Init()
.LogToOutputWindow()
.UsingInMemoryPersistence()
.UsingSqlPersistence("EventStore") // Connection string is in app.config
.WithDialect(new MsSqlDialect())
.EnlistInAmbientTransaction() // two-phase commit
.InitializeStorageEngine()
.UsingJsonSerialization()
.HookIntoPipelineUsing(new[] { new AuthorizationPipelineHook() })
.UsingSynchronousDispatchScheduler()
.DispatchTo(new DelegateMessageDispatcher(DispatchCommit))
.Build();
}

知道如何获取 JSON 并使调试更容易吗?

最佳答案

只需创建以下 View :

CREATE VIEW [dbo].[DeserializedCommits]
AS
SELECT
[StreamId]
,[StreamRevision]
,[Items]
,[CommitId]
,[CommitSequence]
,[CommitStamp]
,[Dispatched]
,CAST([Headers] AS VARCHAR(MAX)) AS [Headers]
,CAST([Payload] AS VARCHAR(MAX)) AS [Payload]
FROM [dbo].[Commits]

您可以使用 LIKE 在您的事件存储中查询特定事件。在 Payload列。

关于neventstore - EventStore 只在 Payload 列中显示十六进制字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15723678/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com