Add Database helper, can save marker in stop table and read it
This commit is contained in:
18
app/src/main/java/com/example/busroute/Database/Path.kt
Normal file
18
app/src/main/java/com/example/busroute/Database/Path.kt
Normal file
@@ -0,0 +1,18 @@
|
||||
package com.example.busroute.Database
|
||||
|
||||
import android.provider.BaseColumns
|
||||
|
||||
object PathContract {
|
||||
// Table contents are grouped together in an anonymous object.
|
||||
object PathEntry : BaseColumns {
|
||||
const val TABLE_NAME = "path"
|
||||
const val PATH_NAME = "name"
|
||||
}
|
||||
|
||||
const val SQL_CREATE_ENTRIES =
|
||||
"CREATE TABLE ${PathEntry.TABLE_NAME} (" +
|
||||
"${BaseColumns._ID} INTEGER PRIMARY KEY," +
|
||||
"${PathEntry.PATH_NAME} TEXT)"
|
||||
|
||||
const val SQL_DELETE_ENTRIES = "DROP TABLE IF EXISTS ${PathEntry.TABLE_NAME}"
|
||||
}
|
||||
Reference in New Issue
Block a user