官术网_书友最值得收藏!

Exposed objects

The Messages object provides the mapping between the object and the database and it represents the structure of the table. It is required by the Exposed library:

    /**
* Message table structure
*/
object Messages : Table() {
val id = integer("id").autoIncrement().primaryKey()
val content = text("content")
val location = point("location").nullable()
}

The following is a diagram of the Message class and the Messages object required for the Exposed library:

We have specified our Messages object for Exposed in the Database.kt file. It is recommended to specify all your Exposed objects in a single Kotlin file for easier maintenance. 

主站蜘蛛池模板: 漾濞| 宜春市| 新和县| 苗栗市| 平昌县| 吉木萨尔县| 读书| 蒲江县| 闽清县| 固原市| 光山县| 靖远县| 个旧市| 潜江市| 博爱县| 紫阳县| 高青县| 石首市| 离岛区| 洛川县| 东安县| 鹤峰县| 杭锦后旗| 黄梅县| 泗洪县| 阿克陶县| 平谷区| 彭州市| 杭州市| 新闻| 泌阳县| 张家港市| 正宁县| 自贡市| 磐石市| 德保县| 潍坊市| 印江| 剑河县| 微山县| 澄城县|