Study Notes (21): 21 days clearance Python (Video Lesson only) - Database API core classes and global variables and the basic process ...

Learning immediately: https://edu.csdn.net/course/play/24797/282201?utm_source=blogtoedu

'' ' 
Pythin DB API2.0 
three global parameters: 
apilevel: The global variable display api version of the database module 
threadsafety: the development of global variables thread-safe module level of the data 
paramstyle: the development of a global variable when sql statement needs parameters, which style you can use (qmark, numeric, named) parameters 

core API 
connect () function: connect to the database, the database connection returns 
a database connection: used to open a cursor, open or commit a transaction 
the cursor: for executing sql statement to get executed results 
' '' 
Import the sqlite3 
Print (sqlite3.apilevel) 
Print (sqlite3.threadsafety) 
Print (sqlite3.paramstyle)
Published 39 original articles · won praise 29 · views 907

Guess you like

Origin blog.csdn.net/happyk213/article/details/105224859