Skip to content

Documentation


Documentation / @blazetrails/activerecord / AggregateReflection

Class: AggregateReflection ​

Defined in: packages/activerecord/lib/reflection.ts:488

Extends ​

Constructors ​

Constructor ​

new AggregateReflection(name, scope, options, activeRecord): AggregateReflection

Defined in: packages/activerecord/lib/reflection.ts:388

Parameters ​

ParameterType
namestring | null
scopeScopeBlock | null
optionsRecord<string, unknown>
activeRecordtypeof Base

Returns ​

AggregateReflection

Inherited from ​

MacroReflection.constructor

Properties ​

activeRecord ​

readonly activeRecord: typeof Base

Defined in: packages/activerecord/lib/reflection.ts:383

Inherited from ​

MacroReflection.activeRecord


name ​

readonly name: string

Defined in: packages/activerecord/lib/reflection.ts:381

Inherited from ​

MacroReflection.name


options ​

readonly options: Record<string, unknown>

Defined in: packages/activerecord/lib/reflection.ts:382

Inherited from ​

MacroReflection.options


pluralName ​

readonly pluralName: string

Defined in: packages/activerecord/lib/reflection.ts:384

Inherited from ​

MacroReflection.pluralName

Accessors ​

autosave ​

Set Signature ​

set autosave(value): void

Defined in: packages/activerecord/lib/reflection.ts:416

Parameters ​
ParameterType
valueboolean
Returns ​

void

Inherited from ​

MacroReflection.autosave


chain ​

Get Signature ​

get chain(): AbstractReflection[]

Defined in: packages/activerecord/lib/reflection.ts:177

Returns ​

AbstractReflection[]

Inherited from ​

MacroReflection.chain


className ​

Get Signature ​

get className(): string

Defined in: packages/activerecord/lib/reflection.ts:132

Returns ​

string

Inherited from ​

MacroReflection.className


klass ​

Get Signature ​

get klass(): any

Defined in: packages/activerecord/lib/reflection.ts:497

Returns ​

any

Overrides ​

MacroReflection.klass


macro ​

Get Signature ​

get macro(): MacroType

Defined in: packages/activerecord/lib/reflection.ts:489

Returns ​

MacroType


nameString ​

Get Signature ​

get protected nameString(): string

Defined in: packages/activerecord/lib/reflection.ts:402

Returns ​

string

Inherited from ​

MacroReflection.nameString


scope ​

Get Signature ​

get scope(): ScopeBlock | null

Defined in: packages/activerecord/lib/reflection.ts:428

Returns ​

ScopeBlock | null

Inherited from ​

MacroReflection.scope


scopes ​

Get Signature ​

get scopes(): ScopeBlock[]

Defined in: packages/activerecord/lib/reflection.ts:141

Returns ​

ScopeBlock[]

Inherited from ​

MacroReflection.scopes


strictLoading ​

Get Signature ​

get strictLoading(): boolean

Defined in: packages/activerecord/lib/reflection.ts:149

Returns ​

boolean

Inherited from ​

MacroReflection.strictLoading


tableName ​

Get Signature ​

get tableName(): string | null

Defined in: packages/activerecord/lib/reflection.ts:493

Returns ​

string | null

Overrides ​

MacroReflection.tableName

Methods ​

_klass() ​

_klass(className): typeof Base

Defined in: packages/activerecord/lib/reflection.ts:441

Parameters ​

ParameterType
classNamestring

Returns ​

typeof Base

Inherited from ​

MacroReflection._klass


aliasCandidate() ​

aliasCandidate(name): string

Defined in: packages/activerecord/lib/reflection.ts:344

Parameters ​

ParameterType
namestring

Returns ​

string

Inherited from ​

MacroReflection.aliasCandidate


belongsTo() ​

belongsTo(): boolean

Defined in: packages/activerecord/lib/reflection.ts:153

Returns ​

boolean

Inherited from ​

MacroReflection.belongsTo


buildAssociation() ​

buildAssociation(attributes?, block?): Base

Defined in: packages/activerecord/lib/reflection.ts:125

Parameters ​

ParameterType
attributesRecord<string, unknown> | Map<string, unknown> | PermittedAttributes
block?(record) => void

Returns ​

Base

Inherited from ​

MacroReflection.buildAssociation


buildScope() ​

buildScope(table?, predicateBuilder?, klass?): any

Defined in: packages/activerecord/lib/reflection.ts:185

Parameters ​

ParameterType
table?Table | TableAlias
predicateBuilder?PredicateBuilder
klass?typeof Base

Returns ​

any

Inherited from ​

MacroReflection.buildScope


checkValidityOfInverseBang() ​

checkValidityOfInverseBang(): void

Defined in: packages/activerecord/lib/reflection.ts:271

Returns ​

void

Inherited from ​

MacroReflection.checkValidityOfInverseBang


collectJoinChain() ​

collectJoinChain(): AbstractReflection[]

Defined in: packages/activerecord/lib/reflection.ts:181

Returns ​

AbstractReflection[]

Inherited from ​

MacroReflection.collectJoinChain


computeClass() ​

computeClass(name): typeof Base

Defined in: packages/activerecord/lib/reflection.ts:453

Parameters ​

ParameterType
namestring

Returns ​

typeof Base

Inherited from ​

MacroReflection.computeClass


constraints() ​

constraints(): ScopeBlock[]

Defined in: packages/activerecord/lib/reflection.ts:247

Returns ​

ScopeBlock[]

Inherited from ​

MacroReflection.constraints


counterCacheColumn() ​

counterCacheColumn(): string | null

Defined in: packages/activerecord/lib/reflection.ts:251

Returns ​

string | null

Inherited from ​

MacroReflection.counterCacheColumn


equals() ​

equals(other): boolean

Defined in: packages/activerecord/lib/reflection.ts:406

Parameters ​

ParameterType
otherunknown

Returns ​

boolean

Inherited from ​

MacroReflection.equals


hasActiveCachedCounter() ​

hasActiveCachedCounter(): boolean

Defined in: packages/activerecord/lib/reflection.ts:328

Returns ​

boolean

Inherited from ​

MacroReflection.hasActiveCachedCounter


hasCachedCounter() ​

hasCachedCounter(): boolean

Defined in: packages/activerecord/lib/reflection.ts:319

Returns ​

boolean

Inherited from ​

MacroReflection.hasCachedCounter


hasInverse() ​

hasInverse(): string | false | null

Defined in: packages/activerecord/lib/reflection.ts:355

Returns ​

string | false | null

Inherited from ​

MacroReflection.hasInverse


hasOne() ​

hasOne(): boolean

Defined in: packages/activerecord/lib/reflection.ts:161

Returns ​

boolean

Inherited from ​

MacroReflection.hasOne


inverseOf() ​

inverseOf(): AbstractReflection | null

Defined in: packages/activerecord/lib/reflection.ts:359

Returns ​

AbstractReflection | null

Inherited from ​

MacroReflection.inverseOf


inverseWhichUpdatesCounterCache() ​

inverseWhichUpdatesCounterCache(): AbstractReflection | null

Defined in: packages/activerecord/lib/reflection.ts:287

Returns ​

AbstractReflection | null

Inherited from ​

MacroReflection.inverseWhichUpdatesCounterCache


isBelongsTo() ​

isBelongsTo(): boolean

Defined in: packages/activerecord/lib/reflection.ts:157

Returns ​

boolean

Inherited from ​

MacroReflection.isBelongsTo


isCollection() ​

isCollection(): boolean

Defined in: packages/activerecord/lib/reflection.ts:169

Returns ​

boolean

Inherited from ​

MacroReflection.isCollection


isCounterMustBeUpdatedByHasMany() ​

isCounterMustBeUpdatedByHasMany(): boolean

Defined in: packages/activerecord/lib/reflection.ts:340

Returns ​

boolean

Inherited from ​

MacroReflection.isCounterMustBeUpdatedByHasMany


isHasOne() ​

isHasOne(): boolean

Defined in: packages/activerecord/lib/reflection.ts:165

Returns ​

boolean

Inherited from ​

MacroReflection.isHasOne


isInverseUpdatesCounterCache() ​

isInverseUpdatesCounterCache(): AbstractReflection | null

Defined in: packages/activerecord/lib/reflection.ts:304

Returns ​

AbstractReflection | null

Inherited from ​

MacroReflection.isInverseUpdatesCounterCache


isInverseUpdatesCounterInMemory() ​

isInverseUpdatesCounterInMemory(): boolean

Defined in: packages/activerecord/lib/reflection.ts:308

Returns ​

boolean

Inherited from ​

MacroReflection.isInverseUpdatesCounterInMemory


isPolymorphic() ​

isPolymorphic(): boolean

Defined in: packages/activerecord/lib/reflection.ts:173

Returns ​

boolean

Inherited from ​

MacroReflection.isPolymorphic


isThroughReflection() ​

isThroughReflection(): boolean

Defined in: packages/activerecord/lib/reflection.ts:111

Returns ​

boolean

Inherited from ​

MacroReflection.isThroughReflection


joinScope() ​

joinScope(table, foreignTable, foreignKlass): any

Defined in: packages/activerecord/lib/reflection.ts:193

Parameters ​

ParameterType
tableTable | TableAlias
foreignTableTable | TableAlias
foreignKlasstypeof Base

Returns ​

any

Inherited from ​

MacroReflection.joinScope


joinScopes() ​

joinScopes(table, predicateBuilder?, klass?, record?): any[]

Defined in: packages/activerecord/lib/reflection.ts:230

Parameters ​

ParameterType
tableTable | TableAlias
predicateBuilder?PredicateBuilder
klass?typeof Base
record?Base

Returns ​

any[]

Inherited from ​

MacroReflection.joinScopes


klassJoinScope() ​

klassJoinScope(table?, predicateBuilder?): any

Defined in: packages/activerecord/lib/reflection.ts:242

Parameters ​

ParameterType
table?Table | TableAlias
predicateBuilder?PredicateBuilder

Returns ​

any

Inherited from ​

MacroReflection.klassJoinScope


mapping() ​

mapping(): [string, string][]

Defined in: packages/activerecord/lib/reflection.ts:502

Returns ​

[string, string][]


primaryKey() ​

protected primaryKey(klass): string | string[]

Defined in: packages/activerecord/lib/reflection.ts:115

Parameters ​

ParameterType
klasstypeof Base

Returns ​

string | string[]

Inherited from ​

MacroReflection.primaryKey


scopeFor() ​

scopeFor(relation, owner?): any

Defined in: packages/activerecord/lib/reflection.ts:457

Parameters ​

ParameterTypeDefault value
relationanyundefined
owneranynull

Returns ​

any

Inherited from ​

MacroReflection.scopeFor


strictLoadingViolationMessage() ​

strictLoadingViolationMessage(owner): string

Defined in: packages/activerecord/lib/reflection.ts:348

Parameters ​

ParameterType
ownerunknown

Returns ​

string

Inherited from ​

MacroReflection.strictLoadingViolationMessage