- Kotlin Blueprints
- Ashish Belagali Hardik Trivedi Akshay Chordiya
- 106字
- 2021-07-02 21:50:18
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.
推薦閱讀
- Windows系統(tǒng)管理與服務配置
- Mastering Selenium WebDriver
- C語言程序設計(第2版)
- Rake Task Management Essentials
- DevOps入門與實踐
- Corona SDK Mobile Game Development:Beginner's Guide(Second Edition)
- Solr Cookbook(Third Edition)
- Learning Bootstrap 4(Second Edition)
- Getting Started with Electronic Projects
- Java面向?qū)ο蟪绦蛟O計教程
- Apache Solr for Indexing Data
- 從零開始學UI設計·基礎篇
- Building Web and Mobile ArcGIS Server Applications with JavaScript(Second Edition)
- H5頁面設計與制作(全彩慕課版·第2版)
- Access 2010數(shù)據(jù)庫教程(微課版)