def connection_db_type(connection):
    """
	A totally broken attempt to determine what type of database a
	connection object is attached to.  Don't use this.

	The input is a DB API 2.0 compliant connection object, the return
	value is one of the strings "sqlite3" or "mysql".  Raises TypeError
	when the database type cannot be determined.
	"""
    if 'sqlite' in repr(connection):
        return 'sqlite'
    if 'mysql' in repr(connection):
        return 'mysql'
    raise TypeError(connection)
