Skip to content

Commit

Permalink
Use DELETE instead of TRUNCATE for DB2
Browse files Browse the repository at this point in the history
  • Loading branch information
Trevor Sibanda committed Aug 16, 2016
1 parent fd6c637 commit 5f3cee4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion slick/src/main/scala/slick/jdbc/DB2Profile.scala
Expand Up @@ -132,7 +132,9 @@ trait DB2Profile extends JdbcProfile {
} else super.createIndex(idx) } else super.createIndex(idx)
} }


override def truncateTable = s"TRUNCATE TABLE ${quoteTableName(tableNode)} IMMEDIATE" //For compatibility with all versions of DB2
//http://stackoverflow.com/questions/3006999/sql-query-to-truncate-table-in-ibm-db2
override def truncateTable = s"DELETE FROM ${quoteTableName(tableNode)}"
} }


class ColumnDDLBuilder(column: FieldSymbol) extends super.ColumnDDLBuilder(column) { class ColumnDDLBuilder(column: FieldSymbol) extends super.ColumnDDLBuilder(column) {
Expand Down

0 comments on commit 5f3cee4

Please sign in to comment.