29 lines
545 B
Go
29 lines
545 B
Go
package user
|
|
|
|
import (
|
|
"database/sql"
|
|
|
|
"nutfactory.org/Matrix/entities/user"
|
|
)
|
|
|
|
func initUserTable(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 createUser(db *sql.DB, user *User) err error {
|
|
|
|
}
|
|
|
|
func readUser(db *sql.DB id string) (user *User, err error) {
|
|
|
|
}
|
|
|
|
func updateUser(db *sql.DB, user *User) err error {
|
|
|
|
}
|
|
|
|
func deleteUser(db *sql.DB, id string) err error {
|
|
|
|
}
|