jazzdotdev / jazzdotdev/contentdb

schema polymorphism / model inheritance / object oriented data types

Open
#26 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Lua
Stars
6
Forks
0
PR merge metrics
No merged PRs in 30d

Description

![1](https://user-images.githubusercontent.com/584077/141891805-d187b59a-ebdf-4fb8-a026-262e6edeec14.png)

https://github.com/jazzdotdev/lighttouch/blob/364b3e3cb1be8caac90ab212ce3db4593d7d4b78/loaders/models.lua#L22

Lighttouch loaders preprocess everything, so this would make sense to do that way too..

While loading the models, check for this type of syntax and setup the data interfaces to [Classes](https://github.com/kikito/middleclass/blob/master/middleclass.lua) instead of database objects

* [json document schema - Google Search](https://www.google.com/search?q=json+document+schema&rlz=1CAUSZT_enUS979US979&oq=json+document+schema&aqs=chrome..69i57&sourceid=chrome&ie=UTF-8)
* [JSON Schema](https://restfulapi.net/json-schema/)
* [Implementations | JSON Schema](https://json-schema.org/implementations.html)
* ["json schema" inheritance - Google Search](https://www.google.com/search?q=%22json+schema%22+inheritance&rlz=1CAUSZT_enUS979US979&sxsrf=AOaemvKnkK1WKFH06C0LZelFVtKLWN5u0w%3A1637008047670&ei=r8KSYdKgKLnAytMP-P2i-AU&oq=%22json+schema%22+inheritance&gs_lcp=Cgdnd3Mtd2l6EAMyBQgAEIAEMgUIABCABDIGCAAQFhAeMgYIABAWEB46BwgAEEcQsAM6BQgAEJECOgoIABCABBCHAhAUSgQIQRgAUJ9ZWIhvYJx9aAJwAngAgAHfAYgB8RCSAQUwLjguNJgBAKABAcgBCMABAQ&sclient=gws-wiz&ved=0ahUKEwiStLOZmpv0AhU5oHIEHfi-CF8Q4dUDCA4&uact=5)
* [How to extend a schema in JSON schema? | Newbedev](https://newbedev.com/how-to-extend-a-schema-in-json-schema)
* [Privacy error](https://marshal-systems.com/wp-content/uploads/formidable/5/json-schema-multiple-object-types.pdf)
* [java - JSon schema and Inheritance - Stack Overflow](https://stackoverflow.com/questions/27410216/json-schema-and-inheritance)
* [Add "OO" bundle inheritance features [#100925] | Drupal.org](https://www.drupal.org/project/ideas/issues/100925)
* [what is a drupal bundle - Google Search](https://www.google.com/search?q=what+is+a+drupal+bundle&rlz=1CAUSZT_enUS979US979&oq=what+is+a+drupal+bundle&aqs=chrome..69i57j0i22i30.3248j0j7&sourceid=chrome&ie=UTF-8)
* [Bundles | Entity API | Drupal Wiki guide on Drupal.org](https://www.drupal.org/docs/drupal-apis/entity-api/bundles)
* [Bundles: what are they? | Drupal.org](https://www.drupal.org/forum/support/module-development-and-code-questions/2011-01-26/bundles-what-are-they)
* [Introducing bundle classes | Drupal.org](https://www.drupal.org/node/3191609)
* [Allow entities to be subclassed using "bundle classes" [#2570593] | Drupal.org](https://www.drupal.org/project/drupal/issues/2570593)
* [schema polymorphism - Google Search](https://www.google.com/search?q=schema+polymorphism&rlz=1CAUSZT_enUS979US979&oq=schema+polymorphism&aqs=chrome..69i57j0i30j0i5i30l7j0i8i30.12332j0j7&sourceid=chrome&ie=UTF-8)
* [Inheritance and Polymorphism](https://swagger.io/docs/specification/data-models/inheritance-and-polymorphism/)
* [jsonschema - Json Schema Polymorphism Validate with anyOf - Stack Overflow](https://stackoverflow.com/questions/65902626/json-schema-polymorphism-validate-with-anyof)
* [New Issue · jazzdotdev/contentdb](https://github.com/jazzdotdev/contentdb/issues/new)
* ["model inheritance" - Google Search](https://www.google.com/search?rlz=1CAUSZT_enUS979US979&sxsrf=AOaemvITsvHzWJ8M494Tdk8jk1XD5fa_KQ:1637028878060&source=univ&tbm=isch&q=%22model+inheritance%22&fir=ZuaoetBUi82UBM%252CYpiOwGpImhYdBM%252C_%253BwHzt0VFOvvDDEM%252CMQGrWayFSl59gM%252C_%253BWXs9H0cZlDK2TM%252CMQGrWayFSl59gM%252C_%253BWV-4i4iWwDaodM%252CkdV4IO8HXuhZGM%252C_%253Bl9ZGkxYIlhlQVM%252C1Bg1RJg89iWORM%252C_%253B7mLAWJqM5mFT1M%252CMQGrWayFSl59gM%252C_%253BEisK_IuQrGE-JM%252C3b5hhUpM-fIOhM%252C_%253BOB_jffLqFQE9iM%252CMQGrWayFSl59gM%252C_%253B8PpIkC7XTuDZXM%252CD7o8loeHfLDJGM%252C_%253BT2AWlWAbFwUv6M%252CyzZCWsOxSNkDBM%252C_&usg=AI4_-kTAVdCbxrrkVVHMdIOaqpIHtuYSXg&sa=X&ved=2ahUKEwiHw43m55v0AhXsknIEHUiLDDAQjJkEegQINBAC&biw=1366&bih=697&dpr=1#imgrc=WXs9H0cZlDK2TM&imgdii=t3id1hvxI34TIM)
* [Models | Django documentation | Django](https://docs.djangoproject.com/en/3.2/topics/db/models/)

-----
* [Overview | Odin Programming Language](https://odin-lang.org/docs/overview/)
* [patched lua source code syntax - Google Search](https://www.google.com/search?q=patched+lua+source+code+syntax&rlz=1CAUSZT_enUS979US979&oq=patched+lua+source+code+syntax&aqs=chrome..69i57.6176j0j7&sourceid=chrome&ie=UTF-8)
* [moonscript vs middleclass - Google Search](https://www.google.com/search?q=moonscript+vs+middleclass&rlz=1CAUSZT_enUS979US979&oq=moonscript+vs+middleclass&aqs=chrome..69i57j33i10i160j33i299.9374j0j7&sourceid=chrome&ie=UTF-8)
* [cass.si — MoonScript vs classic, middleclass and hump.class](https://cass.si/posts/2017-11-20-moonscript-vs-popular-lua-oo-libs/)
* [Learn moonscript in Y Minutes](https://learnxinyminutes.com/docs/moonscript/)
* [MoonScript: Dynamic scripting language that compiles into Lua | Hacker News](https://news.ycombinator.com/item?id=22209985)
* [Class Library Differences - 30log vs Middleclass - LÖVE](https://love2d.org/forums/viewtopic.php?t=77305)
* [Language Guide - MoonScript 0.5.0](http://moonscript.org/reference/#the-language/object-oriented-programming)
* [middleclass/middleclass.lua at master · kikito/middleclass](https://github.com/kikito/middleclass/blob/master/middleclass.lua)
* [object oriented data model - Google Search](https://www.google.com/search?q=object+oriented+data+model&rlz=1CAUSZT_enUS979US979&oq=object+oriented+data+&aqs=chrome.2.0i355i512j46i512j0i512j69i57j0i512j0i10i512j0i512l4.13649j0j7&sourceid=chrome&ie=UTF-8)
* [schema polymorphism / model inheritance / object oriented data model · Issue #26 · jazzdotdev/contentdb](https://github.com/jazzdotdev/contentdb/issues/26)
-----
* [How to do inheritance? · Issue #348 · json-schema-org/json-schema-spec](https://github.com/json-schema-org/json-schema-spec/issues/348#issuecomment-322940347)
* [Explain why inheritance isn't the right model · Issue #148 · json-schema-org/json-schema-org.github.io](https://github.com/json-schema-org/json-schema-org.github.io/issues/148)
* [Investigate scalability limitations with big JSON schemas · Issue #11 · ansible-community/schemas](https://github.com/ansible-community/schemas/issues/11)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.