Adds GetFilename (sqlite3_db_filename) to SqliteConn
This commit is contained in:
parent
4218441e44
commit
f268891078
11
sqlite3.go
11
sqlite3.go
|
@ -1612,6 +1612,17 @@ const (
|
||||||
SQLITE_LIMIT_WORKER_THREADS = C.SQLITE_LIMIT_WORKER_THREADS
|
SQLITE_LIMIT_WORKER_THREADS = C.SQLITE_LIMIT_WORKER_THREADS
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// GetFilename returns the absolute path to the file containing
|
||||||
|
// the requested schema. When passed an empty string, it will
|
||||||
|
// instead use the database's default schema: "main".
|
||||||
|
// See: sqlite3_db_filename, https://www.sqlite.org/c3ref/db_filename.html
|
||||||
|
func (c *SQLiteConn) GetFilename(schemaName string) string {
|
||||||
|
if schemaName == "" {
|
||||||
|
schemaName = "main"
|
||||||
|
}
|
||||||
|
return C.GoString(C.sqlite3_db_filename(c.db, C.CString(schemaName)))
|
||||||
|
}
|
||||||
|
|
||||||
// GetLimit returns the current value of a run-time limit.
|
// GetLimit returns the current value of a run-time limit.
|
||||||
// See: sqlite3_limit, http://www.sqlite.org/c3ref/limit.html
|
// See: sqlite3_limit, http://www.sqlite.org/c3ref/limit.html
|
||||||
func (c *SQLiteConn) GetLimit(id int) int {
|
func (c *SQLiteConn) GetLimit(id int) int {
|
||||||
|
|
Loading…
Reference in New Issue