Skip to main content

Interface: ISessionRepository

Defined in: Data/Repositories/ISessionRepository.ts:8

Interface for Session repository Defines all operations for working with study sessions in the user database

Methods

create()

create(entity): Session

Defined in: Data/Repositories/ISessionRepository.ts:16

Parameters

entity

Session

Returns

Session


delete()

delete(id): boolean

Defined in: Data/Repositories/ISessionRepository.ts:18

Parameters

id

number

Returns

boolean


getAll()

getAll(options?): Session[]

Defined in: Data/Repositories/ISessionRepository.ts:10

Parameters

options?

RepositoryQueryOptions

Returns

Session[]


getAutosaveSession()

getAutosaveSession(): Session | undefined

Defined in: Data/Repositories/ISessionRepository.ts:13

Returns

Session | undefined


getById()

getById(id): Session | undefined

Defined in: Data/Repositories/ISessionRepository.ts:9

Parameters

id

number

Returns

Session | undefined


getByName()

getByName(name): Session | undefined

Defined in: Data/Repositories/ISessionRepository.ts:11

Parameters

name

string

Returns

Session | undefined


getDefaultSession()

getDefaultSession(): Session | undefined

Defined in: Data/Repositories/ISessionRepository.ts:12

Returns

Session | undefined


getRecentSessions()

getRecentSessions(limit?): Session[]

Defined in: Data/Repositories/ISessionRepository.ts:14

Parameters

limit?

number

Returns

Session[]


markSessionOpened()

markSessionOpened(id): void

Defined in: Data/Repositories/ISessionRepository.ts:24

Parameters

id

number

Returns

void


setAsDefault()

setAsDefault(id): boolean

Defined in: Data/Repositories/ISessionRepository.ts:21

Parameters

id

number

Returns

boolean


update()

update(entity): Session

Defined in: Data/Repositories/ISessionRepository.ts:17

Parameters

entity

Session

Returns

Session