Skip to content

Documentation


Documentation / @blazetrails/activerecord / ActiveRecord

Variable: ActiveRecord ​

const ActiveRecord: Autoload & CallableMethods<Autoload> & { afterAllTransactionsCommit: (block) => void | Promise<void>; AmbiguousSourceReflectionForThroughAssociation: typeof AmbiguousSourceReflectionForThroughAssociation; AssociationRelation: typeof AssociationRelation; Associations: Autoload & CallableMethods<Autoload> & { AliasTracker: typeof AliasTracker; AssociationScope: typeof AssociationScope; BelongsToAssociation: typeof BelongsToAssociation; BelongsToPolymorphicAssociation: typeof BelongsToPolymorphicAssociation; Builder: Autoload & CallableMethods<Autoload> & { Association: typeof Association; BelongsTo: typeof BelongsTo; CollectionAssociation: typeof CollectionAssociation; HasAndBelongsToMany: typeof HasAndBelongsToMany; HasMany: typeof HasMany; HasOne: typeof HasOne; SingularAssociation: typeof SingularAssociation; }; CollectionProxy: typeof CollectionProxy; DisableJoinsAssociationScope: typeof DisableJoinsAssociationScope; HasManyAssociation: typeof HasManyAssociation; HasManyThroughAssociation: typeof HasManyThroughAssociation; HasOneAssociation: typeof HasOneAssociation; HasOneThroughAssociation: typeof HasOneThroughAssociation; JoinDependency: typeof JoinDependency; Preloader: typeof Preloader; }; AsynchronousQueryInsideTransactionError: typeof AsynchronousQueryInsideTransactionError; AttributeMethods: Autoload & CallableMethods<Autoload> & { BeforeTypeCast: { [included]: void; }; CompositePrimaryKey: typeof CompositePrimaryKey; Dirty: { get attributesInDatabase(): HashWithIndifferentAccess<unknown>; get changedAttributeNamesToSave(): string[]; get changesToSave(): HashWithIndifferentAccess<[unknown, unknown]>; get hasChangesToSave(): boolean; get savedChanges(): HashWithIndifferentAccess<[unknown, unknown]> | Record<string, [unknown, unknown]>; }; PrimaryKey: typeof PrimaryKey; Query: { _queryAttribute: (this, attrName) => boolean; attribute?: (this, attrName) => boolean; queryAttribute: (this, attrName) => boolean; queryCastAttribute: { }; [included]: void; }; Read: { _readAttribute: (this, attrName, block?) => unknown; attribute: { }; readAttribute: (this, attrName, block?) => unknown; }; Serialization: { [included]: void; }; TimeZoneConversion: { [included]: void; }; Write: { [included]: void; }; }; Base: typeof Base; Coders: { ColumnSerializer: typeof ColumnSerializer; JSON: typeof JSON; name: string; YAMLColumn: typeof YAMLColumn; }; ConnectionAdapters: Autoload & CallableMethods<Autoload> & ConnectionAdapterClasses & { AbstractAdapter: typeof DatabaseAdapter; adapters: Map<string, [string, string]>; ConnectionPool: typeof ConnectionPool; load: (adapterName) => Promise<void>; MySQL: { Column: typeof Column; name: string; TypeMetadata: typeof TypeMetadata; }; PostgreSQL: { Column: typeof Column; name: string; OID: PostgreSQLOID & { Bit: typeof Bit; BitVarying: typeof BitVarying; Bytea: typeof Bytea; Cidr: typeof Cidr; Date: typeof Date; DateTime: typeof DateTime; Decimal: typeof Decimal; Enum: typeof Enum; Hstore: typeof Hstore; Inet: typeof Inet; Interval: typeof Interval; Jsonb: typeof Jsonb; LegacyPoint: typeof LegacyPoint; Macaddr: typeof Macaddr; Money: typeof Money; Oid: typeof Oid; Point: typeof Point; SpecializedString: typeof SpecializedString; Timestamp: typeof Timestamp; TimestampWithTimeZone: typeof TimestampWithTimeZone; Uuid: typeof Uuid; Vector: typeof Vector; Xml: typeof Xml; }; TypeMetadata: typeof TypeMetadata; }; register: (name, className, path) => void; resolve: (adapterName) => typeof DatabaseAdapter; SQLite3: SQLite3Namespace & { Column: typeof Column; Quoting: __module; SchemaStatements: __module; }; }; ConnectionHandling: __module; Deadlocked: typeof Deadlocked; DestroyAssociationAsyncJob: typeof DestroyAssociationAsyncJob; DisableJoinsAssociationRelation: typeof DisableJoinsAssociationRelation; Encryption: Autoload & CallableMethods<Autoload> & { AutoFilteredParameters: typeof AutoFilteredParameters; Cipher: typeof Cipher; config: Config; Config: typeof Config; Configurable: typeof Configurable; Context: typeof Context; Contexts: typeof Contexts; DerivedSecretKeyProvider: typeof DerivedSecretKeyProvider; DeterministicKeyProvider: typeof DeterministicKeyProvider; EncryptableRecord: typeof EncryptableRecord; encryptedAttributeDeclarationListeners: DeclarationListener[] | undefined; EncryptedAttributeType: typeof EncryptedAttributeType; EncryptedFixtures: { }; EncryptingOnlyEncryptor: typeof EncryptingOnlyEncryptor; Encryptor: typeof Encryptor; EnvelopeEncryptionKeyProvider: typeof EnvelopeEncryptionKeyProvider; Errors: __module; ExtendedDeterministicQueries: typeof ExtendedDeterministicQueries; ExtendedDeterministicUniquenessValidator: typeof ExtendedDeterministicUniquenessValidator; Key: typeof Key; KeyGenerator: typeof KeyGenerator; KeyProvider: typeof KeyProvider; Message: typeof Message; MessageSerializer: typeof MessageSerializer; NullEncryptor: typeof NullEncryptor; Properties: typeof Properties; ReadOnlyNullEncryptor: typeof ReadOnlyNullEncryptor; Scheme: typeof Scheme; } & Omit<typeof Configurable, "prototype"> & Omit<typeof Contexts, "prototype">; Enum: { _enum: { }; _enumMethodsModule: { }; assertValidEnumDefinitionValues: { }; assertValidEnumOptions: { }; detectEnumConflictBang: { }; detectNegativeEnumConditionsBang: { }; enum: (this, name, values, options?) => void; EnumType: typeof EnumType; raiseConflictError: { }; [extended]: void; }; Fixture: typeof Fixture; FixtureClassNotFound: typeof FixtureClassNotFound; FixtureSet: typeof FixtureSet; HasManyThroughAssociationNotFoundError: typeof HasManyThroughAssociationNotFoundError; HasManyThroughAssociationPointlessSourceTypeError: typeof HasManyThroughAssociationPointlessSourceTypeError; HasManyThroughAssociationPolymorphicSourceError: typeof HasManyThroughAssociationPolymorphicSourceError; HasManyThroughAssociationPolymorphicThroughError: typeof HasManyThroughAssociationPolymorphicThroughError; HasManyThroughCantAssociateThroughHasOneOrManyReflection: typeof HasManyThroughCantAssociateThroughHasOneOrManyReflection; HasManyThroughNestedAssociationsAreReadonly: typeof HasManyThroughNestedAssociationsAreReadonly; HasManyThroughSourceAssociationNotFoundError: typeof HasManyThroughSourceAssociationNotFoundError; HasOneAssociationPolymorphicThroughError: typeof HasOneAssociationPolymorphicThroughError; HasOneThroughCantAssociateThroughCollection: typeof HasOneThroughCantAssociateThroughCollection; HasOneThroughCantAssociateThroughHasOneOrManyReflection: typeof HasOneThroughCantAssociateThroughHasOneOrManyReflection; HasOneThroughNestedAssociationsAreReadonly: typeof HasOneThroughNestedAssociationsAreReadonly; InverseOfAssociationRecursiveError: typeof InverseOfAssociationRecursiveError; IrreversibleMigration: typeof IrreversibleMigration; Locking: Autoload & CallableMethods<Autoload> & { Optimistic: { [included]: void; }; Pessimistic: { lockBang: <T>(this, lock) => Promise<T>; withLock: {<T, R>(this, fn): Promise<R | undefined>; <T, R>(this, lockClause, fn): Promise<R | undefined>; <T, R>(this, options, fn): Promise<R | undefined>; <T, R>(this, lockClause, options, fn): Promise<R | undefined>; }; }; }; Marshalling: __module; Middleware: Autoload & CallableMethods<Autoload> & { DatabaseSelector: typeof DatabaseSelector; ShardSelector: typeof ShardSelector; }; Migration: typeof Migration; ModelSchema: __module; Point: (x, y) => { x: number; y: number; }; PredicateBuilder: typeof PredicateBuilder; Querying: __module; Railtie?: unknown; Railties: { ControllerRuntime?: object; name: string; }; Reflection: __module; Relation: typeof Relation; Result: typeof Result; RuntimeRegistry: RuntimeRegistry; Sanitization: __module; Scoping: Autoload & CallableMethods<Autoload> & { Default: typeof Default; Named: __module; }; SecurePassword: __module; SecureToken: __module; Serialization: __module; Store: __module; Suppressor: __module; TableMetadata: typeof TableMetadata; Tasks: Autoload & CallableMethods<Autoload> & { DatabaseTasks: typeof DatabaseTasks; MySQLDatabaseTasks: typeof MySQLDatabaseTasks; PostgreSQLDatabaseTasks: typeof PostgreSQLDatabaseTasks; SQLiteDatabaseTasks: typeof SQLiteDatabaseTasks; }; ThroughCantAssociateThroughHasOneOrManyReflection: typeof ThroughCantAssociateThroughHasOneOrManyReflection; ThroughNestedAssociationsAreReadonly: typeof ThroughNestedAssociationsAreReadonly; Trailties: { name: string; }; Type: Type; Validations: { AbsenceValidator: typeof AbsenceValidator; AssociatedValidator: typeof AssociatedValidator; customValidationContext: (this) => boolean; LengthValidator: typeof LengthValidator; NumericalityValidator: typeof NumericalityValidator; PresenceValidator: typeof PresenceValidator; UniquenessValidator: typeof UniquenessValidator; validate: (this, context?) => Promise<boolean>; }; }

Defined in: packages/activerecord/lib/namespaces.ts:250

Type Declaration ​

afterAllTransactionsCommit ​

afterAllTransactionsCommit: (block) => void | Promise<void>

Parameters ​

ParameterType
block() => void | Promise<void>

Returns ​

void | Promise<void>

AmbiguousSourceReflectionForThroughAssociation ​

AmbiguousSourceReflectionForThroughAssociation: typeof AmbiguousSourceReflectionForThroughAssociation

AssociationRelation ​

AssociationRelation: typeof AssociationRelation

Associations ​

Associations: Autoload & CallableMethods<Autoload> & { AliasTracker: typeof AliasTracker; AssociationScope: typeof AssociationScope; BelongsToAssociation: typeof BelongsToAssociation; BelongsToPolymorphicAssociation: typeof BelongsToPolymorphicAssociation; Builder: Autoload & CallableMethods<Autoload> & { Association: typeof Association; BelongsTo: typeof BelongsTo; CollectionAssociation: typeof CollectionAssociation; HasAndBelongsToMany: typeof HasAndBelongsToMany; HasMany: typeof HasMany; HasOne: typeof HasOne; SingularAssociation: typeof SingularAssociation; }; CollectionProxy: typeof CollectionProxy; DisableJoinsAssociationScope: typeof DisableJoinsAssociationScope; HasManyAssociation: typeof HasManyAssociation; HasManyThroughAssociation: typeof HasManyThroughAssociation; HasOneAssociation: typeof HasOneAssociation; HasOneThroughAssociation: typeof HasOneThroughAssociation; JoinDependency: typeof JoinDependency; Preloader: typeof Preloader; }

