Created
September 16, 2019 15:18
-
-
Save chasinglogic/54a98be204aae661ce677a28d9ab6d58 to your computer and use it in GitHub Desktop.
justin ex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SQL | |
some_obj = MyClass() | |
query = "SELECT * FROM my_table WHERE id = ?" | |
result = mydriver.query(query, some_obj.id) | |
# A BUNCH OF CODE TO SERIALIZE THE RESULT ROWS INTO AN OBJECT, or use of an ORM | |
# MongoDB | |
some_obj = MyClass() | |
query = {"id": some_obj.id} | |
result = client.find(query) | |
# Already a data structure so no serialization necessary. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment