Created
January 31, 2015 15:40
-
-
Save hamishdickson/62d5426cce7040cab07e to your computer and use it in GitHub Desktop.
For some reason this doesn't work...
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
object DeleteExamples extends App with DatabaseExample { | |
InsertExamples.insertAll | |
val deleteStatement = | |
delete | |
.from(FruitTable) | |
.where(FruitTable.name === """Banana""") | |
// try again to run the delete statement in a transaction | |
database.withTransaction { | |
// running the delete statement returns the number of lines changed (ie deleted) | |
val numberInsert = deleteStatement.execute | |
println(numberInsert) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is banana in the fruit table?
The insertAll method runs this: