498570739 by Learn to Develop & Deploy Responsive RESTful

498570739 by Learn to Develop & Deploy Responsive RESTful

Author:Learn to Develop & Deploy Responsive RESTful
Language: eng
Format: epub


cur.execute("INSERT INTO Students VALUES (?,?,?)",(s1.Name, s1.Age, s1.Marks))

On the other hand, row in a result set of the SELECT query is a dictionary, which needs to be converted into an object of the Student class:

cur.execute("select * from Students WHERE name=?",("Sam",))

row=cur.fetchone()

s1=Student(row['Name'], row['Age'], row['Marks'])

This explicit conversion between Python object and SQL compatible types is tedious to say the least. Object Relation Mapping API provides an easier alternative.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.