Created
February 11, 2013 20:26
-
-
Save andrewconner/4757307 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait DbConnection { | |
def readOnly(): Connection | |
def readWrite(): Connection | |
} | |
class PostgresDbConnection extends DbConnection { | |
def readOnly() = PostgresDbHandler.getReadOnlyConnection() | |
def readWrite() = PostgresDbHandler.getReadWriteConnection() | |
} | |
class InMemoryDbConnection extends DbConnection { | |
def readOnly() = H2DbHandler.getReadOnlyConnection() | |
def readWrite() = H2DbHandler.getReadWriteConnection() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment