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
| Parameter | Type |
|---|---|
name | string | null |
scope | ScopeBlock | null |
options | Record<string, unknown> |
activeRecord | typeof Base |
Returns
AggregateReflection
Inherited from
Properties
activeRecord
readonlyactiveRecord: typeofBase
Defined in: packages/activerecord/lib/reflection.ts:383
Inherited from
name
readonlyname:string
Defined in: packages/activerecord/lib/reflection.ts:381
Inherited from
options
readonlyoptions:Record<string,unknown>
Defined in: packages/activerecord/lib/reflection.ts:382
Inherited from
pluralName
readonlypluralName:string
Defined in: packages/activerecord/lib/reflection.ts:384
Inherited from
Accessors
autosave
Set Signature
set autosave(
value):void
Defined in: packages/activerecord/lib/reflection.ts:416
Parameters
| Parameter | Type |
|---|---|
value | boolean |
Returns
void
Inherited from
chain
Get Signature
get chain():
AbstractReflection[]
Defined in: packages/activerecord/lib/reflection.ts:177
Returns
Inherited from
className
Get Signature
get className():
string
Defined in: packages/activerecord/lib/reflection.ts:132
Returns
string
Inherited from
klass
Get Signature
get klass():
any
Defined in: packages/activerecord/lib/reflection.ts:497
Returns
any
Overrides
macro
Get Signature
get macro():
MacroType
Defined in: packages/activerecord/lib/reflection.ts:489
Returns
MacroType
nameString
Get Signature
get
protectednameString():string
Defined in: packages/activerecord/lib/reflection.ts:402
Returns
string
Inherited from
scope
Get Signature
get scope():
ScopeBlock|null
Defined in: packages/activerecord/lib/reflection.ts:428
Returns
ScopeBlock | null
Inherited from
scopes
Get Signature
get scopes():
ScopeBlock[]
Defined in: packages/activerecord/lib/reflection.ts:141
Returns
ScopeBlock[]
Inherited from
strictLoading
Get Signature
get strictLoading():
boolean
Defined in: packages/activerecord/lib/reflection.ts:149
Returns
boolean
Inherited from
tableName
Get Signature
get tableName():
string|null
Defined in: packages/activerecord/lib/reflection.ts:493
Returns
string | null
Overrides
Methods
_klass()
_klass(
className): typeofBase
Defined in: packages/activerecord/lib/reflection.ts:441
Parameters
| Parameter | Type |
|---|---|
className | string |
Returns
typeof Base
Inherited from
aliasCandidate()
aliasCandidate(
name):string
Defined in: packages/activerecord/lib/reflection.ts:344
Parameters
| Parameter | Type |
|---|---|
name | string |
Returns
string
Inherited from
MacroReflection.aliasCandidate
belongsTo()
belongsTo():
boolean
Defined in: packages/activerecord/lib/reflection.ts:153
Returns
boolean
Inherited from
buildAssociation()
buildAssociation(
attributes?,block?):Base
Defined in: packages/activerecord/lib/reflection.ts:125
Parameters
| Parameter | Type |
|---|---|
attributes | Record<string, unknown> | Map<string, unknown> | PermittedAttributes |
block? | (record) => void |
Returns
Inherited from
MacroReflection.buildAssociation
buildScope()
buildScope(
table?,predicateBuilder?,klass?):any
Defined in: packages/activerecord/lib/reflection.ts:185
Parameters
| Parameter | Type |
|---|---|
table? | Table | TableAlias |
predicateBuilder? | PredicateBuilder |
klass? | typeof Base |
Returns
any
Inherited from
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
Inherited from
MacroReflection.collectJoinChain
computeClass()
computeClass(
name): typeofBase
Defined in: packages/activerecord/lib/reflection.ts:453
Parameters
| Parameter | Type |
|---|---|
name | string |
Returns
typeof Base
Inherited from
constraints()
constraints():
ScopeBlock[]
Defined in: packages/activerecord/lib/reflection.ts:247
Returns
ScopeBlock[]
Inherited from
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
| Parameter | Type |
|---|---|
other | unknown |
Returns
boolean
Inherited from
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
hasOne()
hasOne():
boolean
Defined in: packages/activerecord/lib/reflection.ts:161
Returns
boolean
Inherited from
inverseOf()
inverseOf():
AbstractReflection|null
Defined in: packages/activerecord/lib/reflection.ts:359
Returns
AbstractReflection | null
Inherited from
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
isCollection()
isCollection():
boolean
Defined in: packages/activerecord/lib/reflection.ts:169
Returns
boolean
Inherited from
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
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
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
| Parameter | Type |
|---|---|
table | Table | TableAlias |
foreignTable | Table | TableAlias |
foreignKlass | typeof Base |
Returns
any
Inherited from
joinScopes()
joinScopes(
table,predicateBuilder?,klass?,record?):any[]
Defined in: packages/activerecord/lib/reflection.ts:230
Parameters
| Parameter | Type |
|---|---|
table | Table | TableAlias |
predicateBuilder? | PredicateBuilder |
klass? | typeof Base |
record? | Base |
Returns
any[]
Inherited from
klassJoinScope()
klassJoinScope(
table?,predicateBuilder?):any
Defined in: packages/activerecord/lib/reflection.ts:242
Parameters
| Parameter | Type |
|---|---|
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()
protectedprimaryKey(klass):string|string[]
Defined in: packages/activerecord/lib/reflection.ts:115
Parameters
| Parameter | Type |
|---|---|
klass | typeof Base |
Returns
string | string[]
Inherited from
scopeFor()
scopeFor(
relation,owner?):any
Defined in: packages/activerecord/lib/reflection.ts:457
Parameters
| Parameter | Type | Default value |
|---|---|---|
relation | any | undefined |
owner | any | null |
Returns
any
Inherited from
strictLoadingViolationMessage()
strictLoadingViolationMessage(
owner):string
Defined in: packages/activerecord/lib/reflection.ts:348
Parameters
| Parameter | Type |
|---|---|
owner | unknown |
Returns
string