Skip to content

Documentation


Documentation / @blazetrails/activerecord / DisableJoinsAssociationRelation

Class: DisableJoinsAssociationRelation<T> ​

Defined in: packages/activerecord/lib/disable-joins-association-relation.ts:11

Extends ​

Type Parameters ​

Type Parameter
T extends Base

Constructors ​

Constructor ​

new DisableJoinsAssociationRelation<T>(klass, key, ids): DisableJoinsAssociationRelation<T>

Defined in: packages/activerecord/lib/disable-joins-association-relation.ts:15

Parameters ​

ParameterType
klasstypeof Base & (attributes?, block?) => T
keystring
idsDjarIds

Returns ​

DisableJoinsAssociationRelation<T>

Overrides ​

Relation.constructor

Properties ​

_selectBang ​

_selectBang: (...args) => Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Parameters ​

ParameterType
...argsunknown[]

Returns ​

Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Inherited from ​

Relation._selectBang


_withIsRecursive ​

_withIsRecursive: boolean = false

Defined in: packages/activerecord/lib/relation.ts:365

Inherited from ​

Relation._withIsRecursive


andBang ​

andBang: (...args) => Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Parameters ​

ParameterType
...args[QueryMethodsHost]

Returns ​

Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Inherited from ​

Relation.andBang


annotateBang ​

annotateBang: (...args) => Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Parameters ​

ParameterType
...argsstring[]

Returns ​

Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Inherited from ​

Relation.annotateBang


annotateValues ​

annotateValues: string[]

Defined in: packages/activerecord/lib/relation.ts:1880

Inherited from ​

Relation.annotateValues


arelColumn ​

arelColumn: (...args) => unknown

Defined in: packages/activerecord/lib/relation/query-methods.ts:1705

Parameters ​

ParameterType
...args[string | number | ArelNode | null, (attr) => unknown]

Returns ​

unknown

Inherited from ​

Relation.arelColumn


arelColumnAliasesFromHash ​

arelColumnAliasesFromHash: (...args) => unknown[]

Defined in: packages/activerecord/lib/relation/query-methods.ts:1721

Parameters ​

ParameterType
...args[Record<string, unknown>]

Returns ​

unknown[]

Inherited from ​

Relation.arelColumnAliasesFromHash


arelColumnWithTable ​

arelColumnWithTable: (...args) => Attribute | SqlLiteral

Defined in: packages/activerecord/lib/relation/query-methods.ts:1704

Parameters ​

ParameterType
...args[string, string]

Returns ​

Attribute | SqlLiteral

Inherited from ​

Relation.arelColumnWithTable


async ​

async: (...args) => Relation<T, boolean>

Parameters ​

ParameterType
...args[]

Returns ​

Relation<T, boolean>

Inherited from ​

Relation.async


asyncBang ​

asyncBang: (...args) => Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Parameters ​

ParameterType
...args[]

Returns ​

Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Inherited from ​

Relation.asyncBang


buildArel ​

buildArel: (...args) => any

Defined in: packages/activerecord/lib/relation/query-methods.ts:1691

Parameters ​

ParameterType
...args[DatabaseAdapter, AliasTracker]

Returns ​

any

Inherited from ​

Relation.buildArel


buildBoundSqlLiteral ​

buildBoundSqlLiteral: (...args) => BoundSqlLiteral

Defined in: packages/activerecord/lib/relation/query-methods.ts:1686

Parameters ​

ParameterType
...args[string, unknown[]]

Returns ​

BoundSqlLiteral

Inherited from ​

Relation.buildBoundSqlLiteral


buildCaseForValuePosition ​

buildCaseForValuePosition: (...args) => Ascending

Defined in: packages/activerecord/lib/relation/query-methods.ts:1717

Parameters ​

ParameterType
...args[unknown, unknown[], { filter?: boolean; }]

Returns ​

Ascending

Inherited from ​

Relation.buildCaseForValuePosition


buildCastValue ​

buildCastValue: { }

Defined in: packages/activerecord/lib/relation/query-methods.ts:1692

Inherited from ​

Relation.buildCastValue


buildExplainClause ​

buildExplainClause: { }

Defined in: packages/activerecord/lib/explain.ts:140

Inherited from ​

Relation.buildExplainClause


buildFrom ​

buildFrom: (...args) => string | ArelNode

Defined in: packages/activerecord/lib/relation/query-methods.ts:1693

Parameters ​

ParameterType
...args[]

Returns ​

string | ArelNode

Inherited from ​

Relation.buildFrom


buildHavingClause ​

readonly buildHavingClause: (...args) => WhereClause = buildWhereClause

Defined in: packages/activerecord/lib/relation/query-methods.ts:1677

Parameters ​

ParameterType
...args[unknown, unknown[]]

Returns ​

WhereClause

Inherited from ​

Relation.buildHavingClause


buildJoinBuckets ​

buildJoinBuckets: (...args) => [Hash<string, unknown[]>, typeof InnerJoin | typeof OuterJoin]

Defined in: packages/activerecord/lib/relation/query-methods.ts:1696

Parameters ​

ParameterType
...args[]

Returns ​

[Hash<string, unknown[]>, typeof InnerJoin | typeof OuterJoin]

Inherited from ​

Relation.buildJoinBuckets


buildJoinDependencies ​

buildJoinDependencies: (...args) => JoinDependency[]

Defined in: packages/activerecord/lib/relation/query-methods.ts:1689

Parameters ​

ParameterType
...args[]

Returns ​

JoinDependency[]

Inherited from ​

Relation.buildJoinDependencies


buildJoins ​

buildJoins: (...args) => any[]

Defined in: packages/activerecord/lib/relation/query-methods.ts:1697

Parameters ​

ParameterType
...args[any[], AliasTracker]

Returns ​

any[]

Inherited from ​

Relation.buildJoins


buildNamedBoundSqlLiteral ​

buildNamedBoundSqlLiteral: (...args) => BoundSqlLiteral

Defined in: packages/activerecord/lib/relation/query-methods.ts:1685

Parameters ​

ParameterType
...args[string, Record<string, unknown>]

Returns ​

BoundSqlLiteral

Inherited from ​

Relation.buildNamedBoundSqlLiteral


buildOrder ​

buildOrder: (...args) => unknown

Defined in: packages/activerecord/lib/relation/query-methods.ts:1709

Parameters ​

ParameterType
...args[any]

Returns ​

unknown

Inherited from ​

Relation.buildOrder


buildSelect ​

buildSelect: (...args) => void

Defined in: packages/activerecord/lib/relation/query-methods.ts:1698

Parameters ​

ParameterType
...args[any]

Returns ​

void

Inherited from ​

Relation.buildSelect


buildSubquery ​

buildSubquery: (...args) => SelectManager

Defined in: packages/activerecord/lib/relation/query-methods.ts:1675

Parameters ​

ParameterType
...args[string | SqlLiteral, unknown]

Returns ​

SelectManager

Inherited from ​

Relation.buildSubquery


buildWhereClause ​

buildWhereClause: (...args) => WhereClause

Defined in: packages/activerecord/lib/relation/query-methods.ts:1676

Parameters ​

ParameterType
...args[unknown, unknown[]]

Returns ​

WhereClause

Inherited from ​

Relation.buildWhereClause


buildWith ​

buildWith: (...args) => SelectManager | undefined

Defined in: packages/activerecord/lib/relation/query-methods.ts:1699

Parameters ​

ParameterType
...args[SelectManager]

Returns ​

SelectManager | undefined

Inherited from ​

Relation.buildWith


buildWithExpressionFromValue ​

buildWithExpressionFromValue: (...args) => unknown

Defined in: packages/activerecord/lib/relation/query-methods.ts:1701

Parameters ​

ParameterType
...args[unknown, boolean]

Returns ​

unknown

Inherited from ​

Relation.buildWithExpressionFromValue


buildWithJoinNode ​

buildWithJoinNode: (...args) => unknown

Defined in: packages/activerecord/lib/relation/query-methods.ts:1702

Parameters ​

ParameterType
...args[string, typeof InnerJoin | typeof OuterJoin]

Returns ​

unknown

Inherited from ​

Relation.buildWithJoinNode


buildWithValueFromHash ​

buildWithValueFromHash: (...args) => TableAlias[]

Defined in: packages/activerecord/lib/relation/query-methods.ts:1700

Parameters ​

ParameterType
...args[Record<string, unknown>]

Returns ​

TableAlias[]

Inherited from ​

Relation.buildWithValueFromHash


collectingQueriesForExplain ​

collectingQueriesForExplain: (fn) => Promise<[string, unknown[]][]>

Defined in: packages/activerecord/lib/explain.ts:137

Parameters ​

ParameterType
fn() => Promise<unknown>

Returns ​

Promise<[string, unknown[]][]>

Inherited from ​

Relation.collectingQueriesForExplain


columnReferences ​

columnReferences: { }

Defined in: packages/activerecord/lib/relation/query-methods.ts:1714

Inherited from ​

Relation.columnReferences


constructJoinDependency ​

constructJoinDependency: (...args) => JoinDependency

Defined in: packages/activerecord/lib/relation/query-methods.ts:1670

Parameters ​

ParameterType
...args[string | AssociationSpec[], unknown]

Returns ​

JoinDependency

Inherited from ​

Relation.constructJoinDependency


createWithBang ​

createWithBang: (...args) => Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Parameters ​

ParameterType
...args[Record<string, unknown> | Map<string, unknown> | null]

Returns ​

Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Inherited from ​

Relation.createWithBang


createWithValue ​

createWithValue: Record<string, unknown>

Defined in: packages/activerecord/lib/relation.ts:1890

Inherited from ​

Relation.createWithValue


distinctBang ​

distinctBang: (...args) => Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Parameters ​

ParameterType
...args[boolean]

Returns ​

Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Inherited from ​

Relation.distinctBang


distinctValue ​

distinctValue: boolean | null

Defined in: packages/activerecord/lib/relation.ts:1889

Inherited from ​

Relation.distinctValue


eachJoinDependencies ​

eachJoinDependencies: (...args) => void

Defined in: packages/activerecord/lib/relation/query-methods.ts:1688

Parameters ​

ParameterType
...args[JoinDependency[], (join) => void]

Returns ​

void

Inherited from ​

Relation.eachJoinDependencies


eagerLoadBang ​

eagerLoadBang: (...args) => Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Parameters ​

ParameterType
...argsAssociationSpec[]

Returns ​

Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Inherited from ​

Relation.eagerLoadBang


eagerLoadValues ​

eagerLoadValues: AssociationSpec[]

Defined in: packages/activerecord/lib/relation.ts:1868

Inherited from ​

Relation.eagerLoadValues


excludingBang ​

excludingBang: (...args) => Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Parameters ​

ParameterType
...args[unknown[]]

Returns ​

Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Inherited from ​

Relation.excludingBang


execExplain ​

execExplain: (...args) => Promise

Defined in: packages/activerecord/lib/explain.ts:138

Parameters ​

ParameterType
...args[[string, unknown[]][], string[]]

Returns ​

Promise

Inherited from ​

Relation.execExplain


extendingBang ​

extendingBang: (...args) => Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Parameters ​

ParameterType
...argsobject[]

Returns ​

Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Inherited from ​

Relation.extendingBang


extendingValues ​

extendingValues: object[]

Defined in: packages/activerecord/lib/relation.ts:1876

Inherited from ​

Relation.extendingValues


extensions ​

readonly extensions: object[]

Defined in: packages/activerecord/lib/relation.ts:1877

Inherited from ​

Relation.extensions


extractTableNameFrom ​

extractTableNameFrom: { }

Defined in: packages/activerecord/lib/relation/query-methods.ts:1715

Inherited from ​

Relation.extractTableNameFrom


flattenedArgs ​

flattenedArgs: { }

Defined in: packages/activerecord/lib/relation/query-methods.ts:1711

Inherited from ​

Relation.flattenedArgs


fromBang ​

fromBang: (...args) => Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Parameters ​

ParameterType
...args[string | QueryMethodsHost | ArelNode, string]

Returns ​

Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Inherited from ​

Relation.fromBang


fromClause ​

fromClause: FromClause

Defined in: packages/activerecord/lib/relation.ts:1894

Inherited from ​

Relation.fromClause


groupBang ​

groupBang: (...args) => QueryMethodsHost

Defined in: packages/activerecord/lib/relation/query-methods.ts:1613

Parameters ​

ParameterType
...args(string | ArelNode)[]

Returns ​

QueryMethodsHost

Inherited from ​

Relation.groupBang


groupValues ​

groupValues: (string | ArelNode)[]

Defined in: packages/activerecord/lib/relation.ts:1871

Inherited from ​

Relation.groupValues


havingBang ​

havingBang: (...args) => Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Parameters ​

ParameterType
...args[string | Record<string, unknown> | Node | SqlLiteral, ...rest: unknown[]]

Returns ​

Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Inherited from ​

Relation.havingBang


havingClause ​

havingClause: WhereClause

Defined in: packages/activerecord/lib/relation.ts:1893

Inherited from ​

Relation.havingClause


includesBang ​

includesBang: (...args) => Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Parameters ​

ParameterType
...argsAssociationSpec[]

Returns ​

Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Inherited from ​

Relation.includesBang


includesValues ​

includesValues: AssociationSpec[]

Defined in: packages/activerecord/lib/relation.ts:1867

Inherited from ​

Relation.includesValues


invertWhereBang ​

invertWhereBang: (...args) => Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Parameters ​

ParameterType
...args[]

Returns ​

Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Inherited from ​

Relation.invertWhereBang


isDoesNotSupportReverse ​

isDoesNotSupportReverse: { }

Defined in: packages/activerecord/lib/relation/query-methods.ts:1708

Inherited from ​

Relation.isDoesNotSupportReverse


isTableNameMatches ​

isTableNameMatches: (...args) => boolean

Defined in: packages/activerecord/lib/relation/query-methods.ts:1706

Parameters ​

ParameterType
...args[unknown]

Returns ​

boolean

Inherited from ​

Relation.isTableNameMatches


joinsBang ​

joinsBang: (...args) => Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Parameters ​

ParameterType
...args(string | Join | JoinDependency)[]

Returns ​

Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Inherited from ​

Relation.joinsBang


joinsValues ​

joinsValues: (AssociationSpec | Join | JoinDependency)[]

Defined in: packages/activerecord/lib/relation.ts:1873

Inherited from ​

Relation.joinsValues


key ​

readonly key: string

Defined in: packages/activerecord/lib/disable-joins-association-relation.ts:12


leftOuterJoinsBang ​

leftOuterJoinsBang: (...args) => Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Parameters ​

ParameterType
...argsAssociationSpec[]

Returns ​

Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Inherited from ​

Relation.leftOuterJoinsBang


leftOuterJoinsValues ​

leftOuterJoinsValues: AssociationSpec[]

Defined in: packages/activerecord/lib/relation.ts:1874

Inherited from ​

Relation.leftOuterJoinsValues


limitBang ​

limitBang: (...args) => Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Parameters ​

ParameterType
...args[string | number | null]

Returns ​

Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Inherited from ​

Relation.limitBang


limitValue ​

limitValue: string | number | null

Defined in: packages/activerecord/lib/relation.ts:1882

Inherited from ​

Relation.limitValue


lockBang ​

lockBang: (...args) => Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Parameters ​

ParameterType
...args[string | boolean | SqlLiteral | null]

Returns ​

Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Inherited from ​

Relation.lockBang


lockValue ​

lockValue: string | boolean | SqlLiteral | null

Defined in: packages/activerecord/lib/relation.ts:1884

Inherited from ​

Relation.lockValue


lookupTableKlassFromJoinDependencies ​

lookupTableKlassFromJoinDependencies: (...args) => unknown

Defined in: packages/activerecord/lib/relation/query-methods.ts:1687

Parameters ​

ParameterType
...args[string]

Returns ​

unknown

Inherited from ​

Relation.lookupTableKlassFromJoinDependencies


noneBang ​

noneBang: (...args) => Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Parameters ​

ParameterType
...args[]

Returns ​

Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Inherited from ​

Relation.noneBang


offsetBang ​

offsetBang: (...args) => Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Parameters ​

ParameterType
...args[string | number | null]

Returns ​

Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Inherited from ​

Relation.offsetBang


offsetValue ​

offsetValue: string | number | null

Defined in: packages/activerecord/lib/relation.ts:1883

Inherited from ​

Relation.offsetValue


optimizerHintsBang ​

optimizerHintsBang: (...args) => Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Parameters ​

ParameterType
...argsstring[]

Returns ​

Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Inherited from ​

Relation.optimizerHintsBang


optimizerHintsValues ​

optimizerHintsValues: string[]

Defined in: packages/activerecord/lib/relation.ts:1879

Inherited from ​

Relation.optimizerHintsValues


orBang ​

orBang: (...args) => Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Parameters ​

ParameterType
...args[QueryMethodsHost]

Returns ​

Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Inherited from ​

Relation.orBang


orderBang ​

orderBang: (...args) => Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Parameters ​

ParameterType
...argsOrderArg[]

Returns ​

Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Inherited from ​

Relation.orderBang


orderColumn ​

orderColumn: (...args) => unknown

Defined in: packages/activerecord/lib/relation/query-methods.ts:1716

Parameters ​

ParameterType
...args[string]

Returns ​

unknown

Inherited from ​

Relation.orderColumn


orderValues ​

orderValues: (string | ArelNode)[]

Defined in: packages/activerecord/lib/relation.ts:1872

Inherited from ​

Relation.orderValues


preloadBang ​

preloadBang: (...args) => Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Parameters ​

ParameterType
...argsAssociationSpec[]

Returns ​

Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Inherited from ​

Relation.preloadBang


preloadValues ​

preloadValues: AssociationSpec[]

Defined in: packages/activerecord/lib/relation.ts:1869

Inherited from ​

Relation.preloadValues


preprocessOrderArgs ​

preprocessOrderArgs: (...args) => void

Defined in: packages/activerecord/lib/relation/query-methods.ts:1712

Parameters ​

ParameterType
...args[unknown[]]

Returns ​

void

Inherited from ​

Relation.preprocessOrderArgs


processSelectArgs ​

processSelectArgs: (...args) => SelectArg[]

Defined in: packages/activerecord/lib/relation/query-methods.ts:1720

Parameters ​

ParameterType
...args[SelectArg[]]

Returns ​

SelectArg[]

Inherited from ​

Relation.processSelectArgs


processWithArgs ​

processWithArgs: (...args) => Record<string, unknown>[]

Defined in: packages/activerecord/lib/relation/query-methods.ts:1722

Parameters ​

ParameterType
...args[unknown[]]

Returns ​

Record<string, unknown>[]

Inherited from ​

Relation.processWithArgs


readonlyBang ​

readonlyBang: (...args) => Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Parameters ​

ParameterType
...args[boolean]

Returns ​

Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Inherited from ​

Relation.readonlyBang


readonlyValue ​

readonlyValue: boolean | null

Defined in: packages/activerecord/lib/relation.ts:1885

Inherited from ​

Relation.readonlyValue


referencesBang ​

referencesBang: (...args) => any

Defined in: packages/activerecord/lib/relation/query-methods.ts:1605

Parameters ​

ParameterType
...args(string | SqlLiteral)[]

Returns ​

any

Inherited from ​

Relation.referencesBang


referencesValues ​

referencesValues: (string | SqlLiteral)[]

Defined in: packages/activerecord/lib/relation.ts:1875

Inherited from ​

Relation.referencesValues


regroupBang ​

regroupBang: (...args) => QueryMethodsHost

Defined in: packages/activerecord/lib/relation/query-methods.ts:1615

Parameters ​

ParameterType
...args(string | ArelNode)[]

Returns ​

QueryMethodsHost

Inherited from ​

Relation.regroupBang


renderBind ​

renderBind: { }

Defined in: packages/activerecord/lib/explain.ts:139

Inherited from ​

Relation.renderBind


reorderBang ​

reorderBang: (...args) => Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Parameters ​

ParameterType
...argsOrderArg[]

Returns ​

Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Inherited from ​

Relation.reorderBang


reorderingValue ​

reorderingValue: boolean | null

Defined in: packages/activerecord/lib/relation.ts:1886

Inherited from ​

Relation.reorderingValue


reselectBang ​

reselectBang: (...args) => Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Parameters ​

ParameterType
...argsSelectArg[]

Returns ​

Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Inherited from ​

Relation.reselectBang


resolveArelAttributes ​

resolveArelAttributes: (...args) => unknown[]

Defined in: packages/activerecord/lib/relation/query-methods.ts:1718

Parameters ​

ParameterType
...args[unknown[]]

Returns ​

unknown[]

Inherited from ​

Relation.resolveArelAttributes


reverseOrderBang ​

reverseOrderBang: (...args) => Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Parameters ​

ParameterType
...args[]

Returns ​

Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Inherited from ​

Relation.reverseOrderBang


reverseOrderValue ​

reverseOrderValue: boolean | null

Defined in: packages/activerecord/lib/relation.ts:1888

Inherited from ​

Relation.reverseOrderValue


reverseSqlOrder ​

reverseSqlOrder: (...args) => unknown[]

Defined in: packages/activerecord/lib/relation/query-methods.ts:1707

Parameters ​

ParameterType
...args[unknown[]]

Returns ​

unknown[]

Inherited from ​

Relation.reverseSqlOrder


sanitizeOrderArguments ​

sanitizeOrderArguments: (...args) => unknown[]

Defined in: packages/activerecord/lib/relation/query-methods.ts:1713

Parameters ​

ParameterType
...args[unknown[]]

Returns ​

unknown[]

Inherited from ​

Relation.sanitizeOrderArguments


selectAssociationList ​

selectAssociationList: (...args) => unknown[]

Defined in: packages/activerecord/lib/relation/query-methods.ts:1695

Parameters ​

ParameterType
...args[unknown[], unknown[] | null, (join) => void]

Returns ​

unknown[]

Inherited from ​

Relation.selectAssociationList


selectNamedJoins ​

selectNamedJoins: (...args) => unknown[]

Defined in: packages/activerecord/lib/relation/query-methods.ts:1694

Parameters ​

ParameterType
...args[unknown[], unknown[] | null, (join) => void]

Returns ​

unknown[]

Inherited from ​

Relation.selectNamedJoins


selectValues ​

selectValues: (string | ArelNode)[]

Defined in: packages/activerecord/lib/relation.ts:1870

Inherited from ​

Relation.selectValues


skipPreloadingBang ​

skipPreloadingBang: (...args) => Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Parameters ​

ParameterType
...args[]

Returns ​

Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Inherited from ​

Relation.skipPreloadingBang


skipPreloadingValue ​

skipPreloadingValue: boolean = false

Defined in: packages/activerecord/lib/relation.ts:368

Inherited from ​

Relation.skipPreloadingValue


skipQueryCacheBang ​

skipQueryCacheBang: (...args) => Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Parameters ​

ParameterType
...args[boolean]

Returns ​

Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Inherited from ​

Relation.skipQueryCacheBang


skipQueryCacheValue ​

skipQueryCacheValue: boolean | null

Defined in: packages/activerecord/lib/relation.ts:1891

Inherited from ​

Relation.skipQueryCacheValue


strictLoadingBang ​

strictLoadingBang: (...args) => Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Parameters ​

ParameterType
...args[boolean]

Returns ​

Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Inherited from ​

Relation.strictLoadingBang


strictLoadingValue ​

strictLoadingValue: boolean | null

Defined in: packages/activerecord/lib/relation.ts:1887

Inherited from ​

Relation.strictLoadingValue


structurallyIncompatibleValuesFor ​

structurallyIncompatibleValuesFor: (...args) => string[]

Defined in: packages/activerecord/lib/relation/query-methods.ts:1723

Parameters ​

ParameterType
...args[QueryMethodsHost]

Returns ​

string[]

Inherited from ​

Relation.structurallyIncompatibleValuesFor


uniqBang ​

uniqBang: (...args) => Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Parameters ​

ParameterType
...args[string]

Returns ​

Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Inherited from ​

Relation.uniqBang


unscopeBang ​

unscopeBang: (...args) => QueryMethodsHost

Defined in: packages/activerecord/lib/relation/query-methods.ts:1622

Parameters ​

ParameterType
...argsUnscopeArg[]

Returns ​

QueryMethodsHost

Inherited from ​

Relation.unscopeBang


unscopeValues ​

unscopeValues: UnscopeArg[]

Defined in: packages/activerecord/lib/relation.ts:1878

Inherited from ​

Relation.unscopeValues


validateOrderArgs ​

validateOrderArgs: (...args) => void

Defined in: packages/activerecord/lib/relation/query-methods.ts:1710

Parameters ​

ParameterType
...args[unknown[]]

Returns ​

void

Inherited from ​

Relation.validateOrderArgs


whereBang ​

whereBang: (...args) => Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Parameters ​

ParameterType
...args[unknown, ...rest: unknown[]]

Returns ​

Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Inherited from ​

Relation.whereBang


whereClause ​

whereClause: WhereClause

Defined in: packages/activerecord/lib/relation.ts:1892

Inherited from ​

Relation.whereClause


withBang ​

withBang: (...args) => Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Parameters ​

ParameterType
...argsWithArg[]

Returns ​

Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Inherited from ​

Relation.withBang


withRecursiveBang ​

withRecursiveBang: (...args) => Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Parameters ​

ParameterType
...argsWithArg[]

Returns ​

Omit<Relation<T, boolean>, "then" | "catch" | "finally">

Inherited from ​

Relation.withRecursiveBang


withValues ​

withValues: Record<string, unknown>[]

Defined in: packages/activerecord/lib/relation.ts:1881

Inherited from ​

Relation.withValues


CLAUSE_METHODS ​

readonly static CLAUSE_METHODS: readonly ["where", "having", "from"]

Defined in: packages/activerecord/lib/relation.ts:354

Inherited from ​

Relation.CLAUSE_METHODS


create ​

static create: (this, model, ...args) => any = _delegationCreate

Defined in: packages/activerecord/lib/relation.ts:320

Parameters ​

ParameterType
thisFamilyCtor
modeltypeof Base
...argsany[]

Returns ​

any

Inherited from ​

Relation.create


INVALID_METHODS_FOR_DELETE_ALL ​

readonly static INVALID_METHODS_FOR_DELETE_ALL: readonly ["distinct", "with", "with_recursive"]

Defined in: packages/activerecord/lib/relation.ts:352

Inherited from ​

Relation.INVALID_METHODS_FOR_DELETE_ALL


MULTI_VALUE_METHODS ​

readonly static MULTI_VALUE_METHODS: readonly ["includes", "eagerLoad", "preload", "select", "group", "order", "joins", "leftOuterJoins", "references", "extending", "unscope", "optimizerHints", "annotate", "with"]

Defined in: packages/activerecord/lib/relation.ts:322

Inherited from ​

Relation.MULTI_VALUE_METHODS


QueryAttribute ​

static QueryAttribute: typeof QueryAttribute

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

Inherited from ​

Relation.QueryAttribute


SINGLE_VALUE_METHODS ​

readonly static SINGLE_VALUE_METHODS: readonly ["limit", "offset", "lock", "readonly", "reordering", "strictLoading", "reverseOrder", "distinct", "createWith", "skipQueryCache"]

Defined in: packages/activerecord/lib/relation.ts:339

Inherited from ​

Relation.SINGLE_VALUE_METHODS


StrictLoadingScope ​

static StrictLoadingScope: typeof StrictLoadingScope

Defined in: packages/activerecord/lib/relation.ts:1321

Inherited from ​

Relation.StrictLoadingScope


VALUE_METHODS ​

readonly static VALUE_METHODS: readonly ValueMethod[]

Defined in: packages/activerecord/lib/relation.ts:356

Inherited from ​

Relation.VALUE_METHODS


WhereClause ​

static WhereClause: typeof WhereClause

Defined in: packages/activerecord/lib/relation.ts:318

Inherited from ​

Relation.WhereClause

Accessors ​

_isRecordsSynchronous ​

Get Signature ​

get _isRecordsSynchronous(): boolean

Defined in: packages/activerecord/lib/relation.ts:490

Returns ​

boolean

Inherited from ​

Relation._isRecordsSynchronous


_records ​

Get Signature ​

get protected _records(): T[]

Defined in: packages/activerecord/lib/relation.ts:372

Returns ​

T[]

Set Signature ​

set protected _records(records): void

Defined in: packages/activerecord/lib/relation.ts:376

Parameters ​
ParameterType
recordsT[]
Returns ​

void

Inherited from ​

Relation._records


connection ​

Get Signature ​

get connection(): DatabaseAdapter

Defined in: packages/activerecord/lib/relation.ts:2177

Returns ​

DatabaseAdapter

Inherited from ​

Relation.connection


hasLimitOrOffset ​

Get Signature ​

get hasLimitOrOffset(): boolean

Defined in: packages/activerecord/lib/relation.ts:1568

Returns ​

boolean

Inherited from ​

Relation.hasLimitOrOffset


isEagerLoading ​

Get Signature ​

get isEagerLoading(): boolean

Defined in: packages/activerecord/lib/relation.ts:1542

Returns ​

boolean

Inherited from ​

Relation.isEagerLoading


isEmptyScope ​

Get Signature ​

get isEmptyScope(): boolean

Defined in: packages/activerecord/lib/relation.ts:1564

Returns ​

boolean

Inherited from ​

Relation.isEmptyScope


isLoaded ​

Get Signature ​

get isLoaded(): boolean

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

Returns ​

boolean

Inherited from ​

Relation.isLoaded


isLocked ​

Get Signature ​

get isLocked(): string | boolean | SqlLiteral | null

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

Returns ​

string | boolean | SqlLiteral | null

Inherited from ​

Relation.isLocked


isReadonly ​

Get Signature ​

get isReadonly(): boolean | null

Defined in: packages/activerecord/lib/relation.ts:449

Returns ​

boolean | null

Inherited from ​

Relation.isReadonly


isScheduled ​

Get Signature ​

get isScheduled(): boolean

Defined in: packages/activerecord/lib/relation.ts:1538

Returns ​

boolean

Inherited from ​

Relation.isScheduled


joinedIncludesValues ​

Get Signature ​

get joinedIncludesValues(): AssociationSpec[]

Defined in: packages/activerecord/lib/relation.ts:1549

Returns ​

AssociationSpec[]

Inherited from ​

Relation.joinedIncludesValues


klass ​

Get Signature ​

get klass(): typeof Base & (attributes?, block?) => T

Defined in: packages/activerecord/lib/relation.ts:1513

Returns ​

typeof Base & (attributes?, block?) => T

Inherited from ​

Relation.klass


loaded ​

Get Signature ​

get loaded(): boolean

Defined in: packages/activerecord/lib/relation.ts:1517

Returns ​

boolean

Inherited from ​

Relation.loaded


model ​

Get Signature ​

get model(): typeof Base & (attributes?, block?) => T

Defined in: packages/activerecord/lib/relation.ts:1509

Returns ​

typeof Base & (attributes?, block?) => T

Inherited from ​

Relation.model


name ​

Get Signature ​

get name(): RelationName

Defined in: packages/activerecord/lib/relation.ts:2180

Returns ​

RelationName

Inherited from ​

Relation.name


predicateBuilder ​

Get Signature ​

get predicateBuilder(): PredicateBuilder

Defined in: packages/activerecord/lib/relation.ts:1534

Returns ​

PredicateBuilder

Inherited from ​

Relation.predicateBuilder


primaryKey ​

Get Signature ​

get primaryKey(): string | string[]

Defined in: packages/activerecord/lib/relation.ts:2178

Returns ​

string | string[]

Inherited from ​

Relation.primaryKey


table ​

Get Signature ​

get table(): Table

Defined in: packages/activerecord/lib/relation.ts:1505

Returns ​

Table

Inherited from ​

Relation.table


tableName ​

Get Signature ​

get tableName(): string

Defined in: packages/activerecord/lib/relation.ts:2179

Returns ​

string

Inherited from ​

Relation.tableName

Methods ​

_create() ​

protected _create(attributes, block?): Promise<T>

Defined in: packages/activerecord/lib/relation.ts:1770

Parameters ​

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

Returns ​

Promise<T>

Inherited from ​

Relation._create


_createBang() ​

protected _createBang(attributes, block?): Promise<T>

Defined in: packages/activerecord/lib/relation.ts:1777

Parameters ​

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

Returns ​

Promise<T>

Inherited from ​

Relation._createBang


_execScope() ​

_execScope(...args): unknown

Defined in: packages/activerecord/lib/relation.ts:1729

Parameters ​

ParameterType
...argsunknown[]

Returns ​

unknown

Inherited from ​

Relation._execScope


_new() ​

protected _new(attributes, block?): T

Defined in: packages/activerecord/lib/relation.ts:1763

Parameters ​

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

Returns ​

T

Inherited from ​

Relation._new


[asyncIterator]() ​

[asyncIterator](): AsyncIterableIterator<T>

Defined in: packages/activerecord/lib/relation.ts:828

Returns ​

AsyncIterableIterator<T>

No Rails Equivalent ​

PERMANENT

Inherited from ​

Relation.[asyncIterator]


[iterator]() ​

[iterator](): IterableIterator<T>

Defined in: packages/activerecord/lib/relation.ts:2145

Returns ​

IterableIterator<T>

Inherited from ​

Relation.[iterator]


aliasTracker() ​

aliasTracker(joins?, aliases?): AliasTracker

Defined in: packages/activerecord/lib/relation.ts:1572

Parameters ​

ParameterTypeDefault value
joinsNode[][]
aliases?Hash<string, number>undefined

Returns ​

AliasTracker

Inherited from ​

Relation.aliasTracker


all() ​

all(): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2012

Returns ​

Relation<T, boolean>

Inherited from ​

Relation.all


and() ​

and(other): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2067

Parameters ​

ParameterType
otherRelation<T, boolean>

Returns ​

Relation<T, boolean>

Inherited from ​

Relation.and


annotate() ​

annotate(...args): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2010

Parameters ​

ParameterType
...argsstring[]

Returns ​

Relation<T, boolean>

Inherited from ​

Relation.annotate


arel() ​

arel(aliases?): SelectManager

Defined in: packages/activerecord/lib/relation.ts:2033

Parameters ​

ParameterType
aliases?AliasTracker

Returns ​

SelectManager

Inherited from ​

Relation.arel


asJson() ​

asJson(options?): Promise<unknown[]>

Defined in: packages/activerecord/lib/relation.ts:2173

Parameters ​

ParameterType
options?SerializeOptions

Returns ​

Promise<unknown[]>

Inherited from ​

Relation.asJson


asyncAverage() ​

asyncAverage(columnName): Promise<unknown>

Defined in: packages/activerecord/lib/relation/calculations.ts:581

Parameters ​

ParameterType
columnNamestring | ArelNode

Returns ​

Promise<unknown>

Inherited from ​

Relation.asyncAverage


asyncCount() ​

asyncCount(columnName?): Promise<number | Map<unknown, number>>

Defined in: packages/activerecord/lib/relation/calculations.ts:577

Parameters ​

ParameterType
columnName?string

Returns ​

Promise<number | Map<unknown, number>>

Inherited from ​

Relation.asyncCount


asyncIds() ​

asyncIds(): Promise<unknown[]>

Defined in: packages/activerecord/lib/relation/calculations.ts:625

Returns ​

Promise<unknown[]>

Inherited from ​

Relation.asyncIds


asyncMaximum() ​

asyncMaximum(columnName): Promise<unknown>

Defined in: packages/activerecord/lib/relation/calculations.ts:583

Parameters ​

ParameterType
columnNamestring | ArelNode

Returns ​

Promise<unknown>

Inherited from ​

Relation.asyncMaximum


asyncMinimum() ​

asyncMinimum(columnName): Promise<unknown>

Defined in: packages/activerecord/lib/relation/calculations.ts:582

Parameters ​

ParameterType
columnNamestring | ArelNode

Returns ​

Promise<unknown>

Inherited from ​

Relation.asyncMinimum


asyncPick() ​

asyncPick(...columnNames): Promise<unknown>

Defined in: packages/activerecord/lib/relation/calculations.ts:614

Parameters ​

ParameterType
...columnNames(string | string[] | Attribute | SqlLiteral | NamedFunction | Record<string, string | string[]>)[]

Returns ​

Promise<unknown>

Inherited from ​

Relation.asyncPick


asyncPluck() ​

asyncPluck(...columns): Promise<unknown[]>

Defined in: packages/activerecord/lib/relation/calculations.ts:594

Parameters ​

ParameterType
...columns(string | string[] | Attribute | SqlLiteral | NamedFunction | Record<string, string | string[]>)[]

Returns ​

Promise<unknown[]>

Inherited from ​

Relation.asyncPluck


asyncSum() ​

asyncSum(identityOrColumn?): Promise<number | bigint | Map<unknown, number | bigint>>

Defined in: packages/activerecord/lib/relation/calculations.ts:578

Parameters ​

ParameterType
identityOrColumn?string | number | ArelNode | null

Returns ​

Promise<number | bigint | Map<unknown, number | bigint>>

Inherited from ​

Relation.asyncSum


at() ​

at(index, length?): Promise<T | T[] | null>

Defined in: packages/activerecord/lib/relation.ts:2155

Parameters ​

ParameterType
indexnumber | Range<number>
length?number

Returns ​

Promise<T | T[] | null>

Inherited from ​

Relation.at


average() ​

average(column): Promise<unknown>

Defined in: packages/activerecord/lib/relation/calculations.ts:574

Parameters ​

ParameterType
columnstring | ArelNode

Returns ​

Promise<unknown>

Inherited from ​

Relation.average


bindAttribute() ​

bindAttribute<R>(name, value, block): R

Defined in: packages/activerecord/lib/relation.ts:1581

Type Parameters ​

Type Parameter
R

Parameters ​

ParameterType
namestring
valueunknown
block(attr, bind) => R

Returns ​

R

Inherited from ​

Relation.bindAttribute


build() ​

Call Signature ​

build(attributes, block?): T[]

Defined in: packages/activerecord/lib/relation.ts:542

Parameters ​
ParameterType
attributesRecord<string, unknown>[]
block?(r) => void
Returns ​

T[]

Inherited from ​

Relation.build

Call Signature ​

build(attributes?, block?): T

Defined in: packages/activerecord/lib/relation.ts:543

Parameters ​
ParameterType
attributes?Record<string, unknown> | PermittedAttributes
block?(r) => void
Returns ​

T

Inherited from ​

Relation.build


cacheKey() ​

cacheKey(timestampColumn?): Promise<string>

Defined in: packages/activerecord/lib/relation.ts:1627

Parameters ​

ParameterTypeDefault value
timestampColumnstring"updated_at"

Returns ​

Promise<string>

Inherited from ​

Relation.cacheKey


cacheKeyWithVersion() ​

cacheKeyWithVersion(): Promise<string>

Defined in: packages/activerecord/lib/relation.ts:1710

Returns ​

Promise<string>

Inherited from ​

Relation.cacheKeyWithVersion


cacheVersion() ​

cacheVersion(timestampColumn?): Promise<string | null>

Defined in: packages/activerecord/lib/relation.ts:1647

Parameters ​

ParameterTypeDefault value
timestampColumnstring"updated_at"

Returns ​

Promise<string | null>

Inherited from ​

Relation.cacheVersion


calculate() ​

Call Signature ​

calculate(operation, column?): Promise<number | Map<unknown, number>>

Defined in: packages/activerecord/lib/relation/calculations.ts:555

Parameters ​
ParameterType
operation"count"
column?string
Returns ​

Promise<number | Map<unknown, number>>

Inherited from ​

Relation.calculate

Call Signature ​

calculate(operation, column): Promise<number | bigint | Map<unknown, number | bigint>>

Defined in: packages/activerecord/lib/relation/calculations.ts:556

Parameters ​
ParameterType
operation"sum"
columnstring | number | ArelNode | null
Returns ​

Promise<number | bigint | Map<unknown, number | bigint>>

Inherited from ​

Relation.calculate

Call Signature ​

calculate(operation, column): Promise<unknown>

Defined in: packages/activerecord/lib/relation/calculations.ts:560

Parameters ​
ParameterType
operation"minimum" | "maximum" | "average"
columnstring
Returns ​

Promise<unknown>

Inherited from ​

Relation.calculate

Call Signature ​

calculate(operation, column?): Promise<unknown>

Defined in: packages/activerecord/lib/relation/calculations.ts:564

Parameters ​
ParameterType
operationstring
column?string | number | ArelNode | null
Returns ​

Promise<unknown>

Inherited from ​

Relation.calculate


catch() ​

catch<TResult>(onrejected?): Promise<T[] | TResult>

Defined in: packages/activerecord/lib/relation.ts:1857

Type Parameters ​

Type ParameterDefault type
TResultnever

Parameters ​

ParameterType
onrejected?((reason) => TResult | PromiseLike<TResult>) | null

Returns ​

Promise<T[] | TResult>

No Rails Equivalent ​

PERMANENT

Inherited from ​

Relation.catch


clone() ​

clone(): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:1725

Returns ​

Relation<T, boolean>

Inherited from ​

Relation.clone


compact() ​

compact(): Promise<T[]>

Defined in: packages/activerecord/lib/relation.ts:2163

Returns ​

Promise<T[]>

Inherited from ​

Relation.compact


compactBlank() ​

compactBlank(): Promise<T[]>

Defined in: packages/activerecord/lib/relation.ts:684

Returns ​

Promise<T[]>

Inherited from ​

Relation.compactBlank


count() ​

count(column?, block?): Promise<number | Map<unknown, number>>

Defined in: packages/activerecord/lib/relation/calculations.ts:565

Parameters ​

ParameterType
column?string | ArelNode | CountBlock | null
block?CountBlock

Returns ​

Promise<number | Map<unknown, number>>

Inherited from ​

Relation.count


create() ​

Call Signature ​

create(attributes, block?): Promise<T[]>

Defined in: packages/activerecord/lib/relation.ts:562

Parameters ​
ParameterType
attributesRecord<string, unknown>[]
block?(r) => void
Returns ​

Promise<T[]>

Inherited from ​

Relation.create

Call Signature ​

create(attributes?, block?): Promise<T>

Defined in: packages/activerecord/lib/relation.ts:563

Parameters ​
ParameterType
attributes?Record<string, unknown> | PermittedAttributes
block?(r) => void
Returns ​

Promise<T>

Inherited from ​

Relation.create


createBang() ​

Call Signature ​

createBang(attributes, block?): Promise<T[]>

Defined in: packages/activerecord/lib/relation.ts:582

Parameters ​
ParameterType
attributesRecord<string, unknown>[]
block?(r) => void
Returns ​

Promise<T[]>

Inherited from ​

Relation.createBang

Call Signature ​

createBang(attributes?, block?): Promise<T>

Defined in: packages/activerecord/lib/relation.ts:583

Parameters ​
ParameterType
attributes?Record<string, unknown> | PermittedAttributes
block?(r) => void
Returns ​

Promise<T>

Inherited from ​

Relation.createBang


createOrFindBy() ​

createOrFindBy(attributes, block?): Promise<T | undefined>

Defined in: packages/activerecord/lib/relation.ts:933

Parameters ​

ParameterType
attributesRecord<string, unknown>
block?(r) => void

Returns ​

Promise<T | undefined>

Inherited from ​

Relation.createOrFindBy


createOrFindByBang() ​

createOrFindByBang(attributes, block?): Promise<T | undefined>

Defined in: packages/activerecord/lib/relation.ts:958

Parameters ​

ParameterType
attributesRecord<string, unknown>
block?(r) => void

Returns ​

Promise<T | undefined>

Inherited from ​

Relation.createOrFindByBang


createWith() ​

createWith(value): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2000

Parameters ​

ParameterType
valueRecord<string, unknown> | Map<string, unknown> | null

Returns ​

Relation<T, boolean>

Inherited from ​

Relation.createWith


delete() ​

delete(idOrArray): Promise<number>

Defined in: packages/activerecord/lib/relation.ts:1455

Parameters ​

ParameterType
idOrArrayunknown

Returns ​

Promise<number>

Inherited from ​

Relation.delete


deleteAll() ​

deleteAll(): Promise<number>

Defined in: packages/activerecord/lib/relation.ts:883

Returns ​

Promise<number>

Inherited from ​

Relation.deleteAll


deleteBy() ​

deleteBy(args?): Promise<number>

Defined in: packages/activerecord/lib/relation.ts:1483

Parameters ​

ParameterType
argsRecord<string, unknown>

Returns ​

Promise<number>

Inherited from ​

Relation.deleteBy


destroy() ​

destroy(id): Promise<T | T[]>

Defined in: packages/activerecord/lib/relation.ts:1461

Parameters ​

ParameterType
idunknown

Returns ​

Promise<T | T[]>

Inherited from ​

Relation.destroy


destroyAll() ​

destroyAll(): Promise<T[]>

Defined in: packages/activerecord/lib/relation.ts:874

Returns ​

Promise<T[]>

Inherited from ​

Relation.destroyAll


destroyBy() ​

destroyBy(args?): Promise<T[]>

Defined in: packages/activerecord/lib/relation.ts:1479

Parameters ​

ParameterType
argsRecord<string, unknown>

Returns ​

Promise<T[]>

Inherited from ​

Relation.destroyBy


detect() ​

detect(fn): Promise<T | undefined>

Defined in: packages/activerecord/lib/relation.ts:662

Parameters ​

ParameterType
fn(record) => unknown

Returns ​

Promise<T | undefined>

Inherited from ​

Relation.detect


difference() ​

difference(other): Promise<T[]>

Defined in: packages/activerecord/lib/relation.ts:2159

Parameters ​

ParameterType
otherT[]

Returns ​

Promise<T[]>

Inherited from ​

Relation.difference


distinct() ​

distinct(value?): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2080

Parameters ​

ParameterType
value?boolean

Returns ​

Relation<T, boolean>

Inherited from ​

Relation.distinct


drop() ​

drop(n): T[] | Promise<T[]>

Defined in: packages/activerecord/lib/relation.ts:2148

Parameters ​

ParameterType
nnumber

Returns ​

T[] | Promise<T[]>

Inherited from ​

Relation.drop


each() ​

each(fn): Promise<T[]>

Defined in: packages/activerecord/lib/relation.ts:2153

Parameters ​

ParameterType
fn(record, index) => unknown

Returns ​

Promise<T[]>

Inherited from ​

Relation.each


eagerLoad() ​

eagerLoad(...args): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2013

Parameters ​

ParameterType
...argsAssociationSpec[]

Returns ​

Relation<T, boolean>

Inherited from ​

Relation.eagerLoad


encodeWith() ​

encodeWith(coder): void

Defined in: packages/activerecord/lib/relation.ts:608

Parameters ​

ParameterType
coderCoder

Returns ​

void

Inherited from ​

Relation.encodeWith


equals() ​

equals(other): Promise<boolean | undefined>

Defined in: packages/activerecord/lib/relation.ts:1487

Parameters ​

ParameterType
otherunknown

Returns ​

Promise<boolean | undefined>

Inherited from ​

Relation.equals


except() ​

except<A>(...skips): Relation<T, string extends A[number] ? boolean : "group" extends A[number] ? false : boolean>

Defined in: packages/activerecord/lib/relation.ts:2088

Type Parameters ​

Type Parameter
A extends ExceptSkip[]

Parameters ​

ParameterType
...skipsA

Returns ​

Relation<T, string extends A[number] ? boolean : "group" extends A[number] ? false : boolean>

Inherited from ​

Relation.except


excluding() ​

excluding(...records): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2069

Parameters ​

ParameterType
...recordsunknown[]

Returns ​

Relation<T, boolean>

Inherited from ​

Relation.excluding


explain() ​

explain(...options): ExplainProxy<T>

Defined in: packages/activerecord/lib/relation.ts:835

Parameters ​

ParameterType
...optionsstring[]

Returns ​

ExplainProxy<T>

Inherited from ​

Relation.explain


extending() ​

Call Signature ​

extending<M>(mod): Relation<T, boolean> & M

Defined in: packages/activerecord/lib/relation.ts:2002

Type Parameters ​
Type Parameter
M extends Record<string, (...args) => unknown>
Parameters ​
ParameterType
modM
Returns ​

Relation<T, boolean> & M

Inherited from ​

Relation.extending

Call Signature ​

extending<M>(mod): Relation<T, boolean> & Partial<M>

Defined in: packages/activerecord/lib/relation.ts:2003

Type Parameters ​
Type Parameter
M extends Record<string, (...args) => unknown>
Parameters ​
ParameterType
modM | undefined
Returns ​

Relation<T, boolean> & Partial<M>

Inherited from ​

Relation.extending

Call Signature ​

extending(...modules): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2006

Parameters ​
ParameterType
...modulesobject[]
Returns ​

Relation<T, boolean>

Inherited from ​

Relation.extending

Call Signature ​

extending(block): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2007

Parameters ​
ParameterType
block(mod) => void
Returns ​

Relation<T, boolean>

Inherited from ​

Relation.extending

Call Signature ​

extending(): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2008

Returns ​

Relation<T, boolean>

Inherited from ​

Relation.extending


extractAssociated() ​

extractAssociated(association): Promise<Base[]>

Defined in: packages/activerecord/lib/relation.ts:2015

Parameters ​

ParameterType
associationstring

Returns ​

Promise<Base[]>

Inherited from ​

Relation.extractAssociated


fifth() ​

fifth(): Promise<T | null>

Defined in: packages/activerecord/lib/relation.ts:1968

Returns ​

Promise<T | null>

Inherited from ​

Relation.fifth


fifthBang() ​

fifthBang(): Promise<T>

Defined in: packages/activerecord/lib/relation.ts:1975

Returns ​

Promise<T>

Inherited from ​

Relation.fifthBang


finally() ​

finally(onfinally?): Promise<T[]>

Defined in: packages/activerecord/lib/relation.ts:1861

Parameters ​

ParameterType
onfinally?(() => void) | null

Returns ​

Promise<T[]>

No Rails Equivalent ​

PERMANENT

Inherited from ​

Relation.finally


find() ​

Call Signature ​

find(block): Promise<T | null>

Defined in: packages/activerecord/lib/relation.ts:1947

Parameters ​
ParameterType
block(record) => unknown
Returns ​

Promise<T | null>

Inherited from ​

Relation.find

Call Signature ​

find(ids): Promise<T[]>

Defined in: packages/activerecord/lib/relation.ts:1948

Parameters ​
ParameterType
idsunknown[]
Returns ​

Promise<T[]>

Inherited from ​

Relation.find

Call Signature ​

find(id): Promise<T>

Defined in: packages/activerecord/lib/relation.ts:1949

Parameters ​
ParameterType
idunknown
Returns ​

Promise<T>

Inherited from ​

Relation.find

Call Signature ​

find(...ids): Promise<T | T[]>

Defined in: packages/activerecord/lib/relation.ts:1950

Parameters ​
ParameterType
...idsunknown[]
Returns ​

Promise<T | T[]>

Inherited from ​

Relation.find


findAll() ​

findAll(block): T[] | Promise<T[]>

Defined in: packages/activerecord/lib/relation.ts:2147

Parameters ​

ParameterType
block(record) => unknown

Returns ​

T[] | Promise<T[]>

Inherited from ​

Relation.findAll


findBy() ​

Call Signature ​

findBy(arg): Promise<T | null>

Defined in: packages/activerecord/lib/relation.ts:1951

Parameters ​
ParameterType
argRecord<string, unknown>
Returns ​

Promise<T | null>

Inherited from ​

Relation.findBy

Call Signature ​

findBy(arg): Promise<T | null>

Defined in: packages/activerecord/lib/relation.ts:1952

Parameters ​
ParameterType
argMap<unknown, unknown>
Returns ​

Promise<T | null>

Inherited from ​

Relation.findBy


findByBang() ​

findByBang(arg): Promise<T>

Defined in: packages/activerecord/lib/relation.ts:1953

Parameters ​

ParameterType
argRecord<string, unknown>

Returns ​

Promise<T>

Inherited from ​

Relation.findByBang


findByTokenFor() ​

findByTokenFor(...args): Promise

Defined in: packages/activerecord/lib/token-for.ts:76

Parameters ​

ParameterType
...args[string, string]

Returns ​

Promise

Inherited from ​

Relation.findByTokenFor


findByTokenForBang() ​

findByTokenForBang(...args): Promise

Defined in: packages/activerecord/lib/token-for.ts:84

Parameters ​

ParameterType
...args[string, string]

Returns ​

Promise

Inherited from ​

Relation.findByTokenForBang


findEach() ​

Call Signature ​

findEach(opts, block): Promise<null>

Defined in: packages/activerecord/lib/relation.ts:2133

Parameters ​
ParameterType
optsFindEachOptions
block(record) => void | Promise<void>
Returns ​

Promise<null>

Inherited from ​

Relation.findEach

Call Signature ​

findEach(opts?): AsyncGenerator<T, any, any> & { size: Promise<number>; }

Defined in: packages/activerecord/lib/relation.ts:2134

Parameters ​
ParameterType
opts?FindEachOptions
Returns ​

AsyncGenerator<T, any, any> & { size: Promise<number>; }

Inherited from ​

Relation.findEach


findInBatches() ​

Call Signature ​

findInBatches(opts, block): Promise<null>

Defined in: packages/activerecord/lib/relation.ts:2135

Parameters ​
ParameterType
optsFindEachOptions
block(batch) => void | Promise<void>
Returns ​

Promise<null>

Inherited from ​

Relation.findInBatches

Call Signature ​

findInBatches(opts?): AsyncGenerator<T[], any, any> & { size: Promise<number>; }

Defined in: packages/activerecord/lib/relation.ts:2136

Parameters ​
ParameterType
opts?FindEachOptions
Returns ​

AsyncGenerator<T[], any, any> & { size: Promise<number>; }

Inherited from ​

Relation.findInBatches


findOrCreateBy() ​

findOrCreateBy(attributes, block?): Promise<T | undefined>

Defined in: packages/activerecord/lib/relation.ts:919

Parameters ​

ParameterType
attributesRecord<string, unknown>
block?(r) => void

Returns ​

Promise<T | undefined>

Inherited from ​

Relation.findOrCreateBy


findOrCreateByBang() ​

findOrCreateByBang(attributes, block?): Promise<T | undefined>

Defined in: packages/activerecord/lib/relation.ts:926

Parameters ​

ParameterType
attributesRecord<string, unknown>
block?(r) => void

Returns ​

Promise<T | undefined>

Inherited from ​

Relation.findOrCreateByBang


findOrInitializeBy() ​

findOrInitializeBy(attributes, block?): Promise<T>

Defined in: packages/activerecord/lib/relation.ts:983

Parameters ​

ParameterType
attributesRecord<string, unknown>
block?(r) => void | Promise<void>

Returns ​

Promise<T>

Inherited from ​

Relation.findOrInitializeBy


findSigned() ​

findSigned(...args): Promise

Defined in: packages/activerecord/lib/signed-id.ts:87

Parameters ​

ParameterType
...args[string, { purpose?: string; }]

Returns ​

Promise

Inherited from ​

Relation.findSigned


findSignedBang() ​

findSignedBang(...args): Promise

Defined in: packages/activerecord/lib/signed-id.ts:94

Parameters ​

ParameterType
...args[string, { purpose?: string; }]

Returns ​

Promise

Inherited from ​

Relation.findSignedBang


findSoleBy() ​

findSoleBy(...conditions): Promise<T>

Defined in: packages/activerecord/lib/relation.ts:1954

Parameters ​

ParameterType
...conditionsunknown[]

Returns ​

Promise<T>

Inherited from ​

Relation.findSoleBy


first() ​

Call Signature ​

first(): Promise<T | null>

Defined in: packages/activerecord/lib/disable-joins-association-relation.ts:32

Returns ​

Promise<T | null>

Missing Rails Call ​

limit — PERMANENT

Overrides ​

Relation.first

Call Signature ​

first(n): Promise<T[]>

Defined in: packages/activerecord/lib/disable-joins-association-relation.ts:33

Parameters ​
ParameterType
nnumber
Returns ​

Promise<T[]>

Missing Rails Call ​

limit — PERMANENT

Overrides ​

Relation.first


firstBang() ​

firstBang(): Promise<T>

Defined in: packages/activerecord/lib/relation.ts:1957

Returns ​

Promise<T>

Inherited from ​

Relation.firstBang


firstOrCreate() ​

firstOrCreate(attributes?, block?): Promise<T>

Defined in: packages/activerecord/lib/relation.ts:993

Parameters ​

ParameterType
attributes?Record<string, unknown>
block?(r) => void

Returns ​

Promise<T>

Inherited from ​

Relation.firstOrCreate


firstOrCreateBang() ​

firstOrCreateBang(attributes?, block?): Promise<T>

Defined in: packages/activerecord/lib/relation.ts:997

Parameters ​

ParameterType
attributes?Record<string, unknown>
block?(r) => void

Returns ​

Promise<T>

Inherited from ​

Relation.firstOrCreateBang


firstOrInitialize() ​

firstOrInitialize(attributes?, block?): Promise<T>

Defined in: packages/activerecord/lib/relation.ts:1004

Parameters ​

ParameterType
attributes?Record<string, unknown>
block?(r) => void | Promise<void>

Returns ​

Promise<T>

Inherited from ​

Relation.firstOrInitialize


fortyTwo() ​

fortyTwo(): Promise<T | null>

Defined in: packages/activerecord/lib/relation.ts:1969

Returns ​

Promise<T | null>

Inherited from ​

Relation.fortyTwo


fortyTwoBang() ​

fortyTwoBang(): Promise<T>

Defined in: packages/activerecord/lib/relation.ts:1976

Returns ​

Promise<T>

Inherited from ​

Relation.fortyTwoBang


fourth() ​

fourth(): Promise<T | null>

Defined in: packages/activerecord/lib/relation.ts:1967

Returns ​

Promise<T | null>

Inherited from ​

Relation.fourth


fourthBang() ​

fourthBang(): Promise<T>

Defined in: packages/activerecord/lib/relation.ts:1974

Returns ​

Promise<T>

Inherited from ​

Relation.fourthBang


from() ​

from(value, subqueryName?): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2001

Parameters ​

ParameterType
valuestring | ArelNode | Relation<any, boolean>
subqueryName?string

Returns ​

Relation<T, boolean>

Inherited from ​

Relation.from


group() ​

group(...args): Relation<T, true>

Defined in: packages/activerecord/lib/relation.ts:2052

Parameters ​

ParameterType
...args(string | ArelNode)[]

Returns ​

Relation<T, true>

Inherited from ​

Relation.group


groupBy() ​

groupBy<K>(fn): Promise<Hash<K, T[]>>

Defined in: packages/activerecord/lib/relation.ts:674

Type Parameters ​

Type Parameter
K

Parameters ​

ParameterType
fn(record) => K

Returns ​

Promise<Hash<K, T[]>>

Inherited from ​

Relation.groupBy


having() ​

Call Signature ​

having(condition, ...binds): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2071

Parameters ​
ParameterType
conditionstring | SqlLiteral
...bindsunknown[]
Returns ​

Relation<T, boolean>

Inherited from ​

Relation.having

Call Signature ​

having(condition): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2072

Parameters ​
ParameterType
conditionRecord<string, unknown>
Returns ​

Relation<T, boolean>

Inherited from ​

Relation.having

Call Signature ​

having(condition): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2073

Parameters ​
ParameterType
conditionNode
Returns ​

Relation<T, boolean>

Inherited from ​

Relation.having

Call Signature ​

having(condition, ...binds): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2074

Parameters ​
ParameterType
conditionstring | Record<string, unknown> | Node | SqlLiteral
...bindsunknown[]
Returns ​

Relation<T, boolean>

Inherited from ​

Relation.having


ids() ​

ids(): Promise<unknown[]>

Defined in: packages/activerecord/lib/disable-joins-association-relation.ts:21

Returns ​

Promise<unknown[]>

Overrides ​

Relation.ids


inBatches() ​

Call Signature ​

inBatches(opts, block): Promise<null>

Defined in: packages/activerecord/lib/relation.ts:2137

Parameters ​
ParameterType
optsInBatchesOptions
block(relation) => void | Promise<void>
Returns ​

Promise<null>

Inherited from ​

Relation.inBatches

Call Signature ​

inBatches(opts?): BatchEnumerator<LoadedRelation<Relation<T, boolean>>>

Defined in: packages/activerecord/lib/relation.ts:2141

Parameters ​
ParameterType
opts?InBatchesOptions
Returns ​

BatchEnumerator<LoadedRelation<Relation<T, boolean>>>

Inherited from ​

Relation.inBatches


includes() ​

includes(...args): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2011

Parameters ​

ParameterType
...argsAssociationSpec[]

Returns ​

Relation<T, boolean>

Inherited from ​

Relation.includes


index() ​

index(valueOrFn): Promise<number | null>

Defined in: packages/activerecord/lib/relation.ts:2164

Parameters ​

ParameterType
valueOrFnT | ((record) => unknown)

Returns ​

Promise<number | null>

Inherited from ​

Relation.index


indexBy() ​

Call Signature ​

indexBy<K>(fn): Promise<Record<K, T>>

Defined in: packages/activerecord/lib/relation.ts:678

Type Parameters ​
Type Parameter
K extends string
Parameters ​
ParameterType
fn(record) => K
Returns ​

Promise<Record<K, T>>

Inherited from ​

Relation.indexBy

Call Signature ​

indexBy<K>(fn): Promise<Hash<K, T>>

Defined in: packages/activerecord/lib/relation.ts:679

Type Parameters ​
Type Parameter
K
Parameters ​
ParameterType
fn(record) => K
Returns ​

Promise<Hash<K, T>>

Inherited from ​

Relation.indexBy


inGroups() ​

inGroups(number, fillWith?): Promise<(false | T | null)[][]>

Defined in: packages/activerecord/lib/relation.ts:2170

Parameters ​

ParameterType
numbernumber
fillWith?false | T | null

Returns ​

Promise<(false | T | null)[][]>

Inherited from ​

Relation.inGroups


inGroupsOf() ​

inGroupsOf(number, fillWith?): Promise<(false | T | null)[][]>

Defined in: packages/activerecord/lib/relation.ts:2171

Parameters ​

ParameterType
numbernumber
fillWith?false | T | null

Returns ​

Promise<(false | T | null)[][]>

Inherited from ​

Relation.inGroupsOf


initializeCopy() ​

initializeCopy(other): this

Defined in: packages/activerecord/lib/relation.ts:1718

Parameters ​

ParameterType
otherRelation<T, boolean>

Returns ​

this

Inherited from ​

Relation.initializeCopy


inOrderOf() ​

inOrderOf(column, values, filter?): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2055

Parameters ​

ParameterType
columnstring | ArelNode
valuesunknown[]
filter?boolean

Returns ​

Relation<T, boolean>

Inherited from ​

Relation.inOrderOf


insert() ​

insert(attributes, options?): Promise<Result>

Defined in: packages/activerecord/lib/relation.ts:1394

Parameters ​

ParameterType
attributesRecord<string, unknown>
options?{ returning?: false | SqlLiteral | `:${string}` | `:${string}`[]; uniqueBy?: string | string[]; }
options.returning?false | SqlLiteral | `:${string}` | `:${string}`[]
options.uniqueBy?string | string[]

Returns ​

Promise<Result>

Inherited from ​

Relation.insert


insertAll() ​

insertAll(attributes, options?): Promise<Result>

Defined in: packages/activerecord/lib/relation.ts:1014

Parameters ​

ParameterType
attributesRecord<string, unknown>[]
options?{ recordTimestamps?: boolean; returning?: false | SqlLiteral | `:${string}` | `:${string}`[]; uniqueBy?: string | string[]; }
options.recordTimestamps?boolean
options.returning?false | SqlLiteral | `:${string}` | `:${string}`[]
options.uniqueBy?string | string[]

Returns ​

Promise<Result>

Inherited from ​

Relation.insertAll


insertAllBang() ​

insertAllBang(attributes, options?): Promise<Result>

Defined in: packages/activerecord/lib/relation.ts:1408

Parameters ​

ParameterType
attributesRecord<string, unknown>[]
options?Pick<InsertAllOptions, "recordTimestamps" | "returning">

Returns ​

Promise<Result>

Inherited from ​

Relation.insertAllBang


insertBang() ​

insertBang(attributes, options?): Promise<Result>

Defined in: packages/activerecord/lib/relation.ts:1401

Parameters ​

ParameterType
attributesRecord<string, unknown>
options?Pick<InsertAllOptions, "recordTimestamps" | "returning">

Returns ​

Promise<Result>

Inherited from ​

Relation.insertBang


inspect() ​

inspect(): string | Promise<string>

Defined in: packages/activerecord/lib/relation.ts:417

Returns ​

string | Promise<string>

Inherited from ​

Relation.inspect


intersection() ​

intersection(other): Promise<T[]>

Defined in: packages/activerecord/lib/relation.ts:2156

Parameters ​

ParameterType
otherT[]

Returns ​

Promise<T[]>

Inherited from ​

Relation.intersection


invertWhere() ​

invertWhere(): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2065

Returns ​

Relation<T, boolean>

Inherited from ​

Relation.invertWhere


isAny() ​

isAny(...args): Promise<boolean>

Defined in: packages/activerecord/lib/relation.ts:627

Parameters ​

ParameterType
...argsEnumerablePattern<T>[]

Returns ​

Promise<boolean>

Inherited from ​

Relation.isAny


isBlank() ​

isBlank(): Promise<boolean>

Defined in: packages/activerecord/lib/relation.ts:658

Returns ​

Promise<boolean>

Inherited from ​

Relation.isBlank


isEmpty() ​

isEmpty(): Promise<boolean>

Defined in: packages/activerecord/lib/relation.ts:617

Returns ​

Promise<boolean>

Inherited from ​

Relation.isEmpty


isExclude() ​

isExclude(object): Promise<boolean>

Defined in: packages/activerecord/lib/relation.ts:688

Parameters ​

ParameterType
objectT

Returns ​

Promise<boolean>

Inherited from ​

Relation.isExclude


isExists() ​

isExists(conditions?): Promise<boolean>

Defined in: packages/activerecord/lib/relation.ts:1979

Parameters ​

ParameterType
conditions?unknown

Returns ​

Promise<boolean>

Inherited from ​

Relation.isExists


isInclude() ​

isInclude(record): Promise<boolean>

Defined in: packages/activerecord/lib/relation.ts:1980

Parameters ​

ParameterType
recordT

Returns ​

Promise<boolean>

Inherited from ​

Relation.isInclude


isIntersect() ​

isIntersect(other): Promise<boolean>

Defined in: packages/activerecord/lib/relation.ts:2161

Parameters ​

ParameterType
otherT[]

Returns ​

Promise<boolean>

Inherited from ​

Relation.isIntersect


isMany() ​

isMany(predicate?): Promise<boolean>

Defined in: packages/activerecord/lib/relation.ts:638

Parameters ​

ParameterType
predicate?(record) => boolean

Returns ​

Promise<boolean>

Inherited from ​

Relation.isMany


isMember() ​

isMember(record): Promise<boolean>

Defined in: packages/activerecord/lib/relation.ts:1981

Parameters ​

ParameterType
recordT

Returns ​

Promise<boolean>

Inherited from ​

Relation.isMember


isNone() ​

isNone(...args): Promise<boolean>

Defined in: packages/activerecord/lib/relation.ts:1521

Parameters ​

ParameterType
...argsEnumerablePattern<T>[]

Returns ​

Promise<boolean>

Inherited from ​

Relation.isNone


isNullRelation() ​

isNullRelation(): boolean

Defined in: packages/activerecord/lib/relation.ts:1851

Returns ​

boolean

Inherited from ​

Relation.isNullRelation


isOne() ​

isOne(...args): Promise<boolean>

Defined in: packages/activerecord/lib/relation.ts:646

Parameters ​

ParameterType
...argsEnumerablePattern<T>[]

Returns ​

Promise<boolean>

Inherited from ​

Relation.isOne


isStructurallyCompatible() ​

isStructurallyCompatible(other): boolean

Defined in: packages/activerecord/lib/relation.ts:2066

Parameters ​

ParameterType
otherRelation<T, boolean>

Returns ​

boolean

Inherited from ​

Relation.isStructurallyCompatible


join() ​

join(separator?): Promise<string>

Defined in: packages/activerecord/lib/relation.ts:2154

Parameters ​

ParameterType
separator?string

Returns ​

Promise<string>

Inherited from ​

Relation.join


joins() ​

Call Signature ​

joins(...nodes): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2027

Parameters ​
ParameterType
...nodesJoin[]
Returns ​

Relation<T, boolean>

Inherited from ​

Relation.joins

Call Signature ​

joins(specArray): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2028

Parameters ​
ParameterType
specArrayJoinSpec[]
Returns ​

Relation<T, boolean>

Inherited from ​

Relation.joins

Call Signature ​

joins(hashSpec): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2029

Parameters ​
ParameterType
hashSpecRecord<string, AssociationSpec | AssociationSpec[]>
Returns ​

Relation<T, boolean>

Inherited from ​

Relation.joins

Call Signature ​

joins(...args): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2030

Parameters ​
ParameterType
...argsJoinSpec[]
Returns ​

Relation<T, boolean>

Inherited from ​

Relation.joins


last() ​

Call Signature ​

last(): Promise<T | null>

Defined in: packages/activerecord/lib/relation.ts:1958

Returns ​

Promise<T | null>

Inherited from ​

Relation.last

Call Signature ​

last(n): Promise<T[]>

Defined in: packages/activerecord/lib/relation.ts:1959

Parameters ​
ParameterType
nnumber
Returns ​

Promise<T[]>

Inherited from ​

Relation.last


lastBang() ​

lastBang(): Promise<T>

Defined in: packages/activerecord/lib/relation.ts:1960

Returns ​

Promise<T>

Inherited from ​

Relation.lastBang


leftJoins() ​

leftJoins(...args): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2032

Parameters ​

ParameterType
...args(AssociationSpec | AssociationSpec[])[]

Returns ​

Relation<T, boolean>

Inherited from ​

Relation.leftJoins


leftOuterJoins() ​

leftOuterJoins(...args): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2031

Parameters ​

ParameterType
...args(AssociationSpec | AssociationSpec[])[]

Returns ​

Relation<T, boolean>

Inherited from ​

Relation.leftOuterJoins


length() ​

length(): Promise<number>

Defined in: packages/activerecord/lib/relation.ts:2152

Returns ​

Promise<number>

Inherited from ​

Relation.length


limit() ​

limit(value): Promise<T[]>

Defined in: packages/activerecord/lib/disable-joins-association-relation.ts:26

Parameters ​

ParameterType
valuenumber | null

Returns ​

Promise<T[]>

Overrides ​

Relation.limit


load() ​

load(block?): Promise<LoadedRelation<DisableJoinsAssociationRelation<T>>>

Defined in: packages/activerecord/lib/disable-joins-association-relation.ts:43

Parameters ​

ParameterType
block?(record) => void

Returns ​

Promise<LoadedRelation<DisableJoinsAssociationRelation<T>>>

Overrides ​

Relation.load


loadAsync() ​

loadAsync(): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:499

Returns ​

Relation<T, boolean>

Invented Arm ​

synchronize — CONVERGEABLE load-async-null-executor-arm-floats-its-load-under-the-adapter-lock

Invented Arm ​

if — CONVERGEABLE load-async-null-executor-arm-floats-its-load-under-the-adapter-lock

Invented Arm ​

_loadSerializedAttributes — PERMANENT

Inherited from ​

Relation.loadAsync


loadRecords() ​

protected loadRecords(records): void

Defined in: packages/activerecord/lib/relation.ts:1740

Parameters ​

ParameterType
recordsT[]

Returns ​

void

Inherited from ​

Relation.loadRecords


lock() ​

lock(locks?): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:1992

Parameters ​

ParameterType
locks?string | boolean | SqlLiteral | null

Returns ​

Relation<T, boolean>

Inherited from ​

Relation.lock


map() ​

map<R>(block): R[] | Promise<R[]>

Defined in: packages/activerecord/lib/relation.ts:2146

Type Parameters ​

Type Parameter
R

Parameters ​

ParameterType
block(record) => R

Returns ​

R[] | Promise<R[]>

Inherited from ​

Relation.map


maximum() ​

Call Signature ​

maximum<K>(columnName): Promise<T[K] | Map<unknown, T[K]> | null>

Defined in: packages/activerecord/lib/relation.ts:1993

Type Parameters ​
Type Parameter
K extends string
Parameters ​
ParameterType
columnNameK
Returns ​

Promise<T[K] | Map<unknown, T[K]> | null>

Inherited from ​

Relation.maximum

Call Signature ​

maximum(columnName): Promise<unknown>

Defined in: packages/activerecord/lib/relation.ts:1996

Parameters ​
ParameterType
columnNamestring | ArelNode
Returns ​

Promise<unknown>

Inherited from ​

Relation.maximum


merge() ​

Call Signature ​

merge<U, H>(other): Relation<T, [H] extends [true] ? true : boolean | H>

Defined in: packages/activerecord/lib/relation.ts:2083

Type Parameters ​
Type Parameter
U extends Base
H extends boolean
Parameters ​
ParameterType
otherRelation<U, H>
Returns ​

Relation<T, [H] extends [true] ? true : boolean | H>

Inherited from ​

Relation.merge

Call Signature ​

merge(other): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2086

Parameters ​
ParameterType
otherPartial<Record<ValueMethod, unknown>>
Returns ​

Relation<T, boolean>

Inherited from ​

Relation.merge


mergeBang() ​

mergeBang(other): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2087

Parameters ​

ParameterType
otherany

Returns ​

Relation<T, boolean>

Inherited from ​

Relation.mergeBang


minimum() ​

minimum(column): Promise<unknown>

Defined in: packages/activerecord/lib/relation/calculations.ts:575

Parameters ​

ParameterType
columnstring | ArelNode

Returns ​

Promise<unknown>

Inherited from ​

Relation.minimum


new() ​

Call Signature ​

new(attrs, block?): T[]

Defined in: packages/activerecord/lib/relation.ts:1346

Parameters ​
ParameterType
attrsRecord<string, unknown>[]
block?(r) => void
Returns ​

T[]

Inherited from ​

Relation.new

Call Signature ​

new(attrs?, block?): T

Defined in: packages/activerecord/lib/relation.ts:1347

Parameters ​
ParameterType
attrs?Record<string, unknown> | PermittedAttributes
block?(r) => void
Returns ​

T

Inherited from ​

Relation.new


none() ​

none(): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:1997

Returns ​

Relation<T, boolean>

Inherited from ​

Relation.none


offset() ​

offset(value): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2079

Parameters ​

ParameterType
valuestring | number | null

Returns ​

Relation<T, boolean>

Inherited from ​

Relation.offset


only() ​

only<A>(...onlies): Relation<T, string extends A[number] ? boolean : "group" extends A[number] ? boolean : false>

Defined in: packages/activerecord/lib/relation.ts:2091

Type Parameters ​

Type Parameter
A extends ExceptSkip[]

Parameters ​

ParameterType
...onliesA

Returns ​

Relation<T, string extends A[number] ? boolean : "group" extends A[number] ? boolean : false>

Inherited from ​

Relation.only


optimizerHints() ​

optimizerHints(...args): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2009

Parameters ​

ParameterType
...argsstring[]

Returns ​

Relation<T, boolean>

Inherited from ​

Relation.optimizerHints


or() ​

or(other): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2068

Parameters ​

ParameterType
otherRelation<T, boolean>

Returns ​

Relation<T, boolean>

Inherited from ​

Relation.or


order() ​

order(...args): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2054

Parameters ​

ParameterType
...argsOrderArg[]

Returns ​

Relation<T, boolean>

Inherited from ​

Relation.order


pick() ​

pick(...columnNames): Promise<unknown>

Defined in: packages/activerecord/lib/relation/calculations.ts:604

Parameters ​

ParameterType
...columnNames(string | string[] | Attribute | SqlLiteral | NamedFunction | Record<string, string | string[]>)[]

Returns ​

Promise<unknown>

Inherited from ​

Relation.pick


pluck() ​

Call Signature ​

pluck<K>(column): Promise<T[K][]>

Defined in: packages/activerecord/lib/relation.ts:1942

Type Parameters ​
Type Parameter
K extends string
Parameters ​
ParameterType
columnK
Returns ​

Promise<T[K][]>

Inherited from ​

Relation.pluck

Call Signature ​

pluck<K>(...columns): Promise<PluckedRow<T, K>[]>

Defined in: packages/activerecord/lib/relation.ts:1943

Type Parameters ​
Type Parameter
K extends [PluckColumn<T>, PluckColumn<T>, ...PluckColumn<T>[]]
Parameters ​
ParameterType
...columnsK
Returns ​

Promise<PluckedRow<T, K>[]>

Inherited from ​

Relation.pluck

Call Signature ​

pluck(...columns): Promise<unknown[]>

Defined in: packages/activerecord/lib/relation.ts:1946

Parameters ​
ParameterType
...columns(string | string[] | Attribute | SqlLiteral | NamedFunction | Record<string, string | string[]>)[]
Returns ​

Promise<unknown[]>

Inherited from ​

Relation.pluck


plus() ​

plus(other): Promise<T[]>

Defined in: packages/activerecord/lib/relation.ts:2158

Parameters ​

ParameterType
otherT[]

Returns ​

Promise<T[]>

Inherited from ​

Relation.plus


preload() ​

preload(...args): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2014

Parameters ​

ParameterType
...argsAssociationSpec[]

Returns ​

Relation<T, boolean>

Inherited from ​

Relation.preload


preloadAssociations() ​

preloadAssociations(records): Promise<void>

Defined in: packages/activerecord/lib/relation.ts:1331

Parameters ​

ParameterType
recordsT[]

Returns ​

Promise<void>

Inherited from ​

Relation.preloadAssociations


prettyPrint() ​

prettyPrint(pp): Promise<void>

Defined in: packages/activerecord/lib/relation.ts:438

Parameters ​

ParameterType
ppPP

Returns ​

Promise<void>

Inherited from ​

Relation.prettyPrint


raiseRecordNotFoundExceptionBang() ​

raiseRecordNotFoundExceptionBang(ids?, resultSize?, expectedSize?, key?, notFoundIds?): never

Defined in: packages/activerecord/lib/relation.ts:1982

Parameters ​

ParameterType
ids?unknown
resultSize?number
expectedSize?number
key?string | string[]
notFoundIds?unknown[]

Returns ​

never

Inherited from ​

Relation.raiseRecordNotFoundExceptionBang


readonly() ​

readonly(value?): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:1998

Parameters ​

ParameterType
value?boolean

Returns ​

Relation<T, boolean>

Inherited from ​

Relation.readonly


records() ​

records(): Promise<T[]>

Defined in: packages/activerecord/lib/relation.ts:485

Returns ​

Promise<T[]>

Inherited from ​

Relation.records


references() ​

references(...tableNames): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2016

Parameters ​

ParameterType
...tableNames(string | SqlLiteral)[]

Returns ​

Relation<T, boolean>

Inherited from ​

Relation.references


regroup() ​

regroup(...args): Relation<T, true>

Defined in: packages/activerecord/lib/relation.ts:2053

Parameters ​

ParameterType
...argsstring[]

Returns ​

Relation<T, true>

Inherited from ​

Relation.regroup


reject() ​

reject(fn): Promise<T[]>

Defined in: packages/activerecord/lib/relation.ts:666

Parameters ​

ParameterType
fn(record) => boolean

Returns ​

Promise<T[]>

Inherited from ​

Relation.reject


reload() ​

reload(): Promise<LoadedRelation<DisableJoinsAssociationRelation<T>>>

Defined in: packages/activerecord/lib/relation.ts:479

Returns ​

Promise<LoadedRelation<DisableJoinsAssociationRelation<T>>>

Inherited from ​

Relation.reload


reorder() ​

reorder(...args): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2056

Parameters ​

ParameterType
...argsOrderArg[]

Returns ​

Relation<T, boolean>

Inherited from ​

Relation.reorder


reselect() ​

reselect(...args): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2049

Parameters ​

ParameterType
...args(string | Record<string, unknown> | ArelNode | readonly string | ArelNode[])[]

Returns ​

Relation<T, boolean>

Inherited from ​

Relation.reselect


reset() ​

reset(): this

Defined in: packages/activerecord/lib/relation.ts:461

Returns ​

this

Inherited from ​

Relation.reset


reverse() ​

reverse(): Promise<T[]>

Defined in: packages/activerecord/lib/relation.ts:2162

Returns ​

Promise<T[]>

Inherited from ​

Relation.reverse


reverseOrder() ​

reverseOrder(): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2081

Returns ​

Relation<T, boolean>

Inherited from ​

Relation.reverseOrder


rewhere() ​

rewhere(conditions): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2064

Parameters ​

ParameterType
conditionsRecord<string, unknown> | Map<string, unknown> | null

Returns ​

Relation<T, boolean>

Inherited from ​

Relation.rewhere


rindex() ​

rindex(valueOrFn): Promise<number | null>

Defined in: packages/activerecord/lib/relation.ts:2165

Parameters ​

ParameterType
valueOrFnT | ((record) => unknown)

Returns ​

Promise<number | null>

Inherited from ​

Relation.rindex


rotate() ​

rotate(count?): Promise<T[]>

Defined in: packages/activerecord/lib/relation.ts:2167

Parameters ​

ParameterType
count?number

Returns ​

Promise<T[]>

Inherited from ​

Relation.rotate


sample() ​

sample(n?): Promise<T | T[] | null>

Defined in: packages/activerecord/lib/relation.ts:2166

Parameters ​

ParameterType
n?number

Returns ​

Promise<T | T[] | null>

Inherited from ​

Relation.sample


sanitizeSqlLike() ​

sanitizeSqlLike(value, escapeChar?): string

Defined in: packages/activerecord/lib/relation.ts:2189

Parameters ​

ParameterType
valuestring
escapeChar?string

Returns ​

string

Inherited from ​

Relation.sanitizeSqlLike


scopeForCreate() ​

scopeForCreate(): Record<string, unknown>

Defined in: packages/activerecord/lib/relation.ts:1049

Returns ​

Record<string, unknown>

Inherited from ​

Relation.scopeForCreate


scoping() ​

Call Signature ​

scoping<R>(callback): R

Defined in: packages/activerecord/lib/relation.ts:1601

Type Parameters ​
Type Parameter
R
Parameters ​
ParameterType
callback() => R
Returns ​

R

Inherited from ​

Relation.scoping

Call Signature ​

scoping<R>(options, callback): R

Defined in: packages/activerecord/lib/relation.ts:1602

Type Parameters ​
Type Parameter
R
Parameters ​
ParameterType
options{ allQueries?: boolean | null; }
options.allQueries?boolean | null
callback() => R
Returns ​

R

Inherited from ​

Relation.scoping


second() ​

second(): Promise<T | null>

Defined in: packages/activerecord/lib/relation.ts:1965

Returns ​

Promise<T | null>

Inherited from ​

Relation.second


secondBang() ​

secondBang(): Promise<T>

Defined in: packages/activerecord/lib/relation.ts:1972

Returns ​

Promise<T>

Inherited from ​

Relation.secondBang


secondToLast() ​

secondToLast(): Promise<T | null>

Defined in: packages/activerecord/lib/relation.ts:1970

Returns ​

Promise<T | null>

Inherited from ​

Relation.secondToLast


secondToLastBang() ​

secondToLastBang(): Promise<T>

Defined in: packages/activerecord/lib/relation.ts:1977

Returns ​

Promise<T>

Inherited from ​

Relation.secondToLastBang


select() ​

Call Signature ​

select(fn): Promise<T[]>

Defined in: packages/activerecord/lib/relation.ts:2047

Parameters ​
ParameterType
fn(record) => boolean
Returns ​

Promise<T[]>

Inherited from ​

Relation.select

Call Signature ​

select(...fields): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2048

Parameters ​
ParameterType
...fieldsSelectArg[]
Returns ​

Relation<T, boolean>

Inherited from ​

Relation.select


shuffle() ​

shuffle(): Promise<T[]>

Defined in: packages/activerecord/lib/relation.ts:2168

Returns ​

Promise<T[]>

Inherited from ​

Relation.shuffle


size() ​

size(): Promise<number>

Defined in: packages/activerecord/lib/relation.ts:612

Returns ​

Promise<number>

Inherited from ​

Relation.size


slice() ​

slice(index, length?): T | T[] | Promise<T | T[] | null> | null

Defined in: packages/activerecord/lib/relation.ts:2160

Parameters ​

ParameterType
indexnumber | Range<number>
length?number

Returns ​

T | T[] | Promise<T | T[] | null> | null

Inherited from ​

Relation.slice


sole() ​

sole(): Promise<T>

Defined in: packages/activerecord/lib/relation.ts:1961

Returns ​

Promise<T>

Inherited from ​

Relation.sole


sortBy() ​

sortBy(key): Promise<T[]>

Defined in: packages/activerecord/lib/relation.ts:670

Parameters ​

ParameterType
key(record) => any

Returns ​

Promise<T[]>

Inherited from ​

Relation.sortBy


spawn() ​

spawn(): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2082

Returns ​

Relation<T, boolean>

Inherited from ​

Relation.spawn


split() ​

split(valueOrFn): Promise<T[][]>

Defined in: packages/activerecord/lib/relation.ts:2169

Parameters ​

ParameterType
valueOrFnT | ((record) => boolean)

Returns ​

Promise<T[][]>

Inherited from ​

Relation.split


strictLoading() ​

strictLoading(value?): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:1999

Parameters ​

ParameterType
value?boolean

Returns ​

Relation<T, boolean>

Inherited from ​

Relation.strictLoading


sum() ​

Call Signature ​

sum(block): Promise<number | bigint>

Defined in: packages/activerecord/lib/relation/calculations.ts:569

Parameters ​
ParameterType
blockSumBlock
Returns ​

Promise<number | bigint>

Inherited from ​

Relation.sum

Call Signature ​

sum(initialValue, block): Promise<number | bigint>

Defined in: packages/activerecord/lib/relation/calculations.ts:570

Parameters ​
ParameterType
initialValuestring | number
blockSumBlock
Returns ​

Promise<number | bigint>

Inherited from ​

Relation.sum

Call Signature ​

sum(initialValueOrColumn?): Promise<number | bigint | Map<unknown, number | bigint>>

Defined in: packages/activerecord/lib/relation/calculations.ts:571

Parameters ​
ParameterType
initialValueOrColumn?string | number | ArelNode | null
Returns ​

Promise<number | bigint | Map<unknown, number | bigint>>

Inherited from ​

Relation.sum


take() ​

Call Signature ​

take(): Promise<T | null>

Defined in: packages/activerecord/lib/relation.ts:1962

Returns ​

Promise<T | null>

Inherited from ​

Relation.take

Call Signature ​

take(limit): Promise<T[]>

Defined in: packages/activerecord/lib/relation.ts:1963

Parameters ​
ParameterType
limitnumber
Returns ​

Promise<T[]>

Inherited from ​

Relation.take


takeBang() ​

takeBang(): Promise<T>

Defined in: packages/activerecord/lib/relation.ts:1964

Returns ​

Promise<T>

Inherited from ​

Relation.takeBang


then() ​

then<TResult1, TResult2>(onfulfilled?, onrejected?): Promise<TResult1 | TResult2>

Defined in: packages/activerecord/lib/relation.ts:1852

Type Parameters ​

Type ParameterDefault type
TResult1T[]
TResult2never

Parameters ​

ParameterType
onfulfilled?((value) => TResult1 | PromiseLike<TResult1>) | null
onrejected?((reason) => TResult2 | PromiseLike<TResult2>) | null

Returns ​

Promise<TResult1 | TResult2>

Inherited from ​

Relation.then


third() ​

third(): Promise<T | null>

Defined in: packages/activerecord/lib/relation.ts:1966

Returns ​

Promise<T | null>

Inherited from ​

Relation.third


thirdBang() ​

thirdBang(): Promise<T>

Defined in: packages/activerecord/lib/relation.ts:1973

Returns ​

Promise<T>

Inherited from ​

Relation.thirdBang


thirdToLast() ​

thirdToLast(): Promise<T | null>

Defined in: packages/activerecord/lib/relation.ts:1971

Returns ​

Promise<T | null>

Inherited from ​

Relation.thirdToLast


thirdToLastBang() ​

thirdToLastBang(): Promise<T>

Defined in: packages/activerecord/lib/relation.ts:1978

Returns ​

Promise<T>

Inherited from ​

Relation.thirdToLastBang


toArray() ​

toArray(): Promise<T[]>

Defined in: packages/activerecord/lib/relation.ts:713

Returns ​

Promise<T[]>

Inherited from ​

Relation.toArray


toAry() ​

toAry(): T[] | null

Defined in: packages/activerecord/lib/relation.ts:709

Returns ​

T[] | null

Inherited from ​

Relation.toAry


toFormattedS() ​

toFormattedS(format?): Promise<string>

Defined in: packages/activerecord/lib/relation.ts:2175

Parameters ​

ParameterType
format?string

Returns ​

Promise<string>

Inherited from ​

Relation.toFormattedS


toFs() ​

toFs(format?): Promise<string>

Defined in: packages/activerecord/lib/relation.ts:2174

Parameters ​

ParameterType
format?string

Returns ​

Promise<string>

Inherited from ​

Relation.toFs


toSentence() ​

toSentence(options?): Promise<string>

Defined in: packages/activerecord/lib/relation.ts:2172

Parameters ​

ParameterType
options?ToSentenceOptions

Returns ​

Promise<string>

Inherited from ​

Relation.toSentence


toSql() ​

toSql(): string

Defined in: packages/activerecord/lib/relation.ts:1148

Returns ​

string

Missing Rails Call ​

apply_join_dependency — PERMANENT

Missing Rails Call ​

with_connection — PERMANENT

Inherited from ​

Relation.toSql


touchAll() ​

touchAll(...names): Promise<number>

Defined in: packages/activerecord/lib/relation.ts:913

Parameters ​

ParameterType
...namesTouchAllArgs

Returns ​

Promise<number>

Inherited from ​

Relation.touchAll


toXml() ​

toXml(options?): Promise<string>

Defined in: packages/activerecord/lib/relation.ts:2176

Parameters ​

ParameterType
options?ToXmlOptions

Returns ​

Promise<string>

Inherited from ​

Relation.toXml


toYaml() ​

toYaml(): Promise<string>

Defined in: packages/activerecord/lib/relation.ts:603

Returns ​

Promise<string>

No Rails Equivalent ​

PERMANENT

Inherited from ​

Relation.toYaml


transaction() ​

transaction<R>(fn, options?): Promise<R | undefined>

Defined in: packages/activerecord/lib/relation.ts:2185

Type Parameters ​

Type Parameter
R

Parameters ​

ParameterType
fn(tx) => Promise<R>
options?{ isolation?: string; joinable?: boolean; requiresNew?: boolean; }
options.isolation?string
options.joinable?boolean
options.requiresNew?boolean

Returns ​

Promise<R | undefined>

Inherited from ​

Relation.transaction


union() ​

union(other): Promise<T[]>

Defined in: packages/activerecord/lib/relation.ts:2157

Parameters ​

ParameterType
otherT[]

Returns ​

Promise<T[]>

Inherited from ​

Relation.union


unscope() ​

unscope<A>(...args): Relation<T, UnscopeArg extends A[number] ? boolean : ":group" extends A[number] ? false : boolean>

Defined in: packages/activerecord/lib/relation.ts:1989

Type Parameters ​

Type Parameter
A extends UnscopeArg[]

Parameters ​

ParameterType
...argsA

Returns ​

Relation<T, UnscopeArg extends A[number] ? boolean : ":group" extends A[number] ? false : boolean>

Inherited from ​

Relation.unscope


unscoped() ​

unscoped(): Relation<T>

Defined in: packages/activerecord/lib/relation.ts:2190

Returns ​

Relation<T>

Inherited from ​

Relation.unscoped


update() ​

Call Signature ​

update(attributes): Promise<T[]>

Defined in: packages/activerecord/lib/relation.ts:1356

Parameters ​
ParameterType
attributesRecord<string, unknown>
Returns ​

Promise<T[]>

Inherited from ​

Relation.update

Call Signature ​

update(id, attributes): Promise<T[]>

Defined in: packages/activerecord/lib/relation.ts:1357

Parameters ​
ParameterType
id":all"
attributesRecord<string, unknown>
Returns ​

Promise<T[]>

Inherited from ​

Relation.update

Call Signature ​

update(id, attributes): Promise<T>

Defined in: packages/activerecord/lib/relation.ts:1358

Parameters ​
ParameterType
idunknown
attributesRecord<string, unknown>
Returns ​

Promise<T>

Inherited from ​

Relation.update


updateAll() ​

updateAll(updates): Promise<number>

Defined in: packages/activerecord/lib/relation.ts:839

Parameters ​

ParameterType
updatesstring | Record<string, unknown> | [string, ...unknown[]]

Returns ​

Promise<number>

Inherited from ​

Relation.updateAll


updateBang() ​

Call Signature ​

updateBang(attributes): Promise<T[]>

Defined in: packages/activerecord/lib/relation.ts:1375

Parameters ​
ParameterType
attributesRecord<string, unknown>
Returns ​

Promise<T[]>

Inherited from ​

Relation.updateBang

Call Signature ​

updateBang(id, attributes): Promise<T[]>

Defined in: packages/activerecord/lib/relation.ts:1376

Parameters ​
ParameterType
id":all"
attributesRecord<string, unknown>
Returns ​

Promise<T[]>

Inherited from ​

Relation.updateBang

Call Signature ​

updateBang(id, attributes): Promise<T>

Defined in: packages/activerecord/lib/relation.ts:1377

Parameters ​
ParameterType
idunknown
attributesRecord<string, unknown>
Returns ​

Promise<T>

Inherited from ​

Relation.updateBang


updateCounters() ​

updateCounters(counters): Promise<number>

Defined in: packages/activerecord/lib/relation.ts:1426

Parameters ​

ParameterType
countersRecord<string, number | { time?: Temporal.Instant; } | CounterCacheTouchOption | undefined>

Returns ​

Promise<number>

Inherited from ​

Relation.updateCounters


upsert() ​

upsert(attributes, options?): Promise<Result>

Defined in: packages/activerecord/lib/relation.ts:1419

Parameters ​

ParameterType
attributesRecord<string, unknown>
options?{ returning?: false | SqlLiteral | `:${string}` | `:${string}`[]; uniqueBy?: string | string[]; }
options.returning?false | SqlLiteral | `:${string}` | `:${string}`[]
options.uniqueBy?string | string[]

Returns ​

Promise<Result>

Inherited from ​

Relation.upsert


upsertAll() ​

upsertAll(attributes, options?): Promise<Result>

Defined in: packages/activerecord/lib/relation.ts:1030

Parameters ​

ParameterType
attributesRecord<string, unknown>[]
options?{ onDuplicate?: SqlLiteral | ":skip" | ":update"; recordTimestamps?: boolean; returning?: false | SqlLiteral | `:${string}` | `:${string}`[]; uniqueBy?: string | string[]; updateOnly?: string | string[]; }
options.onDuplicate?SqlLiteral | ":skip" | ":update"
options.recordTimestamps?boolean
options.returning?false | SqlLiteral | `:${string}` | `:${string}`[]
options.uniqueBy?string | string[]
options.updateOnly?string | string[]

Returns ​

Promise<Result>

Inherited from ​

Relation.upsertAll


values() ​

values(): Record<string, unknown>

Defined in: packages/activerecord/lib/relation.ts:1554

Returns ​

Record<string, unknown>

Inherited from ​

Relation.values


valuesForQueries() ​

valuesForQueries(): Record<string, unknown>

Defined in: packages/activerecord/lib/relation.ts:1559

Returns ​

Record<string, unknown>

Missing Rails Name ​

values — PERMANENT

Inherited from ​

Relation.valuesForQueries


where() ​

Call Signature ​

where(): WhereChain<Relation<T, boolean>>

Defined in: packages/activerecord/lib/relation.ts:2057

Returns ​

WhereChain<Relation<T, boolean>>

Inherited from ​

Relation.where

Call Signature ​

where(args): WhereChain<Relation<T, boolean>>

Defined in: packages/activerecord/lib/relation.ts:2058

Parameters ​
ParameterType
argsundefined
Returns ​

WhereChain<Relation<T, boolean>>

Inherited from ​

Relation.where

Call Signature ​

where(args): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2059

Parameters ​
ParameterType
argsRecord<string, unknown> | null
Returns ​

Relation<T, boolean>

Inherited from ​

Relation.where

Call Signature ​

where(args): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2060

Parameters ​
ParameterType
argsMap<unknown, unknown>
Returns ​

Relation<T, boolean>

Inherited from ​

Relation.where

Call Signature ​

where(sql, ...binds): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2061

Parameters ​
ParameterType
sqlstring | SqlLiteral
...bindsunknown[]
Returns ​

Relation<T, boolean>

Inherited from ​

Relation.where

Call Signature ​

where(args): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2062

Parameters ​
ParameterType
argsNode | SqlLiteral
Returns ​

Relation<T, boolean>

Inherited from ​

Relation.where

Call Signature ​

where(args): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2063

Parameters ​
ParameterType
argsunknown[]
Returns ​

Relation<T, boolean>

Inherited from ​

Relation.where


whereValuesHash() ​

whereValuesHash(relationTableName?): Record<string, unknown>

Defined in: packages/activerecord/lib/relation.ts:1057

Parameters ​

ParameterType
relationTableNamestring | null

Returns ​

Record<string, unknown>

Inherited from ​

Relation.whereValuesHash


with() ​

with(...args): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2017

Parameters ​

ParameterType
...argsRecord<string, string | Relation<any, boolean> | (string | Relation<any, boolean>)[]>[]

Returns ​

Relation<T, boolean>

Inherited from ​

Relation.with


withConnection() ​

withConnection<R>(fn, options?): Promise<R>

Defined in: packages/activerecord/lib/relation.ts:2181

Type Parameters ​

Type Parameter
R

Parameters ​

ParameterType
fn(conn) => R | Promise<R>
options?{ checkoutTimeout?: number; preventPermanentCheckout?: boolean; }
options.checkoutTimeout?number
options.preventPermanentCheckout?boolean

Returns ​

Promise<R>

Inherited from ​

Relation.withConnection


without() ​

without(...records): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2070

Parameters ​

ParameterType
...recordsunknown[]

Returns ​

Relation<T, boolean>

Inherited from ​

Relation.without


withRecursive() ​

withRecursive(...args): Relation<T, boolean>

Defined in: packages/activerecord/lib/relation.ts:2022

Parameters ​

ParameterType
...argsRecord<string, string | Relation<any, boolean> | (string | Relation<any, boolean>)[]>[]

Returns ​

Relation<T, boolean>

Inherited from ​

Relation.withRecursive