Skip to main content

Class: UserCommentaryRepository

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

Repository for user commentary collections Provides CRUD operations and queries for user commentary collections

Implements

Constructors

Constructor

new UserCommentaryRepository(sql): UserCommentaryRepository

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

Parameters

sql

ISql

Returns

UserCommentaryRepository

Methods

countNotes()

countNotes(commentaryId): number

Defined in: Data/Repositories/UserCommentaryRepository.ts:97

Count notes in a commentary collection

Parameters

commentaryId

number

Returns

number

Implementation of

IUserCommentaryRepository.countNotes


create()

create(entity): UserCommentary

Defined in: Data/Repositories/UserCommentaryRepository.ts:109

Create a new commentary collection

Parameters

entity

UserCommentary

Returns

UserCommentary

Implementation of

IUserCommentaryRepository.create


delete()

delete(id): boolean

Defined in: Data/Repositories/UserCommentaryRepository.ts:160

Delete a commentary collection

Parameters

id

number

Returns

boolean

Implementation of

IUserCommentaryRepository.delete


getAll()

getAll(options?): UserCommentary[]

Defined in: Data/Repositories/UserCommentaryRepository.ts:35

Get all entities

Parameters

options?

RepositoryQueryOptions

Optional query options (limit, offset, ordering)

Returns

UserCommentary[]

Array of all entities

Implementation of

IUserCommentaryRepository.getAll


getById()

getById(id): UserCommentary | undefined

Defined in: Data/Repositories/UserCommentaryRepository.ts:19

Get a commentary by ID

Parameters

id

number

Returns

UserCommentary | undefined

Implementation of

IUserCommentaryRepository.getById


getByType()

getByType(type): UserCommentary[]

Defined in: Data/Repositories/UserCommentaryRepository.ts:85

Get commentary collections by type (from metadata)

Parameters

type

string

Returns

UserCommentary[]

Implementation of

IUserCommentaryRepository.getByType


getDefault()

getDefault(): UserCommentary | undefined

Defined in: Data/Repositories/UserCommentaryRepository.ts:54

Get the default commentary collection

Returns

UserCommentary | undefined

Implementation of

IUserCommentaryRepository.getDefault


setDefault()

setDefault(id): boolean

Defined in: Data/Repositories/UserCommentaryRepository.ts:67

Set a commentary as the default

Parameters

id

number

Returns

boolean

Implementation of

IUserCommentaryRepository.setDefault


update()

update(entity): UserCommentary

Defined in: Data/Repositories/UserCommentaryRepository.ts:132

Update an existing commentary collection

Parameters

entity

UserCommentary

Returns

UserCommentary

Implementation of

IUserCommentaryRepository.update