diff options
Diffstat (limited to 'common/sql.go')
-rw-r--r-- | common/sql.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/common/sql.go b/common/sql.go index f50a5896..e93ff1c2 100644 --- a/common/sql.go +++ b/common/sql.go @@ -18,6 +18,7 @@ import ( "database/sql" "fmt" "runtime" + "time" ) // A Transaction is something that can be committed or rolledback. @@ -99,3 +100,10 @@ func SQLiteDriverName() string { } return "sqlite3" } + +// DbProperties functions return properties used by database/sql/DB +type DbProperties interface { + MaxIdleConns() int + MaxOpenConns() int + ConnMaxLifetime() time.Duration +} |