Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More SQL/Querying examples needed, documentation enhancement request #441

Open
vectorselector opened this issue Feb 5, 2021 · 1 comment

Comments

@vectorselector
Copy link

vectorselector commented Feb 5, 2021

It appears that Granite does NOT use combined-key constraints in junction tables (many-to-many)
It appears that Granite does NOT use or acknowledge foreign-keys at all! (given the SQL examples on https://github.com/amberframework/granite/blob/master/docs/relationships.md)

It's not immediately clear to me what Granite will be flexible on with regards to the results of the SQL it expects to see reflected in a database schema etc.
What column types correspond to which Crystal types? (one reference place would be nice, src code line #'s are FINE)
For example, a Crystal Time type corresponds to which acceptable database column types?
(example: Postgresql timestamptz is ok? or?)

Since an ORM corresponds 1-to-1 with SQL via mapping, it's vital information for the user.

I will suggest some proper real-world SQL examples to save a person days of work only to discover that Granite doesn't like their tables... I would offer some but I'm just using this for the first time and my confusion is the reason for opening what hopefully is seen as a constructive criticism/issue.

Thank you for your coding efforts, I hope to be able to contribute one day...

@vectorselector vectorselector changed the title Granite wants *special* SQL? ...more SQL examples needed... Granite wants *special* SQL? ...more SQL examples needed...documentation enhancement request Feb 5, 2021
@crimson-knight crimson-knight changed the title Granite wants *special* SQL? ...more SQL examples needed...documentation enhancement request More SQL/Querying examples needed, documentation enhancement request Apr 25, 2023
@crimson-knight
Copy link
Member

Improving the Granite docs:

  • Clarify which db column types map to which Crystal types
  • Clarify complex table relationships that are managed by Granite (many-to-many, etc.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants