UNPKG

pockybot

Version:

Spark bot that handles team recognition

24 lines (23 loc) 1.09 kB
import { DbLocation as DbLocationInterface } from './db-interfaces'; import { UserLocationRow, UserRow } from '../../models/database'; import QueryHandler from './query-handler-interface'; export default class DbLocation implements DbLocationInterface { private readonly sqlGetUserLocation; private readonly sqlGetAllUserLocations; private readonly sqlGetLocations; private readonly sqlGetUsersWithoutLocation; private readonly sqlSetUserLocation; private readonly sqlSetLocation; private readonly sqlDeleteUserLocation; private readonly sqlDeleteLocation; private queryHandler; constructor(queryHandler: QueryHandler); getUserLocation(userid: string): Promise<UserLocationRow>; getAllUserLocations(): Promise<UserLocationRow[]>; getLocations(): Promise<string[]>; getUsersWithoutLocation(): Promise<UserRow[]>; setUserLocation(userid: string, location: string): Promise<void>; setLocation(name: string): Promise<void>; deleteUserLocation(userid: string): Promise<void>; deleteLocation(name: string): Promise<void>; }