def set_connection(self, url):
u = urlparse(url)<EOL>if u.netloc.find('<STR_LIT:@>') > -<NUM_LIT:1> and (u.scheme == '<STR_LIT>' or u.scheme == '<STR_LIT>'):<EOL><INDENT>credentials, hostname = u.netloc.rsplit('<STR_LIT:@>', <NUM_LIT:1>)<EOL>username, password, = credentials.split('<STR_LIT::>')<EOL><DEDENT>else:<EOL><INDENT>raise ValueError("<STR_LIT>"<EOL>"<STR_LIT>".format(url))<EOL><DEDENT>self.driver = GraphDatabase.driver(u.scheme + '<STR_LIT>' + hostname,<EOL>auth=basic_auth(username, password),<EOL>encrypted=config.ENCRYPTED_CONNECTION,<EOL>max_pool_size=config.MAX_POOL_SIZE)<EOL>self.url = url<EOL>self._pid = os.getpid()<EOL>self._active_transaction = None<EOL>
Sets the connection URL to the address a Neo4j server is set up at