Skip to content

Documentation


Documentation / @blazetrails/activerecord / QueryAttribute

Class: QueryAttribute ​

Defined in: packages/activerecord/lib/relation/query-attribute.ts:32

Extends ​

Constructors ​

Constructor ​

new QueryAttribute(name, value, type): QueryAttribute

Defined in: packages/activerecord/lib/relation/query-attribute.ts:36

Parameters ​

ParameterType
namestring | null
valueunknown
typeCastType | null

Returns ​

QueryAttribute

Overrides ​

Attribute.constructor

Properties ​

__valueForDatabase ​

protected __valueForDatabase: unknown

Defined in: packages/activemodel/dist/attribute.d.ts:18

Inherited from ​

Attribute.__valueForDatabase


_value ​

protected _value: unknown

Defined in: packages/activemodel/dist/attribute.d.ts:17

Inherited from ​

Attribute._value


_valueBeforeTypeCast ​

protected _valueBeforeTypeCast: unknown

Defined in: packages/activemodel/dist/attribute.d.ts:13

Inherited from ​

Attribute._valueBeforeTypeCast


eql ​

eql: (other) => boolean

Defined in: packages/activemodel/dist/attribute.d.ts:45

Parameters ​

ParameterType
otherAttribute

Returns ​

boolean

Inherited from ​

Attribute.eql


name ​

readonly name: string | null

Defined in: packages/activemodel/dist/attribute.d.ts:12

Inherited from ​

Attribute.name


type ​

readonly type: ValueType<unknown> | null

Defined in: packages/activemodel/dist/attribute.d.ts:14

Inherited from ​

Attribute.type


FromDatabase ​

static FromDatabase: typeof FromDatabase

Defined in: packages/activemodel/dist/attribute.d.ts:7

Inherited from ​

Attribute.FromDatabase


FromUser ​

static FromUser: typeof FromUser

Defined in: packages/activemodel/dist/attribute.d.ts:8

Inherited from ​

Attribute.FromUser


Null ​

static Null: typeof Null

Defined in: packages/activemodel/dist/attribute.d.ts:10

Inherited from ​

Attribute.Null


Uninitialized ​

static Uninitialized: typeof Uninitialized

Defined in: packages/activemodel/dist/attribute.d.ts:11

Inherited from ​

Attribute.Uninitialized


UserProvidedDefault ​

static UserProvidedDefault: typeof UserProvidedDefault

Defined in: packages/activemodel/dist/attribute.d.ts:6

Inherited from ​

Attribute.UserProvidedDefault


WithCastValue ​

static WithCastValue: typeof WithCastValue

Defined in: packages/activemodel/dist/attribute.d.ts:9

Inherited from ​

Attribute.WithCastValue

Accessors ​

originalValue ​

Get Signature ​

get originalValue(): unknown

Defined in: packages/activemodel/dist/attribute.d.ts:27

Returns ​

unknown

Inherited from ​

Attribute.originalValue


valueBeforeTypeCast ​

Get Signature ​

get valueBeforeTypeCast(): unknown

Defined in: packages/activemodel/dist/attribute.d.ts:24

Returns ​

unknown

Inherited from ​

Attribute.valueBeforeTypeCast


valueForDatabase ​

Get Signature ​

get valueForDatabase(): unknown

Defined in: packages/activerecord/lib/relation/query-attribute.ts:56

Missing Rails Name ​

valueForDatabase — PERMANENT

Returns ​

unknown

Overrides ​

Attribute.valueForDatabase

Methods ​

cameFromUser() ​

cameFromUser(): boolean

Defined in: packages/activemodel/dist/attribute.d.ts:42

Returns ​

boolean

Inherited from ​

Attribute.cameFromUser


changedInPlace() ​

changedInPlace(): boolean | undefined

Defined in: packages/activemodel/dist/attribute.d.ts:34

Returns ​

boolean | undefined

Inherited from ​

Attribute.changedInPlace


dup() ​

dup(): Attribute

Defined in: packages/activemodel/dist/attribute.d.ts:57

Returns ​

Attribute

Inherited from ​

Attribute.dup


encodeWith() ​

encodeWith(coder): void

Defined in: packages/activemodel/dist/attribute.d.ts:55

Parameters ​

ParameterType
coderCoder

Returns ​

void

Inherited from ​

Attribute.encodeWith


equals() ​

equals(other): boolean

Defined in: packages/activemodel/dist/attribute.d.ts:44

Parameters ​

ParameterType
otherAttribute

Returns ​

boolean

Inherited from ​

Attribute.equals


forgettingAssignment() ​

forgettingAssignment(): Attribute

Defined in: packages/activemodel/dist/attribute.d.ts:35

Returns ​

Attribute

Inherited from ​

Attribute.forgettingAssignment


hasBeenRead() ​

hasBeenRead(): boolean

Defined in: packages/activemodel/dist/attribute.d.ts:43

Returns ​

boolean

Inherited from ​

Attribute.hasBeenRead


hash() ​

hash(): number

Defined in: packages/activemodel/dist/attribute.d.ts:46

Returns ​

number

Inherited from ​

