Issue 35272: sqlite3 get the connected database url
Created on 2018-11-18 13:36 by midnio, last changed 2022-04-11 14:59 by admin. This issue is now closed.
| Messages (4) | |||
|---|---|---|---|
| msg330047 - (view) | Author: Muhammed Alkan (midnio) | Date: 2018-11-18 13:36 | |
A feature for to get the connected database path or URL from connection object (sqlite3.Connection). |
|||
| msg330048 - (view) | Author: DamlaAltun (DamlaAltun) * | Date: 2018-11-18 13:38 | |
Yeah, that would be great enhancement |
|||
| msg330049 - (view) | Author: Berker Peksag (berker.peksag) * ![]() |
Date: 2018-11-18 14:09 | |
Just to be sure, what do you want to do is
import sqlite3
conn = sqlite3.connect("foo.db")
assert conn.database_path == "foo.db"
right?
I don't think that's something worth to expose in the Connection object. What's your use case?
|
|||
| msg330050 - (view) | Author: Muhammed Alkan (midnio) | Date: 2018-11-18 14:32 | |
The use case could be - Using it to check if you're connected to correct database (as you know the mutability could change the connection) - Getting the name, helping the developers while debugging. - No more reasons :P |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:08 | admin | set | github: 79453 |
| 2019-03-31 15:05:43 | berker.peksag | set | status: open -> closed resolution: rejected stage: resolved |
| 2018-11-18 14:32:51 | midnio | set | messages: + msg330050 |
| 2018-11-18 14:09:32 | berker.peksag | set | messages: + msg330049 |
| 2018-11-18 13:38:15 | DamlaAltun | set | nosy:
+ DamlaAltun messages: + msg330048 |
| 2018-11-18 13:36:06 | midnio | create | |
