Search code examples
c#mysqljsonservicestackormlite-servicestack

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.

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?


Solution

  • There’s no plan to provide a typed API for accessing non-standard JSON syntax.

    You’d need to use Custom SQL APIs to execute any custom queries.