john-kelly / elm-postgrest

Make PostgREST requests in Elm
109 stars 14 forks source link

What is a Schema!? #41

Closed john-kelly closed 6 years ago

john-kelly commented 7 years ago

1.) Schema represents from json -> to elm type 2.) Schema represents just from json

I think 2 (based on convo with elm-graphql guy)

Based on this conversation, how should things be named? https://en.wikipedia.org/wiki/Relation_(database) https://docs.djangoproject.com/en/1.10/ref/models/fields/ http://www.django-rest-framework.org/api-guide/schemas/ https://hexdocs.pm/ecto/Ecto.Schema.html http://graphql.org/learn/schema/

john-kelly commented 7 years ago

http://backbonejs.org/#FAQ-nested https://guides.emberjs.com/v2.11.0/models/ http://singlepageappbook.com/index.html

john-kelly commented 7 years ago

The notion of a transformer: http://emberjs.com/api/data/classes/DS.Transform.html

brings up an interesting point. to what extent should one's schema transform that data received from the server?

Query.map seems to work in all cases for general transformation needs. I think most of the data transformation should live in maps, but I'm not yet convinced :)

john-kelly commented 7 years ago

https://github.com/tomjaguarpaw/haskell-opaleye/blob/master/Doc/Tutorial/TutorialBasic.lhs

john-kelly commented 7 years ago

https://docs.microsoft.com/en-us/dotnet/articles/fsharp/language-reference/query-expressions

john-kelly commented 7 years ago

https://github.com/mozilla/mentat http://diesel.rs/guides/getting-started/ https://github.com/serde-rs/serde

john-kelly commented 7 years ago

https://www.reddit.com/r/haskell/comments/66ih1l/selda_a_monadic_database_edsl/ https://github.com/carlosdagos/haskell-sql-edsl-demo https://khibino.github.io/haskell-relational-record/

AND ALL OF THE OTHER HASKELL THINGS! (haskelldb, opaleye, esquelto, and others that i forgot)

http://hackage.haskell.org/package/codec-0.2.1#readme

john-kelly commented 7 years ago

This gives me the feeling that making relationships and fields separate things is a good idea. http://docs.sqlalchemy.org/en/rel_1_1/orm/tutorial.html#building-a-relationship