What does this return? Now run the same command with an id that is not in the database. In the Rails Console, run Task.find() where is the id of a Task in your database.Did it change? Is this what you expected? In the Rails Console, run task.update(description: "go buy food").What is the difference between new and create? Now what id do you see for the Task object? Do you see it stored in the Tasks table in Postico? If not try to refresh your table. Do you see your new Task? In the Rails Console, run task.save. What id do you see stored in the new Task object? Now open up the Tasks table in Postico. In the Rails Console, run task = Task.new(title: "Grocery Shopping", description: "need to eat").What SQL query do you see in the Rails Console after running this command? What does the create method do? Do you see your new Task? If not, try to refresh your table. In the Rails Console, run Task.create(title: "Laundry", description: "Clean the clothes").How does this compare to the SQL command you saw in the Rails Console? Is this what you would expect? What type of object is returned from this method call? What SQL query do you see in the Rails Console after running this command? Now run _sql. Now run tasks = Task.all in your Rails console. In TaskManager, open up the Rails console by running rails c from the command line (make sure that you navigate to your TaskManager repo first).First, open Postico and double check that you have deleted any tasks you made during the Postico Activity.Find all Tasks where the description contains the string “shop”. Retrieve all tasks sorted by title in reverse alphabetical order.If you complete the activity and answer the follow up questions, try to execute the following SQL queries: What is SQL? How does it relate to the DB?.How would you describe your task_manager_development database’s schema.How does a DB relate to web applications?.Compare and contrast a database with a collection of CSV files.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |