Matrix/utils/database/deviceDatabaseConnector.go

30 lines
573 B
Go
Raw Normal View History

2020-09-30 08:28:49 +00:00
package device
import (
"database/sql"
"nutfactory.org/Matrix/entities/device"
)
func initDeviceTable(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 createDevice(db *sql.DB, device *Device) err error {
}
func readDevice(db *sql.DB, id string) (device *Device, err error) {
}
func updateDevice(db *sql.DB, device *Device) err error {
}
func deleteDevice(db *sql.DB, id string) err error {
}