Created
May 2, 2016 22:46
-
-
Save eishay/ab254bfad52dbd7380c891821d63ebfe to your computer and use it in GitHub Desktop.
This file contains hidden or 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 DataBaseComponent { | |
// the actual Slick driver (e.g. H2 or MySQL) | |
val Driver: ExtendedDriver | |
// dialect specific to this driver for functions that Slick does not support | |
// Usage will be discussed in future blog post | |
val dialect: DatabaseDialect[_] | |
// A database instance for which connections can be created. | |
// Encapsulates either a DataSource or parameters for DriverManager.getConnection(). | |
val handle: SlickDatabase | |
// MySQL and H2 have different preferences on casing the table and column names. | |
// H2 specifically prefers upper case | |
def entityName(name: String): String = name | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment