Permalink
Browse files

Remove AccessDriver

It’s been deprecated since 2.1, to be removed “when we drop support for
Java versions < 8”. This will probably not happen in 3.1 yet but
AccessDriver hasn’t been tested very well in 3.0 and would require
extra work to adapt it properly to the new compiler backend in 3.1.
Considering its very limited functionality and the buggy JDBC-ODBC
bridge, I doubt it will be missed by many people.
  • Loading branch information...
szeiger committed Jul 14, 2015
1 parent 98de1c9 commit 5ef94f87533ce1a21cf35d291ee8354b7775583f
View
@@ -16,7 +16,6 @@ The following database systems are directly supported for type-safe queries:
- Derby/JavaDB
- H2
- HSQLDB/HyperSQL
- Microsoft Access
- MySQL
- PostgreSQL
- SQLite
@@ -114,12 +114,3 @@ mysql {
drop = DROP DATABASE IF EXISTS ${testDB}
driver = com.mysql.jdbc.Driver
}
access {
emptyDBFile = "test-dbs/empty_4.x.mdb.gz"
testDBFile = ${testkit.testDir}/${testDB}.mdb
driver = sun.jdbc.odbc.JdbcOdbcDriver
baseURL = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ="
#baseURL = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ="
testConn.url = ${baseURL}${testkit.testDir}/${testDB}.mdb
}
@@ -16,7 +16,6 @@ object BuildCapabilitiesTable extends App {
"slick.driver.DerbyDriver",
"slick.driver.H2Driver",
"slick.driver.HsqldbDriver",
"slick.driver.AccessDriver",
"slick.driver.MySQLDriver",
"slick.driver.PostgresDriver",
"slick.driver.SQLiteDriver"
@@ -107,8 +107,6 @@ object StandardTestDBs {
}
}
lazy val MSAccess = new AccessDB("access")
lazy val Heap = new RelationalTestDB {
type Driver = MemoryDriver
val driver: Driver = MemoryDriver
@@ -154,30 +152,6 @@ class SQLiteTestDB(dburl: String, confName: String) extends InternalJdbcTestDB(c
}
}
@deprecated("AccessDriver will be removed when we drop support for Java versions < 8", "2.1")
class AccessDB(confName: String) extends ExternalJdbcTestDB(confName) {
val driver = AccessDriver
val dir = new File(TestkitConfig.testDir)
val dbPath = dir.getAbsolutePath.replace("\\", "/")
lazy val emptyDBFile = confString("emptyDBFile")
lazy val testDBFile = confString("testDBFile")
override def cleanUpBefore() {
cleanUpAfter()
TestDB.copy(new File(emptyDBFile), new File(testDBFile))
}
override def cleanUpAfter() = TestDB.deleteDBFiles(testDB)
override def dropUserArtifacts(implicit session: profile.Backend#Session) = {
session.close()
cleanUpBefore()
}
/* Works in some situations but fails with "Optional feature not implemented" in others */
override def canGetLocalTables = false
override def localTables(implicit ec: ExecutionContext): DBIO[Vector[String]] =
MTable.getTables.map(_.map(_.name.name).sorted)
override def capabilities = super.capabilities - TestDB.capabilities.jdbcMeta
}
abstract class DerbyDB(confName: String) extends InternalJdbcTestDB(confName) {
val driver = DerbyDriver
System.setProperty("derby.stream.error.method", classOf[DerbyDB].getName + ".DEV_NULL")
@@ -33,8 +33,5 @@ class PostgresTest extends DriverTest(StandardTestDBs.Postgres)
@RunWith(classOf[Testkit])
class MySQLTest extends DriverTest(StandardTestDBs.MySQL)
@RunWith(classOf[Testkit])
class MSAccessTest extends DriverTest(StandardTestDBs.MSAccess)
@RunWith(classOf[Testkit])
class HeapTest extends DriverTest(StandardTestDBs.Heap)
@@ -32,15 +32,13 @@ package object slick {
@deprecated("Package 'scala.slick' has been renamed to 'slick'", "3.0")
object driver {
type JdbcProfile = _root_.slick.driver.JdbcProfile
type AccessDriver = _root_.slick.driver.AccessDriver
type DerbyDriver = _root_.slick.driver.DerbyDriver
type H2Driver = _root_.slick.driver.H2Driver
type HsqldbDriver = _root_.slick.driver.HsqldbDriver
type JdbcDriver = _root_.slick.driver.JdbcDriver
type MySQLDriver = _root_.slick.driver.MySQLDriver
type PostgresDriver = _root_.slick.driver.PostgresDriver
type SQLiteDriver = _root_.slick.driver.SQLiteDriver
val AccessDriver = _root_.slick.driver.AccessDriver
val DerbyDriver = _root_.slick.driver.DerbyDriver
val H2Driver = _root_.slick.driver.H2Driver
val HsqldbDriver = _root_.slick.driver.HsqldbDriver
Oops, something went wrong.

0 comments on commit 5ef94f8

Please sign in to comment.