-
Notifications
You must be signed in to change notification settings - Fork 11
Ocelots - Soumya S and Kelly T #3
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Soumya Sah <[email protected]>
…TABASE solar_system_development; in the postgres user before further development and testing.
…) and to read_all_planets().
…ding or descending order.
| try: | ||
| model_id = int(model_id) | ||
| except: | ||
| abort(make_response({"message":f"{cls.__name__} {model_id} invalid"}, 400)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice use of introspection here :)
|
|
||
| name_query = request.args.get("name") | ||
| if name_query: | ||
| planet_query = planet_query.filter(Planet.name.ilike(f"%{name_query}%")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice use of SQLAlchemy's case-insensitive searching
| @@ -0,0 +1,13 @@ | |||
| ALTER SEQUENCE planet_id_seq RESTART WITH 1; | |||
| ALTER SEQUENCE moon_id_seq RESTART WITH 1; | |||
| INSERT INTO planet VALUES (DEFAULT,'Mercury', 'Mercury is the closest planet to the Sun.', 88, 0); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is great to see here!
No description provided.