Attribute.hash


initWith() ​

initWith(coder): void

Defined in: packages/activemodel/dist/attribute.d.ts:54

Parameters ​

ParameterType
coderCoder

Returns ​

void

Inherited from ​

Attribute.initWith


isChanged() ​

isChanged(): boolean | undefined

Defined in: packages/activemodel/dist/attribute.d.ts:33

Returns ​

boolean | undefined

Inherited from ​

Attribute.isChanged


isInfinite() ​

isInfinite(): false | 1 | -1 | null

Defined in: packages/activerecord/lib/relation/query-attribute.ts:74

Returns ​

false | 1 | -1 | null


isInitialized() ​

isInitialized(): boolean

Defined in: packages/activemodel/dist/attribute.d.ts:41

Returns ​

boolean

Inherited from ​

Attribute.isInitialized


isNil() ​

isNil(): boolean | undefined

Defined in: packages/activerecord/lib/relation/query-attribute.ts:63

Returns ​

boolean | undefined


isSerializable() ​

isSerializable(block?): boolean

Defined in: packages/activemodel/dist/attribute.d.ts:32

Parameters ​

ParameterType
block?(castValue) => void

Returns ​

boolean

Inherited from ​

Attribute.isSerializable


isUnboundable() ​

isUnboundable(): 1 | -1 | null | undefined

Defined in: packages/activerecord/lib/relation/query-attribute.ts:81

Returns ​

1 | -1 | null | undefined


originalValueForDatabase() ​

originalValueForDatabase(): unknown

Defined in: packages/activemodel/dist/attribute.d.ts:47

Returns ​

unknown

Inherited from ​

Attribute.originalValueForDatabase


typeCast() ​

typeCast(value): unknown

Defined in: packages/activerecord/lib/relation/query-attribute.ts:48

Parameters ​

ParameterType
valueunknown

Returns ​

unknown

Overrides ​

Attribute.typeCast


value() ​

value(_?): unknown

Defined in: packages/activemodel/dist/attribute.d.ts:26

Parameters ​

ParameterType
_?(name) => unknown

Returns ​

unknown

Inherited from ​

Attribute.value


withCastValue() ​

withCastValue(value): QueryAttribute

Defined in: packages/activerecord/lib/relation/query-attribute.ts:52

Parameters ​

ParameterType
valueunknown

Returns ​

QueryAttribute

Overrides ​

Attribute.withCastValue


withType() ​

withType(type): Attribute

Defined in: packages/activemodel/dist/attribute.d.ts:39

Parameters ​

ParameterType
typeValueType<unknown> | null

Returns ​

Attribute

Inherited from ​

Attribute.withType


withUserDefault() ​

withUserDefault(value): Attribute

Defined in: packages/activemodel/dist/attribute.d.ts:56

Parameters ​

ParameterType
valueunknown

Returns ​

Attribute

Inherited from ​

Attribute.withUserDefault


withValueFromDatabase() ​

withValueFromDatabase(value): Attribute

Defined in: packages/activemodel/dist/attribute.d.ts:37

Parameters ​

ParameterType
valueunknown

Returns ​

Attribute

Inherited from ​

Attribute.withValueFromDatabase


withValueFromUser() ​

withValueFromUser(value): Attribute

Defined in: packages/activemodel/dist/attribute.d.ts:36

Parameters ​

ParameterType
valueunknown

Returns ​

Attribute

Inherited from ​

Attribute.withValueFromUser


fromDatabase() ​

static fromDatabase(name, valueBeforeTypeCast, type, value?): FromDatabase

Defined in: packages/activemodel/dist/attribute.d.ts:19

Parameters ​

ParameterType
namestring | null
valueBeforeTypeCastunknown
typeValueType<unknown> | null
value?unknown

Returns ​

FromDatabase

Inherited from ​

Attribute.fromDatabase


fromUser() ​

static fromUser(name, valueBeforeTypeCast, type, originalAttribute?): FromUser

Defined in: packages/activemodel/dist/attribute.d.ts:20

Parameters ​

ParameterType
namestring | null
valueBeforeTypeCastunknown
typeValueType<unknown> | null
originalAttribute?Attribute | null

Returns ​

FromUser

Inherited from ​

Attribute.fromUser


null() ​

static null(name): Null

Defined in: packages/activemodel/dist/attribute.d.ts:22

Parameters ​

ParameterType
namestring | null

Returns ​

Null

Inherited from ​

Attribute.null


uninitialized() ​

static uninitialized(name, type): Uninitialized

Defined in: packages/activemodel/dist/attribute.d.ts:23

Parameters ​

ParameterType
namestring | null
typeValueType<unknown> | null

Returns ​

Uninitialized

Inherited from ​

Attribute.uninitialized


withCastValue() ​

static withCastValue(name, valueBeforeTypeCast, type): WithCastValue

Defined in: packages/activemodel/dist/attribute.d.ts:21

Parameters ​

ParameterType
namestring | null
valueBeforeTypeCastunknown
typeValueType<unknown> | null

Returns ​

WithCastValue

Inherited from ​

Attribute.withCastValue