fundamentals.mysql.table_exists¶
Probe a database to determine if a given table exists
- Author
David Young
Module Contents¶
Functions¶
Probe a database to determine if a given table exists |
API¶
- fundamentals.mysql.table_exists.table_exists(dbConn, log, dbTableName)[source][source]¶
Probe a database to determine if a given table exists
Key Arguments
dbConn– mysql database connectionlog– loggerdbTableName– the database tablename
Return
tableExists– True or False
Usage
To test if a table exists in a database:
from fundamentals.mysql import table_exists exists = table_exists( dbConn=dbConn, log=log, dbTableName="stupid_named_table" ) print exists # OUTPUT: False