def has_meta_cmd(query):
 try:
  first_token = query.split()[0]
  if (first_token.lower() in (u'alter', u'create', u'drop')):
   return True
 except Exception:
  return False
 return False

def has_meta_cmd ( query ) : try : first_token = query . split ( ) [ 0 ] if ( first_token . lower ( ) in ( u'alter' , u'create' , u'drop' ) ) : return True except Exception : return False return False
determines if the completion needs a refresh by checking if the sql statement is an alter .