29 lines
546 B
Go
29 lines
546 B
Go
package room
|
|
|
|
import (
|
|
"database/sql"
|
|
|
|
"nutfactory.org/Matrix/entities/room"
|
|
)
|
|
|
|
func initRoomTable(db *sql.DB) err error {
|
|
// TODO: Change to correct Table-Structure
|
|
statement, err := db.Prepare("CREATE TABLE IF NOT EXISTS people (id INTEGER PRIMARY KEY, firstname TEXT, lastname TEXT)")
|
|
statement.Exec()
|
|
}
|
|
|
|
func createRoom(db *sql.DB, room *Room) err error {
|
|
|
|
}
|
|
|
|
func readRoom(db *sql.DB, id string) (room *Room, err error) {
|
|
|
|
}
|
|
|
|
func updateRoom(db *sql.DB, room *Room) err error {
|
|
|
|
}
|
|
|
|
func deleteRoom(db *sql.DB, id string) err error {
|
|
|
|
}
|