Type Declaration ​

AliasTracker ​

AliasTracker: typeof AliasTracker

AssociationScope ​

AssociationScope: typeof AssociationScope

BelongsToAssociation ​

BelongsToAssociation: typeof BelongsToAssociation

BelongsToPolymorphicAssociation ​

BelongsToPolymorphicAssociation: typeof BelongsToPolymorphicAssociation

Builder ​

Builder: Autoload & CallableMethods<Autoload> & { Association: typeof Association; BelongsTo: typeof BelongsTo; CollectionAssociation: typeof CollectionAssociation; HasAndBelongsToMany: typeof HasAndBelongsToMany; HasMany: typeof HasMany; HasOne: typeof HasOne; SingularAssociation: typeof SingularAssociation; }

Type Declaration ​
Association ​

Association: typeof Association

BelongsTo ​

BelongsTo: typeof BelongsTo

CollectionAssociation ​

CollectionAssociation: typeof CollectionAssociation

HasAndBelongsToMany ​

HasAndBelongsToMany: typeof HasAndBelongsToMany

HasMany ​

HasMany: typeof HasMany

HasOne ​

HasOne: typeof HasOne

SingularAssociation ​

SingularAssociation: typeof SingularAssociation

CollectionProxy ​

CollectionProxy: typeof CollectionProxy

DisableJoinsAssociationScope ​

DisableJoinsAssociationScope: typeof DisableJoinsAssociationScope

HasManyAssociation ​

HasManyAssociation: typeof HasManyAssociation

HasManyThroughAssociation ​

HasManyThroughAssociation: typeof HasManyThroughAssociation

HasOneAssociation ​

HasOneAssociation: typeof HasOneAssociation

HasOneThroughAssociation ​

HasOneThroughAssociation: typeof HasOneThroughAssociation

JoinDependency ​

JoinDependency: typeof JoinDependency

Preloader ​

Preloader: typeof Preloader

AsynchronousQueryInsideTransactionError ​

AsynchronousQueryInsideTransactionError: typeof AsynchronousQueryInsideTransactionError

AttributeMethods ​

AttributeMethods: Autoload & CallableMethods<Autoload> & { BeforeTypeCast: { [included]: void; }; CompositePrimaryKey: typeof CompositePrimaryKey; Dirty: { get attributesInDatabase(): HashWithIndifferentAccess<unknown>; get changedAttributeNamesToSave(): string[]; get changesToSave(): HashWithIndifferentAccess<[unknown, unknown]>; get hasChangesToSave(): boolean; get savedChanges(): HashWithIndifferentAccess<[unknown, unknown]> | Record<string, [unknown, unknown]>; }; PrimaryKey: typeof PrimaryKey; Query: { _queryAttribute: (this, attrName) => boolean; attribute?: (this, attrName) => boolean; queryAttribute: (this, attrName) => boolean; queryCastAttribute: { }; [included]: void; }; Read: { _readAttribute: (this, attrName, block?) => unknown; attribute: { }; readAttribute: (this, attrName, block?) => unknown; }; Serialization: { [included]: void; }; TimeZoneConversion: { [included]: void; }; Write: { [included]: void; }; }

Type Declaration ​

BeforeTypeCast ​

BeforeTypeCast: { [included]: void; }

