more generic solution to other database.py options

Summary: derp

Test Plan: added a test

Reviewers: hurshal

Reviewed By: hurshal

Differential Revision: http://grizzly.memsql.com/D8414