GetAppDBBackend gets the backend type to use for the application DBs.
(opts servertypes.AppOptions)
| 219 | |
| 220 | // GetAppDBBackend gets the backend type to use for the application DBs. |
| 221 | func GetAppDBBackend(opts servertypes.AppOptions) dbm.BackendType { |
| 222 | rv := cast.ToString(opts.Get("app-db-backend")) |
| 223 | if len(rv) == 0 { |
| 224 | rv = cast.ToString(opts.Get("db_backend")) |
| 225 | } |
| 226 | if len(rv) != 0 { |
| 227 | return dbm.BackendType(rv) |
| 228 | } |
| 229 | |
| 230 | return dbm.GoLevelDBBackend |
| 231 | } |