@wxn0brp/db-core
Preparing search index...
db/multiStorage
MultiBackend
Class MultiBackend
Hierarchy (
View Summary
)
ActionsBase
MultiBackend
Index
Constructors
constructor
Properties
_
inited
adapter
Opts
backends
primary
Backend
smart
Executor
version
Methods
add
begin
Transaction
bulk
Add
close
commit
Transaction
count
create
Index
ensure
Collection
find
find
One
get
Collections
init
isset
Collection
remove
remove
Collection
remove
Index
remove
One
rollback
Transaction
toggle
One
update
update
One
update
One
Or
Add
Constructors
constructor
new
MultiBackend
(
backends
:
ActionsBase
[]
,
primaryIndex
?:
number
)
:
MultiBackend
Parameters
backends
:
ActionsBase
[]
primaryIndex
:
number
= 0
Returns
MultiBackend
Properties
_
inited
_inited
:
boolean
= true
adapter
Opts
adapterOpts
:
AdapterOpts
= ...
backends
backends
:
ActionsBase
[]
primary
Backend
primaryBackend
:
ActionsBase
smart
Executor
smartExecutor
:
boolean
= false
version
version
:
string
= ...
Methods
add
add
(
config
:
Add
)
:
Promise
<
DataInternal
>
Parameters
config
:
Add
Returns
Promise
<
DataInternal
>
begin
Transaction
beginTransaction
()
:
Promise
<
TransactionHandle
>
Returns
Promise
<
TransactionHandle
>
bulk
Add
bulkAdd
(
config
:
BulkAdd
)
:
Promise
<
DataInternal
[]
>
Parameters
config
:
BulkAdd
Returns
Promise
<
DataInternal
[]
>
close
close
(
...
args
:
any
[]
)
:
Promise
<
void
>
Parameters
...
args
:
any
[]
Returns
Promise
<
void
>
commit
Transaction
commitTransaction
()
:
Promise
<
void
>
Returns
Promise
<
void
>
count
count
(
config
:
Count
)
:
Promise
<
number
>
Parameters
config
:
Count
Returns
Promise
<
number
>
create
Index
createIndex
(
config
:
CreateIndex
)
:
Promise
<
void
>
Parameters
config
:
CreateIndex
Returns
Promise
<
void
>
ensure
Collection
ensureCollection
(
collection
:
string
)
:
Promise
<
boolean
>
Parameters
collection
:
string
Returns
Promise
<
boolean
>
find
find
(
config
:
Find
)
:
Promise
<
DataInternal
[]
>
Parameters
config
:
Find
Returns
Promise
<
DataInternal
[]
>
find
One
findOne
(
config
:
FindOne
)
:
Promise
<
DataInternal
|
null
>
Parameters
config
:
FindOne
Returns
Promise
<
DataInternal
|
null
>
get
Collections
getCollections
()
:
Promise
<
string
[]
>
Returns
Promise
<
string
[]
>
init
init
(
...
args
:
any
[]
)
:
Promise
<
void
>
Parameters
...
args
:
any
[]
Returns
Promise
<
void
>
isset
Collection
issetCollection
(
collection
:
string
)
:
Promise
<
boolean
>
Parameters
collection
:
string
Returns
Promise
<
boolean
>
remove
remove
(
config
:
Remove
)
:
Promise
<
DataInternal
[]
>
Parameters
config
:
Remove
Returns
Promise
<
DataInternal
[]
>
remove
Collection
removeCollection
(
collection
:
string
)
:
Promise
<
boolean
>
Parameters
collection
:
string
Returns
Promise
<
boolean
>
remove
Index
removeIndex
(
config
:
RemoveIndex
)
:
Promise
<
void
>
Parameters
config
:
RemoveIndex
Returns
Promise
<
void
>
remove
One
removeOne
(
config
:
Remove
)
:
Promise
<
DataInternal
|
null
>
Parameters
config
:
Remove
Returns
Promise
<
DataInternal
|
null
>
rollback
Transaction
rollbackTransaction
()
:
Promise
<
void
>
Returns
Promise
<
void
>
toggle
One
toggleOne
(
config
:
ToggleOne
)
:
Promise
<
ToggleOneResult
<
DataInternal
>
>
Parameters
config
:
ToggleOne
Returns
Promise
<
ToggleOneResult
<
DataInternal
>
>
update
update
(
config
:
Update
)
:
Promise
<
DataInternal
[]
>
Parameters
config
:
Update
Returns
Promise
<
DataInternal
[]
>
update
One
updateOne
(
config
:
Update
)
:
Promise
<
DataInternal
|
null
>
Parameters
config
:
Update
Returns
Promise
<
DataInternal
|
null
>
update
One
Or
Add
updateOneOrAdd
(
config
:
VQueryT
.
UpdateOneOrAdd
,
)
:
Promise
<
UpdateOneOrAddResult
<
DataInternal
>
>
Parameters
config
:
VQueryT
.
UpdateOneOrAdd
Returns
Promise
<
UpdateOneOrAddResult
<
DataInternal
>
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
_
inited
adapter
Opts
backends
primary
Backend
smart
Executor
version
Methods
add
begin
Transaction
bulk
Add
close
commit
Transaction
count
create
Index
ensure
Collection
find
find
One
get
Collections
init
isset
Collection
remove
remove
Collection
remove
Index
remove
One
rollback
Transaction
toggle
One
update
update
One
update
One
Or
Add
@wxn0brp/db-core
Loading...