Search
Preparing search index...
The search index is not available
@web3-systems/multichain-database
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
@web3-systems/multichain-database
MultichainInMemoryDBClient
Class MultichainInMemoryDBClient
Hierarchy
MultichainInMemoryDBClient
Index
Constructors
constructor
Properties
chain
Id
Default
databases
Methods
add
Collection
add
Collections
add
Dynamic
View
add
Event
Hook
add
Events
Hook
add
Transform
count
create
delete
export
find
find
And
Remove
find
And
Update
find
One
get
get
Collection
get
Document
get
Dynamic
View
get
Transform
import
initialize
Default
Collections
insert
list
Collections
remove
save
search
set
Chain
Id
Default
update
Constructors
constructor
new
Multichain
In
MemoryDBClient
(
chainIdDefault
?:
number
, options
?:
DatabaseOptions
)
:
MultichainInMemoryDBClient
Parameters
Optional
chainIdDefault:
number
Optional
options:
DatabaseOptions
Returns
MultichainInMemoryDBClient
Properties
chain
Id
Default
chain
Id
Default
:
number
= 1
databases
databases
:
{}
= {}
Type declaration
[
key:
string
]:
Loki
Methods
add
Collection
add
Collection
(
collection
:
object
, chainId
?:
number
)
:
void
Parameters
collection:
object
Optional
chainId:
number
Returns
void
add
Collections
add
Collections
(
collections
:
any
[]
, chainId
?:
number
)
:
void
Parameters
collections:
any
[]
Optional
chainId:
number
Returns
void
add
Dynamic
View
add
Dynamic
View
(
collection
:
string
, viewName
:
string
, options
:
DynamicViewOptions
, chainId
?:
number
)
:
DynamicView
<
any
>
Parameters
collection:
string
viewName:
string
options:
DynamicViewOptions
Optional
chainId:
number
Returns
DynamicView
<
any
>
add
Event
Hook
add
Event
Hook
(
collection
:
string
, event
:
string
, hook
:
any
, chainId
?:
number
)
:
void
Parameters
collection:
string
event:
string
hook:
any
Optional
chainId:
number
Returns
void
add
Events
Hook
add
Events
Hook
(
collection
:
string
, hook
:
any
, chainId
?:
number
)
:
void
Parameters
collection:
string
hook:
any
Optional
chainId:
number
Returns
void
add
Transform
add
Transform
(
collection
:
string
, name
:
string
, transform
:
Transform
[]
, chainId
?:
number
)
:
void
Parameters
collection:
string
name:
string
transform:
Transform
[]
Optional
chainId:
number
Returns
void
count
count
(
collection
:
string
, chainId
?:
number
)
:
number
Parameters
collection:
string
Optional
chainId:
number
Returns
number
create
create
(
chainId
:
number
, options
:
DatabaseOptions
)
:
Loki
Parameters
chainId:
number
options:
DatabaseOptions
Returns
Loki
delete
delete
(
chainId
?:
number
)
:
void
Parameters
Optional
chainId:
number
Returns
void
export
export
(
chainId
?:
number
)
:
string
Parameters
Optional
chainId:
number
Returns
string
find
find
(
collection
:
string
, find
:
FindQuery
, chainId
?:
number
)
:
any
[]
Parameters
collection:
string
find:
FindQuery
Optional
chainId:
number
Returns
any
[]
find
And
Remove
find
And
Remove
(
collection
:
string
, find
:
FindQuery
, chainId
?:
number
)
:
void
Parameters
collection:
string
find:
FindQuery
Optional
chainId:
number
Returns
void
find
And
Update
find
And
Update
(
collection
:
string
, find
:
FindQuery
, updateFunction
:
any
, chainId
?:
number
)
:
void
Parameters
collection:
string
find:
FindQuery
updateFunction:
any
Optional
chainId:
number
Returns
void
find
One
find
One
(
collection
:
string
, find
:
any
, chainId
?:
number
)
:
any
Parameters
collection:
string
find:
any
Optional
chainId:
number
Returns
any
get
get
(
chainId
?:
number
)
:
Loki
Parameters
Optional
chainId:
number
Returns
Loki
get
Collection
get
Collection
(
collectionName
:
string
, chainId
?:
number
)
:
Collection
<
any
>
Parameters
collectionName:
string
Optional
chainId:
number
Returns
Collection
<
any
>
get
Document
get
Document
(
collection
:
string
, id
:
number
, returnPosition
:
boolean
, chainId
?:
number
)
:
any
Parameters
collection:
string
id:
number
returnPosition:
boolean
Optional
chainId:
number
Returns
any
get
Dynamic
View
get
Dynamic
View
(
collection
:
string
, name
:
string
, chainId
?:
number
)
:
null
|
DynamicView
<
any
>
Parameters
collection:
string
name:
string
Optional
chainId:
number
Returns
null
|
DynamicView
<
any
>
get
Transform
get
Transform
(
collection
:
string
, name
:
string
, chainId
?:
number
)
:
Transform
[]
Parameters
collection:
string
name:
string
Optional
chainId:
number
Returns
Transform
[]
import
import
(
serializedDb
:
string
, options
?:
object
, chainId
?:
number
)
:
void
Parameters
serializedDb:
string
options:
object
= {}
Optional
chainId:
number
Returns
void
initialize
Default
Collections
initialize
Default
Collections
(
chainId
?:
number
)
:
void
Parameters
Optional
chainId:
number
Returns
void
insert
insert
(
collection
:
string
, data
:
any
, chainId
?:
number
)
:
void
Parameters
collection:
string
data:
any
Optional
chainId:
number
Returns
void
list
Collections
list
Collections
(
chainId
?:
number
)
:
Collection
<
any
>
[]
Parameters
Optional
chainId:
number
Returns
Collection
<
any
>
[]
remove
remove
(
collection
:
string
, document
:
any
, chainId
?:
number
)
:
void
Parameters
collection:
string
document:
any
Optional
chainId:
number
Returns
void
save
save
(
chainId
?:
number
, callback
?:
any
)
:
void
Parameters
Optional
chainId:
number
Optional
callback:
any
Returns
void
search
search
(
collection
:
string
, query
:
ChainedQuery
, chainId
?:
number
)
:
any
[]
Parameters
collection:
string
query:
ChainedQuery
Optional
chainId:
number
Returns
any
[]
set
Chain
Id
Default
set
Chain
Id
Default
(
chainId
:
number
)
:
void
Parameters
chainId:
number
Returns
void
update
update
(
collection
:
string
, data
:
any
, chainId
?:
number
)
:
void
Parameters
collection:
string
data:
any
Optional
chainId:
number
Returns
void
Exports
Multichain
In
MemoryDBClient
constructor
chain
Id
Default
databases
add
Collection
add
Collections
add
Dynamic
View
add
Event
Hook
add
Events
Hook
add
Transform
count
create
delete
export
find
find
And
Remove
find
And
Update
find
One
get
get
Collection
get
Document
get
Dynamic
View
get
Transform
import
initialize
Default
Collections
insert
list
Collections
remove
save
search
set
Chain
Id
Default
update
Generated using
TypeDoc