parameters: (connection)
return_statement: return [ row[0] for row in execute_query(connection, query) ]
docstring: Returns a list of the available catalogs.
  
      [NOTE] From MSDN: [A catalog] is equivalent to a databases in SQL Server.
docstring_summary: Returns a list of the available catalogs.
docstring_tokens: Returns a list of the available catalogs .
function: def getCatalogNames(connection):
      """Returns a list of the available catalogs.
  
      [NOTE] From MSDN: [A catalog] is equivalent to a databases in SQL Server.
      """
      query_pre_90 = 'SELECT name FROM master.dbo.sysdatabases'
      query_post_90 = 'exec sys.sp_databases'
      
      serverVersion = connected_server_version(connection)
  
      query = query_pre_90 if serverVersion.majorNumber < 9 else query_post_90
  
      return [ row[0] for row in execute_query(connection, query) ]
function_tokens: def getCatalogNames ( connection ) : query_pre_90 = 'SELECT name FROM master.dbo.sysdatabases' query_post_90 = 'exec sys.sp_databases' serverVersion = connected_server_version ( connection ) query = query_pre_90 if serverVersion . majorNumber < 9 else query_post_90 return [ row [ 0 ] for row in execute_query ( connection , query ) ]