Search
Preparing search index...
The search index is not available
@chocolatesoup/joiful-dynamodb
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
@chocolatesoup/joiful-dynamodb
Entity
Class Entity
Hierarchy
Entity
Entity
Index
Constructors
constructor
Accessors
_entity
Name
attributes
db
Attributes
db
Children
Foreign
Keys
db
Key
db
Parent
Foreign
Keys
dirty
entity
Condition
Expression
Opts
error
parents
valid
validated
Attributes
_entity
Name
attribute
List
Methods
create
delete
delete
With
Children
load
load
With
Related
toJSON
update
validate
add
Entities
To
Filter
Expression
create
delete
Item
get
Item
get
Item
With
Related
query
query
All
scan
scan
All
update
validate
Constructors
constructor
new
Entity
(
item
?:
Record
<
string
,
any
>
)
:
Entity
Parameters
item:
Record
<
string
,
any
>
= {}
Returns
Entity
Accessors
_entity
Name
get
_entityName
(
)
:
string
Returns
string
attributes
get
attributes
(
)
:
Record
<
string
,
any
>
set
attributes
(
item
:
Record
<
string
,
any
>
)
:
void
Returns
Record
<
string
,
any
>
Parameters
item:
Record
<
string
,
any
>
Returns
void
db
Attributes
get
dbAttributes
(
)
:
Record
<
string
,
any
>
Returns
Record
<
string
,
any
>
db
Children
Foreign
Keys
get
dbChildrenForeignKeys
(
)
:
Record
<
string
,
string
>
Returns
Record
<
string
,
string
>
db
Key
get
dbKey
(
)
:
Record
<
string
,
any
>
Returns
Record
<
string
,
any
>
db
Parent
Foreign
Keys
get
dbParentForeignKeys
(
)
:
Record
<
string
,
string
>
Returns
Record
<
string
,
string
>
dirty
get
dirty
(
)
:
boolean
set
dirty
(
v
:
boolean
)
:
void
Returns
boolean
Parameters
v:
boolean
Returns
void
entity
Condition
Expression
Opts
get
entityConditionExpressionOpts
(
)
:
{
ConditionExpression
:
string
;
ExpressionAttributeNames
:
{}
;
ExpressionAttributeValues
:
{}
}
Returns
{
ConditionExpression
:
string
;
ExpressionAttributeNames
:
{}
;
ExpressionAttributeValues
:
{}
}
Condition
Expression
:
string
Expression
Attribute
Names
:
{}
Expression
Attribute
Values
:
{}
error
get
error
(
)
:
undefined
|
ValidationError
set
error
(
v
:
undefined
|
ValidationError
)
:
void
Returns
undefined
|
ValidationError
Parameters
v:
undefined
|
ValidationError
Returns
void
parents
get
parents
(
)
:
Entity
[]
Returns
Entity
[]
valid
get
valid
(
)
:
boolean
Returns
boolean
validated
Attributes
get
validatedAttributes
(
)
:
undefined
|
Record
<
string
,
any
>
set
validatedAttributes
(
v
:
undefined
|
Record
<
string
,
any
>
)
:
void
Returns
undefined
|
Record
<
string
,
any
>
Parameters
v:
undefined
|
Record
<
string
,
any
>
Returns
void
Static
_entity
Name
get
_entityName
(
)
:
string
Returns
string
Static
attribute
List
get
attributeList
(
)
:
string
[]
Returns
string
[]
Methods
create
create
(
)
:
Promise
<
Entity
>
Returns
Promise
<
Entity
>
delete
delete
(
opts
?:
DeleteCommandInput
)
:
Promise
<
DeleteCommandOutput
>
Parameters
Optional
opts:
DeleteCommandInput
Returns
Promise
<
DeleteCommandOutput
>
delete
With
Children
delete
With
Children
(
)
:
Promise
<
DeleteCommandOutput
>
Returns
Promise
<
DeleteCommandOutput
>
load
load
(
opts
?:
GetCommandInput
)
:
Promise
<
Entity
>
Parameters
Optional
opts:
GetCommandInput
Returns
Promise
<
Entity
>
load
With
Related
load
With
Related
(
)
:
Promise
<
Entity
>
Returns
Promise
<
Entity
>
toJSON
toJSON
(
)
:
{
attributes
:
Record
<
string
,
any
>
;
dirty
:
boolean
;
error
:
undefined
|
string
;
key
:
Record
<
string
,
any
>
;
validatedAttributes
:
undefined
|
Record
<
string
,
any
>
}
Returns
{
attributes
:
Record
<
string
,
any
>
;
dirty
:
boolean
;
error
:
undefined
|
string
;
key
:
Record
<
string
,
any
>
;
validatedAttributes
:
undefined
|
Record
<
string
,
any
>
}
attributes
:
Record
<
string
,
any
>
dirty
:
boolean
error
:
undefined
|
string
key
:
Record
<
string
,
any
>
validated
Attributes
:
undefined
|
Record
<
string
,
any
>
update
update
(
)
:
Promise
<
Entity
>
Returns
Promise
<
Entity
>
validate
validate
(
)
:
{
error
:
undefined
|
ValidationError
;
value
:
any
}
Returns
{
error
:
undefined
|
ValidationError
;
value
:
any
}
error
:
undefined
|
ValidationError
value
:
any
Static
add
Entities
To
Filter
Expression
add
Entities
To
Filter
Expression
(
opts
:
QueryCommandInput
|
ScanCommandInput
, entityNames
?:
string
[]
)
:
QueryCommandInput
|
ScanCommandInput
Parameters
opts:
QueryCommandInput
|
ScanCommandInput
entityNames:
string
[]
= []
Returns
QueryCommandInput
|
ScanCommandInput
Static
create
create
(
attributes
:
Record
<
string
,
any
>
)
:
Promise
<
Entity
>
Parameters
attributes:
Record
<
string
,
any
>
Returns
Promise
<
Entity
>
Static
delete
Item
delete
Item
(
key
:
Record
<
string
,
any
>
, opts
?:
DeleteCommandInput
)
:
Promise
<
DeleteCommandOutput
>
Parameters
key:
Record
<
string
,
any
>
Optional
opts:
DeleteCommandInput
Returns
Promise
<
DeleteCommandOutput
>
Static
get
Item
get
Item
(
key
:
Record
<
string
,
any
>
, opts
?:
GetCommandInput
)
:
Promise
<
Entity
>
Parameters
key:
Record
<
string
,
any
>
Optional
opts:
GetCommandInput
Returns
Promise
<
Entity
>
Static
get
Item
With
Related
get
Item
With
Related
(
key
:
Record
<
string
,
any
>
)
:
Promise
<
Entity
>
Parameters
key:
Record
<
string
,
any
>
Returns
Promise
<
Entity
>
Static
query
query
(
opts
:
QueryOptions
)
:
Promise
<
DynamoPaginator
>
Parameters
opts:
QueryOptions
Returns
Promise
<
DynamoPaginator
>
Static
query
All
query
All
(
opts
:
QueryOptions
)
:
Promise
<
DynamoPaginator
>
Parameters
opts:
QueryOptions
Returns
Promise
<
DynamoPaginator
>
Static
scan
scan
(
opts
?:
ScanOptions
)
:
Promise
<
DynamoPaginator
>
Parameters
Optional
opts:
ScanOptions
Returns
Promise
<
DynamoPaginator
>
Static
scan
All
scan
All
(
opts
?:
ScanOptions
)
:
Promise
<
DynamoPaginator
>
Parameters
Optional
opts:
ScanOptions
Returns
Promise
<
DynamoPaginator
>
Static
update
update
(
attributes
:
Record
<
string
,
any
>
)
:
Promise
<
Entity
>
Parameters
attributes:
Record
<
string
,
any
>
Returns
Promise
<
Entity
>
Static
validate
validate
(
item
:
Record
<
string
,
any
>
)
:
{
error
:
undefined
|
ValidationError
;
value
:
any
}
Parameters
item:
Record
<
string
,
any
>
Returns
{
error
:
undefined
|
ValidationError
;
value
:
any
}
error
:
undefined
|
ValidationError
value
:
any
Exports
Entity
constructor
_entity
Name
attributes
db
Attributes
db
Children
Foreign
Keys
db
Key
db
Parent
Foreign
Keys
dirty
entity
Condition
Expression
Opts
error
parents
valid
validated
Attributes
_entity
Name
attribute
List
create
delete
delete
With
Children
load
load
With
Related
toJSON
update
validate
add
Entities
To
Filter
Expression
create
delete
Item
get
Item
get
Item
With
Related
query
query
All
scan
scan
All
update
validate
Generated using
TypeDoc