MessageSQLRepository

SQL implementation of the MessageRepository.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun close()

Close the connection to the database.

Link copied to clipboard
abstract fun connect(host: String, port: String, dbName: String, username: String, password: String)
Link copied to clipboard
open override fun deleteById(id: Message.MessageID): Message?

Delete a message by its ID.

Link copied to clipboard
open override fun findAll(): Array<Message>

Find all messages.

Link copied to clipboard

Find all messages exchanged between two users.

Link copied to clipboard

Find all messages received by a user.

Link copied to clipboard
open override fun findById(id: Message.MessageID): Message?

Find a message by its ID.

Link copied to clipboard
open override fun save(entity: Message)

Save a message.

Link copied to clipboard
open override fun update(entity: Message)

Update a message.