BeforeTypeCast.[included]() ​

[included](base): void

Parameters ​
ParameterType
baseBeforeTypeCastIncludeHost
Returns ​

void

CompositePrimaryKey ​

CompositePrimaryKey: typeof CompositePrimaryKey

Dirty ​

Dirty: { get attributesInDatabase(): HashWithIndifferentAccess<unknown>; get changedAttributeNamesToSave(): string[]; get changesToSave(): HashWithIndifferentAccess<[unknown, unknown]>; get hasChangesToSave(): boolean; get savedChanges(): HashWithIndifferentAccess<[unknown, unknown]> | Record<string, [unknown, unknown]>; }

Dirty.attributesInDatabase ​
Get Signature ​

get attributesInDatabase(): HashWithIndifferentAccess<unknown>

Defined in: packages/activerecord/lib/attribute-methods/dirty.ts:94

Returns ​

HashWithIndifferentAccess<unknown>

Dirty.changedAttributeNamesToSave ​
Get Signature ​

get changedAttributeNamesToSave(): string[]

Defined in: packages/activerecord/lib/attribute-methods/dirty.ts:90

Returns ​

string[]

Dirty.changesToSave ​
Get Signature ​

get changesToSave(): HashWithIndifferentAccess<[unknown, unknown]>

Defined in: packages/activerecord/lib/attribute-methods/dirty.ts:86

Returns ​

HashWithIndifferentAccess<[unknown, unknown]>

Dirty.hasChangesToSave ​
Get Signature ​

get hasChangesToSave(): boolean

Defined in: packages/activerecord/lib/attribute-methods/dirty.ts:82

Returns ​

boolean

Dirty.savedChanges ​
Get Signature ​

get savedChanges(): HashWithIndifferentAccess<[unknown, unknown]> | Record<string, [unknown, unknown]>

Defined in: packages/activerecord/lib/attribute-methods/dirty.ts:76

Returns ​

HashWithIndifferentAccess<[unknown, unknown]> | Record<string, [unknown, unknown]>

PrimaryKey ​

PrimaryKey: typeof PrimaryKey

Query ​

Query: { _queryAttribute: (this, attrName) => boolean; attribute?: (this, attrName) => boolean; queryAttribute: (this, attrName) => boolean; queryCastAttribute: { }; [included]: void; }

Query._queryAttribute ​

_queryAttribute: (this, attrName) => boolean

Parameters ​
ParameterType
thisQueryHost
attrNamestring
Returns ​

boolean

Query.attribute? ​

attribute?: (this, attrName) => boolean = queryAttribute

Parameters ​
ParameterType
thisQueryHost
attrNamestring
Returns ​

boolean

Query.queryAttribute ​

queryAttribute: (this, attrName) => boolean

Parameters ​
ParameterType
thisQueryHost
attrNamestring
Returns ​

boolean

Query.queryCastAttribute ​

queryCastAttribute: { }

Query.[included]() ​

[included](base): void

Parameters ​
ParameterType
baseQueryIncludeHost
Returns ​

void

Read ​

Read: { _readAttribute: (this, attrName, block?) => unknown; attribute: { }; readAttribute: (this, attrName, block?) => unknown; }

Read._readAttribute ​

_readAttribute: (this, attrName, block?) => unknown

Parameters ​
ParameterType
thisAttributeHolder
attrNamestring
block?(name) => unknown
Returns ​

unknown

Read.attribute ​

attribute: { }

Read.readAttribute ​

readAttribute: (this, attrName, block?) => unknown

Parameters ​
ParameterType
thisReadAttributeHost
attrNamestring
block?(name) => unknown
Returns ​

unknown

Serialization ​

Serialization: { [included]: void; }

Serialization.[included]() ​

[included](base): void

Parameters ​
ParameterType
baseSerializationIncludeHost
Returns ​

void

TimeZoneConversion ​

TimeZoneConversion: { [included]: void; }

TimeZoneConversion.[included]() ​

[included](base): void

Parameters ​
ParameterType
baseTimeZoneConversionIncludeHost
Returns ​

void

Write ​

Write: { [included]: void; }

Write.[included]() ​

[included](base): void

Parameters ​
ParameterType
baseWriteIncludeHost
Returns ​

void

Base ​

Base: typeof Base

Coders ​

Coders: { ColumnSerializer: typeof ColumnSerializer; JSON: typeof JSON; name: string; YAMLColumn: typeof YAMLColumn; }

Coders.ColumnSerializer ​

ColumnSerializer: typeof ColumnSerializer

Coders.JSON ​

JSON: typeof JSON

Coders.name ​

name: string

Coders.YAMLColumn ​

YAMLColumn: typeof YAMLColumn

ConnectionAdapters ​

ConnectionAdapters: Autoload & CallableMethods<Autoload> & ConnectionAdapterClasses & { AbstractAdapter: typeof DatabaseAdapter; adapters: Map<string, [string, string]>; ConnectionPool: typeof ConnectionPool; load: (adapterName) => Promise<void>; MySQL: { Column: typeof Column; name: string; TypeMetadata: typeof TypeMetadata; }; PostgreSQL: { Column: typeof Column; name: string; OID: PostgreSQLOID & { Bit: typeof Bit; BitVarying: typeof BitVarying; Bytea: typeof Bytea; Cidr: typeof Cidr; Date: typeof Date; DateTime: typeof DateTime; Decimal: typeof Decimal; Enum: typeof Enum; Hstore: typeof Hstore; Inet: typeof Inet; Interval: typeof Interval; Jsonb: typeof Jsonb; LegacyPoint: typeof LegacyPoint; Macaddr: typeof Macaddr; Money: typeof Money; Oid: typeof Oid; Point: typeof Point; SpecializedString: typeof SpecializedString; Timestamp: typeof Timestamp; TimestampWithTimeZone: typeof TimestampWithTimeZone; Uuid: typeof Uuid; Vector: typeof Vector; Xml: typeof Xml; }; TypeMetadata: typeof TypeMetadata; }; register: (name, className, path) => void; resolve: (adapterName) => typeof DatabaseAdapter; SQLite3: SQLite3Namespace & { Column: typeof Column; Quoting: __module; SchemaStatements: __module; }; }

Type Declaration ​

AbstractAdapter ​

AbstractAdapter: typeof DatabaseAdapter

adapters ​

adapters: Map<string, [string, string]>

ConnectionPool ​

ConnectionPool: typeof ConnectionPool

load ​

load: (adapterName) => Promise<void>

Parameters ​
ParameterType
adapterNamestring | undefined
Returns ​

Promise<void>

No Rails Equivalent ​

PERMANENT

MySQL ​

MySQL: { Column: typeof Column; name: string; TypeMetadata: typeof TypeMetadata; }

MySQL.Column ​

Column: typeof Column

MySQL.name ​

name: string

MySQL.TypeMetadata ​

TypeMetadata: typeof TypeMetadata

PostgreSQL ​

PostgreSQL: { Column: typeof Column; name: string; OID: PostgreSQLOID & { Bit: typeof Bit; BitVarying: typeof BitVarying; Bytea: typeof Bytea; Cidr: typeof Cidr; Date: typeof Date; DateTime: typeof DateTime; Decimal: typeof Decimal; Enum: typeof Enum; Hstore: typeof Hstore; Inet: typeof Inet; Interval: typeof Interval; Jsonb: typeof Jsonb; LegacyPoint: typeof LegacyPoint; Macaddr: typeof Macaddr; Money: typeof Money; Oid: typeof Oid; Point: typeof Point; SpecializedString: typeof SpecializedString; Timestamp: typeof Timestamp; TimestampWithTimeZone: typeof TimestampWithTimeZone; Uuid: typeof Uuid; Vector: typeof Vector; Xml: typeof Xml; }; TypeMetadata: typeof TypeMetadata; }

PostgreSQL.Column ​

Column: typeof Column

PostgreSQL.name ​

name: string

PostgreSQL.OID ​

OID: PostgreSQLOID & { Bit: typeof Bit; BitVarying: typeof BitVarying; Bytea: typeof Bytea; Cidr: typeof Cidr; Date: typeof Date; DateTime: typeof DateTime; Decimal: typeof Decimal; Enum: typeof Enum; Hstore: typeof Hstore; Inet: typeof Inet; Interval: typeof Interval; Jsonb: typeof Jsonb; LegacyPoint: typeof LegacyPoint; Macaddr: typeof Macaddr; Money: typeof Money; Oid: typeof Oid; Point: typeof Point; SpecializedString: typeof SpecializedString; Timestamp: typeof Timestamp; TimestampWithTimeZone: typeof TimestampWithTimeZone; Uuid: typeof Uuid; Vector: typeof Vector; Xml: typeof Xml; }

Type Declaration ​
Bit ​

Bit: typeof Bit

BitVarying ​

BitVarying: typeof BitVarying

Bytea ​

Bytea: typeof Bytea

Cidr ​

Cidr: typeof Cidr

Date ​

Date: typeof Date

DateTime ​

DateTime: typeof DateTime

Decimal ​

Decimal: typeof Decimal

Enum ​

Enum: typeof Enum

Hstore ​

Hstore: typeof Hstore

Inet ​

Inet: typeof Inet

Interval ​

Interval: typeof Interval

Jsonb ​

Jsonb: typeof Jsonb

LegacyPoint ​

LegacyPoint: typeof LegacyPoint

Macaddr ​

Macaddr: typeof Macaddr

Money ​

Money: typeof Money

Oid ​

Oid: typeof Oid

Point ​

Point: typeof Point

SpecializedString ​

SpecializedString: typeof SpecializedString

Timestamp ​

Timestamp: typeof Timestamp

TimestampWithTimeZone ​

TimestampWithTimeZone: typeof TimestampWithTimeZone

Uuid ​

Uuid: typeof Uuid

Vector ​

Vector: typeof Vector

Xml ​

Xml: typeof Xml

PostgreSQL.TypeMetadata ​

TypeMetadata: typeof TypeMetadata

register ​

register: (name, className, path) => void

Parameters ​
ParameterType
namestring
classNamestring
pathstring
Returns ​

void

resolve ​

resolve: (adapterName) => typeof DatabaseAdapter

Parameters ​
ParameterType
adapterNamestring | undefined
Returns ​

typeof DatabaseAdapter

SQLite3 ​

SQLite3: SQLite3Namespace & { Column: typeof Column; Quoting: __module; SchemaStatements: __module; }

Type Declaration ​
Column ​

Column: typeof Column

Quoting ​

Quoting: __module

SchemaStatements ​

SchemaStatements: __module

ConnectionHandling ​

ConnectionHandling: __module

Deadlocked ​

Deadlocked: typeof Deadlocked

DestroyAssociationAsyncJob ​

DestroyAssociationAsyncJob: typeof DestroyAssociationAsyncJob

DisableJoinsAssociationRelation ​

DisableJoinsAssociationRelation: typeof DisableJoinsAssociationRelation

Encryption ​

Encryption: Autoload & CallableMethods<Autoload> & { AutoFilteredParameters: typeof AutoFilteredParameters; Cipher: typeof Cipher; config: Config; Config: typeof Config; Configurable: typeof Configurable; Context: typeof Context; Contexts: typeof Contexts; DerivedSecretKeyProvider: typeof DerivedSecretKeyProvider; DeterministicKeyProvider: typeof DeterministicKeyProvider; EncryptableRecord: typeof EncryptableRecord; encryptedAttributeDeclarationListeners: DeclarationListener[] | undefined; EncryptedAttributeType: typeof EncryptedAttributeType; EncryptedFixtures: { }; EncryptingOnlyEncryptor: typeof EncryptingOnlyEncryptor; Encryptor: typeof Encryptor; EnvelopeEncryptionKeyProvider: typeof EnvelopeEncryptionKeyProvider; Errors: __module; ExtendedDeterministicQueries: typeof ExtendedDeterministicQueries; ExtendedDeterministicUniquenessValidator: typeof ExtendedDeterministicUniquenessValidator; Key: typeof Key; KeyGenerator: typeof KeyGenerator; KeyProvider: typeof KeyProvider; Message: typeof Message; MessageSerializer: typeof MessageSerializer; NullEncryptor: typeof NullEncryptor; Properties: typeof Properties; ReadOnlyNullEncryptor: typeof ReadOnlyNullEncryptor; Scheme: typeof Scheme; } & Omit<typeof Configurable, "prototype"> & Omit<typeof Contexts, "prototype">

Type Declaration ​

AutoFilteredParameters ​

AutoFilteredParameters: typeof AutoFilteredParameters

Cipher ​

Cipher: typeof Cipher

config ​

config: Config

Config ​

Config: typeof Config

Configurable ​

Configurable: typeof Configurable

Context ​

Context: typeof Context

Contexts ​

Contexts: typeof Contexts

DerivedSecretKeyProvider ​

DerivedSecretKeyProvider: typeof DerivedSecretKeyProvider

DeterministicKeyProvider ​

DeterministicKeyProvider: typeof DeterministicKeyProvider

EncryptableRecord ​

EncryptableRecord: typeof EncryptableRecord

encryptedAttributeDeclarationListeners ​

encryptedAttributeDeclarationListeners: DeclarationListener[] | undefined

EncryptedAttributeType ​

EncryptedAttributeType: typeof EncryptedAttributeType

EncryptedFixtures ​

EncryptedFixtures: { }

EncryptingOnlyEncryptor ​

EncryptingOnlyEncryptor: typeof EncryptingOnlyEncryptor

Encryptor ​

Encryptor: typeof Encryptor

EnvelopeEncryptionKeyProvider ​

EnvelopeEncryptionKeyProvider: typeof EnvelopeEncryptionKeyProvider

Errors ​

Errors: __module

ExtendedDeterministicQueries ​

ExtendedDeterministicQueries: typeof ExtendedDeterministicQueries

ExtendedDeterministicUniquenessValidator ​

ExtendedDeterministicUniquenessValidator: typeof ExtendedDeterministicUniquenessValidator

Key ​

Key: typeof Key

KeyGenerator ​

KeyGenerator: typeof KeyGenerator

KeyProvider ​

KeyProvider: typeof KeyProvider

Message ​

Message: typeof Message

MessageSerializer ​

MessageSerializer: typeof MessageSerializer

NullEncryptor ​

NullEncryptor: typeof NullEncryptor

Properties ​

Properties: typeof Properties

ReadOnlyNullEncryptor ​

ReadOnlyNullEncryptor: typeof ReadOnlyNullEncryptor

Scheme ​

Scheme: typeof Scheme

Enum ​

Enum: { _enum: { }; _enumMethodsModule: { }; assertValidEnumDefinitionValues: { }; assertValidEnumOptions: { }; detectEnumConflictBang: { }; detectNegativeEnumConditionsBang: { }; enum: (this, name, values, options?) => void; EnumType: typeof EnumType; raiseConflictError: { }; [extended]: void; }

Enum._enum ​

_enum: { }

Enum._enumMethodsModule ​

_enumMethodsModule: { }

Enum.assertValidEnumDefinitionValues ​

assertValidEnumDefinitionValues: { }

Enum.assertValidEnumOptions ​

assertValidEnumOptions: { }

Enum.detectEnumConflictBang ​

detectEnumConflictBang: { }

Enum.detectNegativeEnumConditionsBang ​

detectNegativeEnumConditionsBang: { }

Enum.enum ​

enum: (this, name, values, options?) => void = enumMethod

Parameters ​
ParameterType
thistypeof Base
namestring
valuesstring[] | Record<string, EnumValue>
options?EnumMacroOptions
Returns ​

void

Enum.EnumType ​

EnumType: typeof EnumType

Enum.raiseConflictError ​

raiseConflictError: { }

Enum.[extended]() ​

[extended](base): void

Parameters ​
ParameterType
baseobject
Returns ​

void

Fixture ​

Fixture: typeof Fixture

FixtureClassNotFound ​

FixtureClassNotFound: typeof FixtureClassNotFound

FixtureSet ​

FixtureSet: typeof FixtureSet

HasManyThroughAssociationNotFoundError ​

HasManyThroughAssociationNotFoundError: typeof HasManyThroughAssociationNotFoundError

HasManyThroughAssociationPointlessSourceTypeError ​

HasManyThroughAssociationPointlessSourceTypeError: typeof HasManyThroughAssociationPointlessSourceTypeError

HasManyThroughAssociationPolymorphicSourceError ​

HasManyThroughAssociationPolymorphicSourceError: typeof HasManyThroughAssociationPolymorphicSourceError

HasManyThroughAssociationPolymorphicThroughError ​

HasManyThroughAssociationPolymorphicThroughError: typeof HasManyThroughAssociationPolymorphicThroughError

HasManyThroughCantAssociateThroughHasOneOrManyReflection ​

HasManyThroughCantAssociateThroughHasOneOrManyReflection: typeof HasManyThroughCantAssociateThroughHasOneOrManyReflection

HasManyThroughNestedAssociationsAreReadonly ​

HasManyThroughNestedAssociationsAreReadonly: typeof HasManyThroughNestedAssociationsAreReadonly

HasManyThroughSourceAssociationNotFoundError ​

HasManyThroughSourceAssociationNotFoundError: typeof HasManyThroughSourceAssociationNotFoundError

HasOneAssociationPolymorphicThroughError ​

HasOneAssociationPolymorphicThroughError: typeof HasOneAssociationPolymorphicThroughError

HasOneThroughCantAssociateThroughCollection ​

HasOneThroughCantAssociateThroughCollection: typeof HasOneThroughCantAssociateThroughCollection

HasOneThroughCantAssociateThroughHasOneOrManyReflection ​

HasOneThroughCantAssociateThroughHasOneOrManyReflection: typeof HasOneThroughCantAssociateThroughHasOneOrManyReflection

HasOneThroughNestedAssociationsAreReadonly ​

HasOneThroughNestedAssociationsAreReadonly: typeof HasOneThroughNestedAssociationsAreReadonly

InverseOfAssociationRecursiveError ​

InverseOfAssociationRecursiveError: typeof InverseOfAssociationRecursiveError

IrreversibleMigration ​

IrreversibleMigration: typeof IrreversibleMigration

Locking ​

Locking: Autoload & CallableMethods<Autoload> & { Optimistic: { [included]: void; }; Pessimistic: { lockBang: <T>(this, lock) => Promise<T>; withLock: {<T, R>(this, fn): Promise<R | undefined>; <T, R>(this, lockClause, fn): Promise<R | undefined>; <T, R>(this, options, fn): Promise<R | undefined>; <T, R>(this, lockClause, options, fn): Promise<R | undefined>; }; }; }

Type Declaration ​

Optimistic ​

Optimistic: { [included]: void; }

Optimistic.[included]() ​

[included](base): void

Parameters ​
ParameterType
baseobject
Returns ​

void

Pessimistic ​

Pessimistic: { lockBang: <T>(this, lock) => Promise<T>; withLock: {<T, R>(this, fn): Promise<R | undefined>; <T, R>(this, lockClause, fn): Promise<R | undefined>; <T, R>(this, options, fn): Promise<R | undefined>; <T, R>(this, lockClause, options, fn): Promise<R | undefined>; }; }

Pessimistic.lockBang ​

lockBang: <T>(this, lock) => Promise<T>

Type Parameters ​
Type Parameter
T extends Base
Parameters ​
ParameterTypeDefault value
thisTundefined
lockstring | booleantrue
Returns ​

Promise<T>

Pessimistic.withLock ​

withLock: {<T, R>(this, fn): Promise<R | undefined>; <T, R>(this, lockClause, fn): Promise<R | undefined>; <T, R>(this, options, fn): Promise<R | undefined>; <T, R>(this, lockClause, options, fn): Promise<R | undefined>; }

Call Signature ​

<T, R>(this, fn): Promise<R | undefined>

Type Parameters ​
Type Parameter
T extends Base
R
Parameters ​
ParameterType
thisT
fn() => R | Promise<R>
Returns ​

Promise<R | undefined>

Call Signature ​

<T, R>(this, lockClause, fn): Promise<R | undefined>

