Add Database helper, can save marker in stop table and read it

This commit is contained in:
TiclemFR
2024-07-01 15:01:18 +02:00
parent 998378e9ea
commit 367be18e85
7 changed files with 153 additions and 27 deletions

View 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}"
}