Basic Functions¶
These Function are either general for the database or inherited by every table class.
Functions¶
showTablesAndColumns¶
This function shows the names of all tables, along with their columns and types of the columns
from T_Tables import Base
Base.showTablesAndColumns()
showTable¶
This function shows all columns of class table and types of the columns.
Example using the Image Class:
import T_Tables as tableClasses
Images = tableClasses.T_Images()
Images.showTable()
updateTable¶
This function checks that the defined table class and the table in sql are identical. It will update the sql table to the defined table class. So be sure that if you make changes to the class that they are intentional and correct. Changes of functions do not affect this.
Things that are adjusted:
- adds missing columns
- deleted non-defined columns
- changes column type
Example using the Image Class:
import T_Tables as tableClasses
Images = tableClasses.T_Images()
Images.updateTable()