Powership / Modules / Entity / EntityFromContext
Entity.EntityFromContext
Name | Type |
---|---|
Context |
extends AnyEntityTypesContext |
-
EntityLoaderMethods
<Context
>↳
EntityFromContext
↳↳
Entity
- __context
- __isEntity
- addHooks
- addIndexRelation
- addRelation
- aliasPaths
- conditionsDefinition
- createOne
- databaseType
- deleteMany
- deleteOne
- edgeType
- extend
- extendInput
- extendUpdate
- findById
- findMany
- findOne
- hasAliases
- hooks
- indexGraphTypes
- indexRelations
- indexes
- inputType
- name
- originType
- paginate
- paginationType
- parse
- setOption
- transporter
- type
- updateMany
- updateOne
- usedOptions
• __context: Context
packages/entity/src/EntityInterfaces/EntityFromContext.ts:117
• __isEntity: true
packages/entity/src/EntityInterfaces/EntityFromContext.ts:116
• addHooks: (options
: (hooks
: EntityHooks
<{}, AnyEntity
>) => any
) => EntityFromContext
<Context
>
▸ (options
): EntityFromContext
<Context
>
Name | Type |
---|---|
options |
(hooks : EntityHooks <{}, AnyEntity >) => any |
EntityFromContext
<Context
>
packages/entity/src/EntityInterfaces/EntityFromContext.ts:110
• addIndexRelation: <E, Name>(name
: Name
, entity
: E
) => EntityFromContext
<EntityTypesContext
<Omit
<Context
["originDefinition"
], Name
> & { [L in string]: Object }, Context
["indexes"
]>>
▸ <E
, Name
>(name
, entity
): EntityFromContext
<EntityTypesContext
<Omit
<Context
["originDefinition"
], Name
> & { [L in string]: Object }, Context
["indexes"
]>>
Name | Type |
---|---|
E |
extends unknown |
Name |
extends string |
Name | Type |
---|---|
name |
Name |
entity |
E |
EntityFromContext
<EntityTypesContext
<Omit
<Context
["originDefinition"
], Name
> & { [L in string]: Object }, Context
["indexes"
]>>
packages/entity/src/EntityInterfaces/EntityFromContext.ts:58
• addRelation: EntityAddRelation
<EntityFromContext
<Context
>, Context
>
packages/entity/src/EntityInterfaces/EntityFromContext.ts:84
• aliasPaths: string
[]
packages/entity/src/EntityInterfaces/EntityFromContext.ts:70
• conditionsDefinition: EntityFilterConditionsDefinition
<Context
["originDefinition"
]>
packages/entity/src/EntityInterfaces/EntityFromContext.ts:72
• createOne: Context
["indexes"
][number
] extends I
? I
extends unknown
? I
extends { PK
: readonly PK
[] ; SK?
: readonly SK
[] } ? { condition
: undefined
| FilterRecord
<Context
["documentCreationInput"
]> ; context
: undefined
| LoaderContext
; item
: Context
["documentCreationInput"
] ; replace
: undefined
| boolean
} : never
: never
: never
extends Record
<string
, any
> ? (options
: Context
["indexes"
][number
] extends I
? I
extends unknown
? I
extends { PK
: readonly PK
[] ; SK?
: readonly SK
[] } ? { condition
: undefined
| FilterRecord
<Context
["documentCreationInput"
]> ; context
: undefined
| LoaderContext
; item
: Context
["documentCreationInput"
] ; replace
: undefined
| boolean
} : never
: never
: never
) => Promise
<{ created
: boolean
; error?
: null
| string
; item
: null
| Context
["document"
] ; updated
: boolean
}> & _EntityLoaderUtils
<Context
["indexes"
][number
] extends I
? I
extends unknown
? I
extends { PK
: readonly PK
[] ; SK?
: readonly SK
[] } ? { condition
: undefined
| FilterRecord
<Context
["documentCreationInput"
]> ; context
: undefined
| LoaderContext
; item
: Context
["documentCreationInput"
] ; replace
: undefined
| boolean
} : never
: never
: never
, Context
> : CreateOne
<Context
["documentCreationInput"
], Context
["document"
], Context
["indexes"
]>
EntityLoaderMethods.createOne
packages/entity/src/EntityInterfaces/EntityLoaderMethods.ts:58
• databaseType: GraphType
<{ object
: Context
["outputDefinition"
] }>
packages/entity/src/EntityInterfaces/EntityFromContext.ts:76
• deleteMany: Context
["indexes"
][number
] extends I
? I
extends unknown
? I
extends { PK
: readonly PK
[] ; SK?
: readonly SK
[] } ? { condition
: undefined
| FilterRecord
<Context
["document"
]> ; context
: undefined
| LoaderContext
; filter
: Compute
<UnionToIntersection
<IndexFilterRecord
<IndexField
<PK
, never
>, IndexField
<SK
, undefined
>> extends F
? F
extends unknown
? { [K in string | number | symbol]?: F[K] } & { id?
: PKSKValueType
} : {} : {}>, 1
> } : never
: never
: never
extends Record
<string
, any
> ? (options
: Context
["indexes"
][number
] extends I
? I
extends unknown
? I
extends { PK
: readonly PK
[] ; SK?
: readonly SK
[] } ? { condition
: undefined
| FilterRecord
<Context
["document"
]> ; context
: undefined
| LoaderContext
; filter
: Compute
<UnionToIntersection
<IndexFilterRecord
<IndexField
<PK
, never
>, IndexField
<SK
, undefined
>> extends F
? F
extends unknown
? { [K in string | number | symbol]?: F[K] } & { id?
: PKSKValueType
} : {} : {}>, 1
> } : never
: never
: never
) => Promise
<{ deletedCount
: number
; error?
: null
| string
}> & _EntityLoaderUtils
<Context
["indexes"
][number
] extends I
? I
extends unknown
? I
extends { PK
: readonly PK
[] ; SK?
: readonly SK
[] } ? { condition
: undefined
| FilterRecord
<Context
["document"
]> ; context
: undefined
| LoaderContext
; filter
: Compute
<UnionToIntersection
<IndexFilterRecord
<IndexField
<PK
, never
>, IndexField
<SK
, undefined
>> extends F
? F
extends unknown
? { [K in string | number | symbol]?: F[K] } & { id?
: PKSKValueType
} : {} : {}>, 1
> } : never
: never
: never
, Context
> : DeleteMany
<Context
["document"
], Context
["indexes"
]>
EntityLoaderMethods.deleteMany
packages/entity/src/EntityInterfaces/EntityLoaderMethods.ts:70
• deleteOne: Context
["indexes"
][number
] extends I
? I
extends unknown
? I
extends { PK
: readonly PK
[] ; SK?
: readonly SK
[] } ? { condition
: undefined
| FilterRecord
<Context
["document"
]> ; context
: undefined
| LoaderContext
; filter
: Compute
<UnionToIntersection
<IndexFilterRecord
<IndexField
<PK
, never
>, IndexField
<SK
, undefined
>> extends F
? F
extends unknown
? { [K in string | number | symbol]?: F[K] } & { id?
: PKSKValueType
} : {} : {}>, 1
> } : never
: never
: never
extends Record
<string
, any
> ? (options
: Context
["indexes"
][number
] extends I
? I
extends unknown
? I
extends { PK
: readonly PK
[] ; SK?
: readonly SK
[] } ? { condition
: undefined
| FilterRecord
<Context
["document"
]> ; context
: undefined
| LoaderContext
; filter
: Compute
<UnionToIntersection
<IndexFilterRecord
<IndexField
<PK
, never
>, IndexField
<SK
, undefined
>> extends F
? F
extends unknown
? { [K in string | number | symbol]?: F[K] } & { id?
: PKSKValueType
} : {} : {}>, 1
> } : never
: never
: never
) => Promise
<{ item
: null
| Context
["document"
] }> & _EntityLoaderUtils
<Context
["indexes"
][number
] extends I
? I
extends unknown
? I
extends { PK
: readonly PK
[] ; SK?
: readonly SK
[] } ? { condition
: undefined
| FilterRecord
<Context
["document"
]> ; context
: undefined
| LoaderContext
; filter
: Compute
<UnionToIntersection
<IndexFilterRecord
<IndexField
<PK
, never
>, IndexField
<SK
, undefined
>> extends F
? F
extends unknown
? { [K in string | number | symbol]?: F[K] } & { id?
: PKSKValueType
} : {} : {}>, 1
> } : never
: never
: never
, Context
> : DeleteOne
<Context
["document"
], Context
["indexes"
]>
EntityLoaderMethods.deleteOne
packages/entity/src/EntityInterfaces/EntityLoaderMethods.ts:72
• edgeType: EdgeType
<GraphType
<{ object
: Context
["outputDefinition"
] }>>
packages/entity/src/EntityInterfaces/EntityFromContext.ts:78
• extend: ExtendEntity
<EntityFromContext
<Context
>>
packages/entity/src/EntityInterfaces/EntityFromContext.ts:112
• extendInput: ExtendObjectDefinition
<{ object
: Context
["originDefinition"
] }, { object
: Context
["originDefinition"
] }>
packages/entity/src/EntityInterfaces/EntityFromContext.ts:48
• extendUpdate: ExtendObjectDefinition
<{ object
: OverrideField
<DescribeObjectDefinition
<Context
["originDefinition"
]>, keyof Context
["originDefinition"
], { optional
: true
}> }, { object
: OverrideField
<DescribeObjectDefinition
<Context
["originDefinition"
]>, keyof Context
["originDefinition"
], { optional
: true
}> }>
packages/entity/src/EntityInterfaces/EntityFromContext.ts:53
• findById: Context
["indexes"
][number
] extends I
? I
extends unknown
? I
extends { PK
: readonly PK
[] ; SK?
: readonly SK
[] } ? { condition
: undefined
| FilterRecord
<Context
["document"
]> ; consistent
: undefined
| boolean
; context
: undefined
| LoaderContext
; id
: string
; projection
: undefined
| string
[] } : never
: never
: never
extends Record
<string
, any
> ? (options
: Context
["indexes"
][number
] extends I
? I
extends unknown
? I
extends { PK
: readonly PK
[] ; SK?
: readonly SK
[] } ? { condition
: undefined
| FilterRecord
<Context
["document"
]> ; consistent
: undefined
| boolean
; context
: undefined
| LoaderContext
; id
: string
; projection
: undefined
| string
[] } : never
: never
: never
) => Promise
<{ item
: null
| Context
["document"
] }> & _EntityLoaderUtils
<Context
["indexes"
][number
] extends I
? I
extends unknown
? I
extends { PK
: readonly PK
[] ; SK?
: readonly SK
[] } ? { condition
: undefined
| FilterRecord
<Context
["document"
]> ; consistent
: undefined
| boolean
; context
: undefined
| LoaderContext
; id
: string
; projection
: undefined
| string
[] } : never
: never
: never
, Context
> : FindById
<Context
["document"
], Context
["indexes"
]>
EntityLoaderMethods.findById
packages/entity/src/EntityInterfaces/EntityLoaderMethods.ts:74
• findMany: Context
["indexes"
][number
] extends I
? I
extends unknown
? I
extends { PK
: readonly PK
[] ; SK?
: readonly SK
[] } ? { after
: undefined
| string
| IndexFilterRecord
<IndexField
<PK
, never
>, IndexField
<SK
, undefined
>> extends R
? { [K in string | number | symbol]: R[K] } : {} ; condition
: undefined
| FilterRecord
<Context
["document"
]> ; consistent
: undefined
| boolean
; context
: undefined
| LoaderContext
; filter
: Compute
<UnionToIntersection
<IndexFilterRecord
<IndexField
<PK
, never
>, IndexField
<SK
, undefined
>> extends F
? F
extends unknown
? { [K in string | number | symbol]?: F[K] } & { id?
: PKSKValueType
} : {} : {}>, 1
> ; first
: undefined
| number
; projection
: undefined
| string
[] ; sort
: undefined
| QuerySort
} : never
: never
: never
extends Record
<string
, any
> ? (options
: Context
["indexes"
][number
] extends I
? I
extends unknown
? I
extends { PK
: readonly PK
[] ; SK?
: readonly SK
[] } ? { after
: undefined
| string
| IndexFilterRecord
<IndexField
<PK
, never
>, IndexField
<SK
, undefined
>> extends R
? { [K in string | number | symbol]: R[K] } : {} ; condition
: undefined
| FilterRecord
<Context
["document"
]> ; consistent
: undefined
| boolean
; context
: undefined
| LoaderContext
; filter
: Compute
<UnionToIntersection
<IndexFilterRecord
<IndexField
<PK
, never
>, IndexField
<SK
, undefined
>> extends F
? F
extends unknown
? { [K in string | number | symbol]?: F[K] } & { id?
: PKSKValueType
} : {} : {}>, 1
> ; first
: undefined
| number
; projection
: undefined
| string
[] ; sort
: undefined
| QuerySort
} : never
: never
: never
) => Promise
<{ items
: Context
["document"
][] }> & _EntityLoaderUtils
<Context
["indexes"
][number
] extends I
? I
extends unknown
? I
extends { PK
: readonly PK
[] ; SK?
: readonly SK
[] } ? { after
: undefined
| string
| IndexFilterRecord
<IndexField
<PK
, never
>, IndexField
<SK
, undefined
>> extends R
? { [K in string | number | symbol]: R[K] } : {} ; condition
: undefined
| FilterRecord
<Context
["document"
]> ; consistent
: undefined
| boolean
; context
: undefined
| LoaderContext
; filter
: Compute
<UnionToIntersection
<IndexFilterRecord
<IndexField
<PK
, never
>, IndexField
<SK
, undefined
>> extends F
? F
extends unknown
? { [K in string | number | symbol]?: F[K] } & { id?
: PKSKValueType
} : {} : {}>, 1
> ; first
: undefined
| number
; projection
: undefined
| string
[] ; sort
: undefined
| QuerySort
} : never
: never
: never
, Context
> : FindMany
<Context
["document"
], Context
["indexes"
]>
EntityLoaderMethods.findMany
packages/entity/src/EntityInterfaces/EntityLoaderMethods.ts:66
• findOne: Context
["indexes"
][number
] extends I
? I
extends unknown
? I
extends { PK
: readonly PK
[] ; SK?
: readonly SK
[] } ? { condition
: undefined
| FilterRecord
<Context
["document"
]> ; consistent
: undefined
| boolean
; context
: undefined
| LoaderContext
; filter
: Compute
<UnionToIntersection
<IndexFilterRecord
<IndexField
<PK
, never
>, IndexField
<SK
, undefined
>> extends F
? F
extends unknown
? { [K in string | number | symbol]?: F[K] } & { id?
: PKSKValueType
} : {} : {}>, 1
> ; projection
: undefined
| string
[] } : never
: never
: never
extends Record
<string
, any
> ? (options
: Context
["indexes"
][number
] extends I
? I
extends unknown
? I
extends { PK
: readonly PK
[] ; SK?
: readonly SK
[] } ? { condition
: undefined
| FilterRecord
<Context
["document"
]> ; consistent
: undefined
| boolean
; context
: undefined
| LoaderContext
; filter
: Compute
<UnionToIntersection
<IndexFilterRecord
<IndexField
<PK
, never
>, IndexField
<SK
, undefined
>> extends F
? F
extends unknown
? { [K in string | number | symbol]?: F[K] } & { id?
: PKSKValueType
} : {} : {}>, 1
> ; projection
: undefined
| string
[] } : never
: never
: never
) => Promise
<{ item
: null
| Context
["document"
] }> & _EntityLoaderUtils
<Context
["indexes"
][number
] extends I
? I
extends unknown
? I
extends { PK
: readonly PK
[] ; SK?
: readonly SK
[] } ? { condition
: undefined
| FilterRecord
<Context
["document"
]> ; consistent
: undefined
| boolean
; context
: undefined
| LoaderContext
; filter
: Compute
<UnionToIntersection
<IndexFilterRecord
<IndexField
<PK
, never
>, IndexField
<SK
, undefined
>> extends F
? F
extends unknown
? { [K in string | number | symbol]?: F[K] } & { id?
: PKSKValueType
} : {} : {}>, 1
> ; projection
: undefined
| string
[] } : never
: never
: never
, Context
> : FindOne
<Context
["document"
], Context
["indexes"
]>
EntityLoaderMethods.findOne
packages/entity/src/EntityInterfaces/EntityLoaderMethods.ts:64
• Readonly
hasAliases: boolean
packages/entity/src/EntityInterfaces/EntityFromContext.ts:86
• hooks: EntityHooks
<{}, AnyEntity
>
packages/entity/src/EntityInterfaces/EntityFromContext.ts:114
• indexGraphTypes: Object
▪ [K: string
]: GraphType
<{ object
: ObjectDefinitionInput
}>
packages/entity/src/EntityInterfaces/EntityFromContext.ts:88
• indexRelations: EntityIndexRelations
packages/entity/src/EntityInterfaces/EntityFromContext.ts:95
• indexes: Context
["indexes"
]
packages/entity/src/EntityInterfaces/EntityFromContext.ts:42
• inputType: GraphType
<{ object
: Omit
<EntityDocumentBaseDef
<true
>, keyof Context
["originDefinition"
]> & Context
["originDefinition"
] }>
packages/entity/src/EntityInterfaces/EntityFromContext.ts:32
• name: string
packages/entity/src/EntityInterfaces/EntityFromContext.ts:28
• originType: GraphType
<{ object
: Context
["originDefinition"
] }>
packages/entity/src/EntityInterfaces/EntityFromContext.ts:30
• paginate: Context
["indexes"
][number
] extends I
? I
extends unknown
? I
extends { PK
: readonly PK
[] ; SK?
: readonly SK
[] } ? { after
: undefined
| string
| IndexFilterRecord
<IndexField
<PK
, never
>, IndexField
<SK
, undefined
>> extends R
? { [K in string | number | symbol]: R[K] } : {} ; condition
: undefined
| FilterRecord
<Context
["document"
]> ; consistent
: undefined
| boolean
; context
: undefined
| LoaderContext
; filter
: Compute
<UnionToIntersection
<IndexFilterRecord
<IndexField
<PK
, never
>, IndexField
<SK
, undefined
>> extends F
? F
extends unknown
? { [K in string | number | symbol]?: F[K] } & { id?
: PKSKValueType
} : {} : {}>, 1
> ; first
: undefined
| number
; projection
: undefined
| string
[] ; sort
: undefined
| QuerySort
} : never
: never
: never
extends Record
<string
, any
> ? (options
: Context
["indexes"
][number
] extends I
? I
extends unknown
? I
extends { PK
: readonly PK
[] ; SK?
: readonly SK
[] } ? { after
: undefined
| string
| IndexFilterRecord
<IndexField
<PK
, never
>, IndexField
<SK
, undefined
>> extends R
? { [K in string | number | symbol]: R[K] } : {} ; condition
: undefined
| FilterRecord
<Context
["document"
]> ; consistent
: undefined
| boolean
; context
: undefined
| LoaderContext
; filter
: Compute
<UnionToIntersection
<IndexFilterRecord
<IndexField
<PK
, never
>, IndexField
<SK
, undefined
>> extends F
? F
extends unknown
? { [K in string | number | symbol]?: F[K] } & { id?
: PKSKValueType
} : {} : {}>, 1
> ; first
: undefined
| number
; projection
: undefined
| string
[] ; sort
: undefined
| QuerySort
} : never
: never
: never
) => Promise
<{ edges
: { cursor
: string
; node
: Context
["document"
] }[] ; pageInfo
: { endCursor
: undefined
| string
; hasNextPage
: boolean
; hasPreviousPage
: boolean
; startCursor
: undefined
| string
} }> & _EntityLoaderUtils
<Context
["indexes"
][number
] extends I
? I
extends unknown
? I
extends { PK
: readonly PK
[] ; SK?
: readonly SK
[] } ? { after
: undefined
| string
| IndexFilterRecord
<IndexField
<PK
, never
>, IndexField
<SK
, undefined
>> extends R
? { [K in string | number | symbol]: R[K] } : {} ; condition
: undefined
| FilterRecord
<Context
["document"
]> ; consistent
: undefined
| boolean
; context
: undefined
| LoaderContext
; filter
: Compute
<UnionToIntersection
<IndexFilterRecord
<IndexField
<PK
, never
>, IndexField
<SK
, undefined
>> extends F
? F
extends unknown
? { [K in string | number | symbol]?: F[K] } & { id?
: PKSKValueType
} : {} : {}>, 1
> ; first
: undefined
| number
; projection
: undefined
| string
[] ; sort
: undefined
| QuerySort
} : never
: never
: never
, Context
> : Paginate
<Context
["document"
], Context
["indexes"
]>
EntityLoaderMethods.paginate
packages/entity/src/EntityInterfaces/EntityLoaderMethods.ts:68
• paginationType: PaginationType
<GraphType
<{ object
: Context
["outputDefinition"
] }>>
packages/entity/src/EntityInterfaces/EntityFromContext.ts:97
• parse: (...args
: [input: any, options?: FieldParserConfig]) => Context
["document"
]
▸ (...args
): Context
["document"
]
Name | Type |
---|---|
...args |
[input: any, options?: FieldParserConfig] |
Context
["document"
]
packages/entity/src/EntityInterfaces/EntityFromContext.ts:99
• setOption: <Key, V>(optionName
: Key
, value
: V
) => EntityFromContext
<Context
>
▸ <Key
, V
>(optionName
, value
): EntityFromContext
<Context
>
Name | Type |
---|---|
Key |
extends string | number | symbol |
V |
V |
Name | Type |
---|---|
optionName |
Key |
value |
V |
EntityFromContext
<Context
>
packages/entity/src/EntityInterfaces/EntityFromContext.ts:103
• transporter: undefined
| Transporter
<any
>
packages/entity/src/EntityInterfaces/EntityFromContext.ts:108
• type: GraphType
<{ object
: Context
["outputDefinition"
] }>
packages/entity/src/EntityInterfaces/EntityFromContext.ts:44
• updateMany: Context
["indexes"
][number
] extends I
? I
extends unknown
? I
extends { PK
: readonly PK
[] ; SK?
: readonly SK
[] } ? { condition
: undefined
| FilterRecord
<Context
["document"
]> ; context
: undefined
| LoaderContext
; filter
: Compute
<UnionToIntersection
<IndexFilterRecord
<IndexField
<PK
, never
>, IndexField
<SK
, undefined
>> extends F
? F
extends unknown
? { [K in string | number | symbol]?: F[K] } & { id?
: PKSKValueType
} : {} : {}>, 1
> ; update
: UpdateExpression
<Context
["document"
]> ; upsert
: undefined
| boolean
} : never
: never
: never
extends Record
<string
, any
> ? (options
: Context
["indexes"
][number
] extends I
? I
extends unknown
? I
extends { PK
: readonly PK
[] ; SK?
: readonly SK
[] } ? { condition
: undefined
| FilterRecord
<Context
["document"
]> ; context
: undefined
| LoaderContext
; filter
: Compute
<UnionToIntersection
<IndexFilterRecord
<IndexField
<PK
, never
>, IndexField
<SK
, undefined
>> extends F
? F
extends unknown
? { [K in string | number | symbol]?: F[K] } & { id?
: PKSKValueType
} : {} : {}>, 1
> ; update
: UpdateExpression
<Context
["document"
]> ; upsert
: undefined
| boolean
} : never
: never
: never
) => Promise
<{ error?
: null
| string
; modifiedCount
: null
| number
; upsertedId
: null
| string
}> & _EntityLoaderUtils
<Context
["indexes"
][number
] extends I
? I
extends unknown
? I
extends { PK
: readonly PK
[] ; SK?
: readonly SK
[] } ? { condition
: undefined
| FilterRecord
<Context
["document"
]> ; context
: undefined
| LoaderContext
; filter
: Compute
<UnionToIntersection
<IndexFilterRecord
<IndexField
<PK
, never
>, IndexField
<SK
, undefined
>> extends F
? F
extends unknown
? { [K in string | number | symbol]?: F[K] } & { id?
: PKSKValueType
} : {} : {}>, 1
> ; update
: UpdateExpression
<Context
["document"
]> ; upsert
: undefined
| boolean
} : never
: never
: never
, Context
> : UpdateMany
<Context
["document"
], Context
["indexes"
]>
EntityLoaderMethods.updateMany
packages/entity/src/EntityInterfaces/EntityLoaderMethods.ts:76
• updateOne: Context
["indexes"
][number
] extends I
? I
extends unknown
? I
extends { PK
: readonly PK
[] ; SK?
: readonly SK
[] } ? { condition
: undefined
| FilterRecord
<Context
["document"
]> ; context
: undefined
| LoaderContext
; filter
: Compute
<UnionToIntersection
<IndexFilterRecord
<IndexField
<PK
, never
>, IndexField
<SK
, undefined
>> extends F
? F
extends unknown
? { [K in string | number | symbol]?: F[K] } & { id?
: PKSKValueType
} : {} : {}>, 1
> ; update
: UpdateExpression
<Context
["document"
]> ; upsert
: undefined
| boolean
} : never
: never
: never
extends Record
<string
, any
> ? (options
: Context
["indexes"
][number
] extends I
? I
extends unknown
? I
extends { PK
: readonly PK
[] ; SK?
: readonly SK
[] } ? { condition
: undefined
| FilterRecord
<Context
["document"
]> ; context
: undefined
| LoaderContext
; filter
: Compute
<UnionToIntersection
<IndexFilterRecord
<IndexField
<PK
, never
>, IndexField
<SK
, undefined
>> extends F
? F
extends unknown
? { [K in string | number | symbol]?: F[K] } & { id?
: PKSKValueType
} : {} : {}>, 1
> ; update
: UpdateExpression
<Context
["document"
]> ; upsert
: undefined
| boolean
} : never
: never
: never
) => Promise
<{ created
: boolean
; error?
: null
| string
; item
: null
| Context
["document"
] ; updated
: boolean
}> & _EntityLoaderUtils
<Context
["indexes"
][number
] extends I
? I
extends unknown
? I
extends { PK
: readonly PK
[] ; SK?
: readonly SK
[] } ? { condition
: undefined
| FilterRecord
<Context
["document"
]> ; context
: undefined
| LoaderContext
; filter
: Compute
<UnionToIntersection
<IndexFilterRecord
<IndexField
<PK
, never
>, IndexField
<SK
, undefined
>> extends F
? F
extends unknown
? { [K in string | number | symbol]?: F[K] } & { id?
: PKSKValueType
} : {} : {}>, 1
> ; update
: UpdateExpression
<Context
["document"
]> ; upsert
: undefined
| boolean
} : never
: never
: never
, Context
> : UpdateOne
<Context
["document"
], Context
["indexes"
]>
EntityLoaderMethods.updateOne
packages/entity/src/EntityInterfaces/EntityLoaderMethods.ts:78
• usedOptions: Context
["options"
]
packages/entity/src/EntityInterfaces/EntityFromContext.ts:40
▸ getDocumentId(doc
): string
Name | Type |
---|---|
doc |
Record <string , any > |
string
packages/entity/src/EntityInterfaces/EntityFromContext.ts:80
▸ getIndexFields(doc
): CommonIndexFields
Name | Type |
---|---|
doc |
Record <string , any > |
CommonIndexFields
packages/entity/src/EntityInterfaces/EntityFromContext.ts:82
▸ parseDocumentIndexes(doc
): ParsedDocumentIndexes
Name | Type |
---|---|
doc |
Record <string , any > |
ParsedDocumentIndexes
packages/entity/src/EntityInterfaces/EntityFromContext.ts:101