You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In file journal/Statements.scala a parameter is missing for MS SQL Server (3 '?', expected 4). After correction some other exception are thrown and simple workaround (no binding) may be applied:
trait MSSqlServerStatements extends GenericStatements {
override def selectMessagesFor(persistenceId: String, fromSequenceNr: Long, toSequenceNr: Long, max: Long): List[PersistentRepr] = {
SQL(s"SELECT TOP $max message FROM $schema$table WHERE persistence_id = '$persistenceId' AND (sequence_number >= $fromSequenceNr AND sequence_number <= $toSequenceNr) ORDER BY sequence_number")
//.bind(max, persistenceId, fromSequenceNr, toSequenceNr)
.map(rs => Journal.fromBytes(Base64.decodeBinary(rs.string(1))))
.list()
.apply
}
}
The text was updated successfully, but these errors were encountered:
Pull request #15 fixes this issue and couple of other SQL Server -specific minors. Works fine in my environment.
I'm planning to make an additional improvement there, similar to #13 -- to convert INSERT-fail-UPDATE logic into a stored procedure.
In file journal/Statements.scala a parameter is missing for MS SQL Server (3 '?', expected 4). After correction some other exception are thrown and simple workaround (no binding) may be applied:
trait MSSqlServerStatements extends GenericStatements {
override def selectMessagesFor(persistenceId: String, fromSequenceNr: Long, toSequenceNr: Long, max: Long): List[PersistentRepr] = {
SQL(s"SELECT TOP $max message FROM $schema$table WHERE persistence_id = '$persistenceId' AND (sequence_number >= $fromSequenceNr AND sequence_number <= $toSequenceNr) ORDER BY sequence_number")
//.bind(max, persistenceId, fromSequenceNr, toSequenceNr)
.map(rs => Journal.fromBytes(Base64.decodeBinary(rs.string(1))))
.list()
.apply
}
}
The text was updated successfully, but these errors were encountered: