Skip to content

Commit

Permalink
doc(rank): Add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Distractic committed Oct 15, 2023
1 parent 993a5c4 commit 2881577
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,20 @@ import io.r2dbc.spi.Statement
import org.komapper.r2dbc.spi.R2dbcUserDefinedDataType
import kotlin.reflect.KClass

/**
* Rank of a player.
*/
public enum class Rank {
PLAYER,
ADMIN
}

/**
* User-defined data type for [Rank].
* Allows defining the way to store and retrieve [Rank] in the database.
* The class is registered in /src/main/resources/META-INF/services/org.komapper.r2dbc.spi.R2dbcUserDefinedDataType
* @see Rank
*/
public class RankType : R2dbcUserDefinedDataType<Rank> {

override val name: String = "rank"
Expand Down

0 comments on commit 2881577

Please sign in to comment.