#NEWLINE# def database_exists( self , db_name ) : #NEWLINE# #INDENT# 'Returns True if exists, otherwise false' #NEWLINE# conn = self . __get_open_connection ( self . sys_conn_hash ) #NEWLINE# conn . autocommit ( True ) #NEWLINE# sql = "SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = '{0}'" . format ( db_name ) #NEWLINE# r = self . exec_sql_get_records ( conn , sql ) #NEWLINE# return ( len ( r ) == 1 )