Type Parameters ​
Type Parameter
T extends Base
R
Parameters ​
ParameterType
thisT
lockClausestring | boolean
fn() => R | Promise<R>
Returns ​

Promise<R | undefined>

Call Signature ​

<T, R>(this, options, fn): Promise<R | undefined>

Type Parameters ​
Type Parameter
T extends Base
R
Parameters ​
ParameterType
thisT
optionsTxOptions
fn() => R | Promise<R>
Returns ​

Promise<R | undefined>

Call Signature ​

<T, R>(this, lockClause, options, fn): Promise<R | undefined>

Type Parameters ​
Type Parameter
T extends Base
R
Parameters ​
ParameterType
thisT
lockClausestring | boolean
optionsTxOptions
fn() => R | Promise<R>
Returns ​

Promise<R | undefined>

Marshalling ​

Marshalling: __module

Middleware ​

Middleware: Autoload & CallableMethods<Autoload> & { DatabaseSelector: typeof DatabaseSelector; ShardSelector: typeof ShardSelector; }

Type Declaration ​

DatabaseSelector ​

DatabaseSelector: typeof DatabaseSelector

ShardSelector ​

ShardSelector: typeof ShardSelector

Migration ​

Migration: typeof Migration

ModelSchema ​

ModelSchema: __module

Point ​

Point: (x, y) => { x: number; y: number; }

Parameters ​

ParameterType
xnumber
ynumber

Returns ​

{ x: number; y: number; }

x ​

x: number

y ​

y: number

PredicateBuilder ​

PredicateBuilder: typeof PredicateBuilder

Querying ​

Querying: __module

Railtie? ​

optional Railtie?: unknown

Railties ​

Railties: { ControllerRuntime?: object; name: string; }

Railties.ControllerRuntime? ​

optional ControllerRuntime?: object

Railties.name ​

name: string

Reflection ​

Reflection: __module

Relation ​

Relation: typeof Relation

Result ​

Result: typeof Result

RuntimeRegistry ​

RuntimeRegistry: RuntimeRegistry

Sanitization ​

Sanitization: __module

Scoping ​

Scoping: Autoload & CallableMethods<Autoload> & { Default: typeof Default; Named: __module; }

Type Declaration ​

Default ​

Default: typeof Default

Named ​

Named: __module

SecurePassword ​

SecurePassword: __module

SecureToken ​

SecureToken: __module

Serialization ​

Serialization: __module

Store ​

Store: __module

Suppressor ​

Suppressor: __module

TableMetadata ​

TableMetadata: typeof TableMetadata

Tasks ​

Tasks: Autoload & CallableMethods<Autoload> & { DatabaseTasks: typeof DatabaseTasks; MySQLDatabaseTasks: typeof MySQLDatabaseTasks; PostgreSQLDatabaseTasks: typeof PostgreSQLDatabaseTasks; SQLiteDatabaseTasks: typeof SQLiteDatabaseTasks; }

Type Declaration ​

DatabaseTasks ​

DatabaseTasks: typeof DatabaseTasks

MySQLDatabaseTasks ​

MySQLDatabaseTasks: typeof MySQLDatabaseTasks

PostgreSQLDatabaseTasks ​

PostgreSQLDatabaseTasks: typeof PostgreSQLDatabaseTasks

SQLiteDatabaseTasks ​

SQLiteDatabaseTasks: typeof SQLiteDatabaseTasks

ThroughCantAssociateThroughHasOneOrManyReflection ​

ThroughCantAssociateThroughHasOneOrManyReflection: typeof ThroughCantAssociateThroughHasOneOrManyReflection

ThroughNestedAssociationsAreReadonly ​

ThroughNestedAssociationsAreReadonly: typeof ThroughNestedAssociationsAreReadonly

Trailties ​

Trailties: { name: string; }

Trailties.name ​

name: string

Type ​

Type: Type

Validations ​

Validations: { AbsenceValidator: typeof AbsenceValidator; AssociatedValidator: typeof AssociatedValidator; customValidationContext: (this) => boolean; LengthValidator: typeof LengthValidator; NumericalityValidator: typeof NumericalityValidator; PresenceValidator: typeof PresenceValidator; UniquenessValidator: typeof UniquenessValidator; validate: (this, context?) => Promise<boolean>; }

Validations.AbsenceValidator ​

AbsenceValidator: typeof AbsenceValidator

Validations.AssociatedValidator ​

AssociatedValidator: typeof AssociatedValidator

Validations.customValidationContext ​

customValidationContext: (this) => boolean

Parameters ​
ParameterType
thisValidationsHost
Returns ​

boolean

Validations.LengthValidator ​

LengthValidator: typeof LengthValidator

Validations.NumericalityValidator ​

NumericalityValidator: typeof NumericalityValidator

Validations.PresenceValidator ​

PresenceValidator: typeof PresenceValidator

Validations.UniquenessValidator ​

UniquenessValidator: typeof UniquenessValidator

Validations.validate ​

validate: (this, context?) => Promise<boolean>

Parameters ​
ParameterType
thisValidationsHost
context?ValidationContextArg
Returns ​

Promise<boolean>