Server.subroutes.database

Module Contents

Functions

getConnection()

getResponseDict(→ dict)

This method return the info from a database in a better way, so that the column name is the key and the value is the value.

connect(→ bool)

create_table(→ bool)

listTables(→ str)

add_user(→ bool)

update_user(→ bool)

delete_user(→ bool)

get_user(→ dict)

get_all_users(→ dict)

delete_all_users(→ bool)

Attributes

router

Server.subroutes.database.router
Server.subroutes.database.getConnection()
Server.subroutes.database.getResponseDict(query: str) dict

This method return the info from a database in a better way, so that the column name is the key and the value is the value.

Parameters:

query – The normal SQL query

Returns:

A dictionary with the column name as the key and the value as the value

Server.subroutes.database.connect() bool
Server.subroutes.database.create_table() bool
Server.subroutes.database.listTables() str
Server.subroutes.database.add_user(username: str, password: str) bool
Server.subroutes.database.update_user(username: str, password: str) bool
Server.subroutes.database.delete_user(username: str) bool
Server.subroutes.database.get_user(username: str) dict
Server.subroutes.database.get_all_users() dict
Server.subroutes.database.delete_all_users(you_sure: bool = False) bool