简体   繁体   English

ServiceStack.OrmLite:支持 sql 原生 JSON 类型和索引?

[英]ServiceStack.OrmLite: Support for sql native JSON types and indexing?

Our current data model has sub-objects, something like我们当前的数据模型有子对象,比如

BaseObject-->NodeStart-->SomeDateTime

and so on.等等。 In our current, custom implemented data handling, we "serialize" the complex objects in two levels, so, we have columns like在我们当前自定义实现的数据处理中,我们将复杂对象“序列化”为两个级别,因此,我们有类似的列

Id, Name, etc (in BaseObject)

and we also have我们也有

NodeStart_SomeDateTime

so we take sub-objects and take their properties, create columns and indexes as needed.所以我们获取子对象并获取它们的属性,根据需要创建列和索引。 IN this way, we can search for sub-objects properties and filter on that.通过这种方式,我们可以搜索子对象属性并对其进行过滤。

Complex objects in OrmLite are blobbed in JSON format, and that's nice, but I haven't seen any support for "native JSON" in OrmLite, so indexes can be created on properties inside blobbed JSON, as can be done with Marten on Postgre . OrmLite 中的复杂对象以 JSON 格式打包,这很好,但我还没有看到 OrmLite 中对“原生 JSON”的任何支持,因此可以在打包的 JSON 内的属性上创建索引,就像Postgre上的Marten 一样

My question is: Does ServiceStack plan to add support in its API for native JSON types in SQL database (MySQL!), so it can be indexed (via code) and searched using the APIs/LINQ etc?我的问题是:ServiceStack 是否计划在其 API 中添加对 SQL 数据库(MySQL!)中本机 JSON 类型的支持,以便可以(通过代码)对其进行索引并使用 API/LINQ 等进行搜索?

There's no plan to provide a typed API for accessing non-standard JSON syntax.没有计划提供用于访问非标准 JSON 语法的类型化 API。

You'd need to use Custom SQL APIs to execute any custom queries.您需要使用自定义 SQL API来执行任何自定义查询。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM