In the table below, you have information about old computers. The table has the id, name, country, and the year columns.
You may have noticed that the second row contains incomplete data. You need to correct it. The correct data is country: Japan and year: 1977. Pay attention to the code snippets below and select only those that will update the data correctly.
Tip: All fields of the table are of the str type.
A)
query = session.query(Computer)
comp_filter = query.filter(Computer.name == "BANDAI TV Jack 1000")
comp_filter.update({
"country": "Japan",
"year": "1977"
})
session.commit()
B)
query = session.query()
comp_filter = query.filter(Computer.name == "BANDAI")
comp_filter.update({
"country": "Japan",
"year": "1977"
})
C)
query = session.query(Computer.name)
query.update({
"country": "Japan",
"year": "1977"
})
session.commit()
D)
query = session.query(Computer)
comp_filter = query.filter(Computer.name == "BANDAI TV Jack 1000")
comp_filter.update({
"country": Computer.country + "n",
"year": Computer.year + "77"
})
session.commit()
E)
query = session.query(Computer)
comp_filter = query.filter(Computer.name == "BANDAI TV Jack 1000")
comp_filter.update({
"country": "Japan",
"year": Computer.year + 77
})
session.commit()