Closed brendanator closed 9 years ago
Is most of this functionality under test? If so I can clean some of that up into examples for documentation
It is under test It would be great to turn it into some nice examples
I'm having some issues getting delete to work - can you think why this delete example doesn't actually delete anything?
So I've had a quick debug and Database.execute delete does the following...
def executeDelete(delete: Delete): Int = {
checkInTransaction
executeWithConnection { connection =>
0
}
}
which doesn't look to be doing a great deal.... am I missing something obvious?
Edit: I'm pretty sure it should look like this:
def executeDelete(delete: Delete): Int = {
checkInTransaction
executeWithConnection { connection =>
val preparedStatement = statementBuilder(connection, delete)
try {
logger.debug(s"Executing delete")
preparedStatement.executeUpdate
} finally {
try {
if (preparedStatement != null) preparedStatement.close
} catch {
case e: SQLException =>
}
}
}
}
Examples of aggregate functions created in pull request #34
There is a large amount of functionality in sqlest that is not documented anywhere. The examples project needs to be expanded to show this functionality in action