)]}'
{"subunit2sql/db/api.py":[{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"f3ef832d24e387026b05a720b37f553c5a8867c8","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"def _create_facade_lazily():"},{"line_number":34,"context_line":"    global _facades"},{"line_number":35,"context_line":"    db_vendor \u003d CONF.database.connection.split(\u0027+\u0027)[0]"},{"line_number":36,"context_line":"    facade \u003d _facades.get(db_vendor)"},{"line_number":37,"context_line":"    if facade is None:"},{"line_number":38,"context_line":"        facade \u003d db_session.EngineFacade("}],"source_content_type":"text/x-python","patch_set":2,"id":"ba15a1d1_f72da5a8","line":35,"updated":"2015-09-16 19:59:44.000000000","message":"So I think this will only work with some of the engines. For example you don\u0027;t need a + with mysql if you\u0027re using python-mysql (the c library based connector) you can just do mysql://foo so the logic here needs to be a bit more involved then simply splitting the connection uri.\n\nI think we can likely leverage a function or something from sqlalchemy to do this for us. I know if you have an engine you can ask directly for the dialect. So I would check if we can get this from an api somewhere before we try to encode more involved logic here.","commit_id":"86046961fa11ea4a8ca0bf0331778080eafc8602"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"b8e358008f81f05fb6613c3556d579cf3d0ba41f","unresolved":false,"context_lines":[{"line_number":34,"context_line":"def _create_facade_lazily():"},{"line_number":35,"context_line":"    global _facades"},{"line_number":36,"context_line":"    db_url \u003d make_url(CONF.database.connection)"},{"line_number":37,"context_line":"    db_drivername \u003d db_url.drivername"},{"line_number":38,"context_line":"    facade \u003d _facades.get(db_drivername)"},{"line_number":39,"context_line":"    if facade is None:"},{"line_number":40,"context_line":"        facade \u003d db_session.EngineFacade("}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_46af01e2","line":37,"updated":"2015-09-16 21:58:33.000000000","message":"is this per bakend or per driver? I\u0027m not sure it makes a difference, but you\u0027re previous rev was looking for the backend. I would likely do this as:\n\n   db_drivername \u003d db_url.get_backend_name()\n\nwhich will return mysql or postgres.","commit_id":"443fe51a1021a856a3b02dcfa37133256794302c"}]}
