@wxn0brp/db-core
Preparing search index...
types/valthera
ValtheraCompatible
Interface ValtheraCompatible
interface
ValtheraCompatible
{
add
<
T
=
Data
>
(
query
:
Add
<
T
>
)
:
Promise
<
T
>
;
bulkAdd
<
T
=
Data
>
(
query
:
BulkAdd
<
T
>
)
:
Promise
<
T
[]
>
;
c
<
T
=
Data
>
(
collection
:
string
)
:
Collection
<
T
>
;
count
(
query
:
Count
)
:
Promise
<
number
>
;
createIndex
(
collection
:
string
,
fields
:
string
[]
,
opts
?:
IndexOpts
,
)
:
Promise
<
void
>
;
ensureCollection
(
collection
:
string
)
:
Promise
<
boolean
>
;
find
<
T
=
Data
>
(
query
:
Find
<
T
>
)
:
Promise
<
T
[]
>
;
findOne
<
T
=
Data
>
(
query
:
FindOne
<
T
>
)
:
Promise
<
T
|
null
>
;
getCollections
()
:
Promise
<
string
[]
>
;
issetCollection
(
collection
:
string
)
:
Promise
<
boolean
>
;
remove
<
T
=
Data
>
(
query
:
Remove
<
T
>
)
:
Promise
<
T
[]
>
;
removeCollection
(
collection
:
string
)
:
Promise
<
boolean
>
;
removeIndex
(
collection
:
string
,
fields
:
string
[]
)
:
Promise
<
void
>
;
removeOne
<
T
=
Data
>
(
query
:
Remove
<
T
>
)
:
Promise
<
T
|
null
>
;
toggleOne
<
T
=
Data
>
(
query
:
ToggleOne
<
T
>
)
:
Promise
<
ToggleOneResult
<
T
>
>
;
update
<
T
=
Data
>
(
query
:
Update
<
T
>
)
:
Promise
<
T
[]
>
;
updateOne
<
T
=
Data
>
(
query
:
Update
<
T
>
)
:
Promise
<
T
|
null
>
;
updateOneOrAdd
<
T
=
Data
>
(
query
:
VQueryT
.
UpdateOneOrAdd
<
T
>
,
)
:
Promise
<
UpdateOneOrAddResult
<
T
>
>
;
}
Implemented by
ValtheraClass
Index
Methods
add
bulk
Add
c
count
create
Index
ensure
Collection
find
find
One
get
Collections
isset
Collection
remove
remove
Collection
remove
Index
remove
One
toggle
One
update
update
One
update
One
Or
Add
Methods
add
add
<
T
=
Data
>
(
query
:
Add
<
T
>
)
:
Promise
<
T
>
Type Parameters
T
=
Data
Parameters
query
:
Add
<
T
>
Returns
Promise
<
T
>
bulk
Add
bulkAdd
<
T
=
Data
>
(
query
:
BulkAdd
<
T
>
)
:
Promise
<
T
[]
>
Type Parameters
T
=
Data
Parameters
query
:
BulkAdd
<
T
>
Returns
Promise
<
T
[]
>
c
c
<
T
=
Data
>
(
collection
:
string
)
:
Collection
<
T
>
Type Parameters
T
=
Data
Parameters
collection
:
string
Returns
Collection
<
T
>
count
count
(
query
:
Count
)
:
Promise
<
number
>
Parameters
query
:
Count
Returns
Promise
<
number
>
create
Index
createIndex
(
collection
:
string
,
fields
:
string
[]
,
opts
?:
IndexOpts
,
)
:
Promise
<
void
>
Parameters
collection
:
string
fields
:
string
[]
Optional
opts
:
IndexOpts
Returns
Promise
<
void
>
ensure
Collection
ensureCollection
(
collection
:
string
)
:
Promise
<
boolean
>
Parameters
collection
:
string
Returns
Promise
<
boolean
>
find
find
<
T
=
Data
>
(
query
:
Find
<
T
>
)
:
Promise
<
T
[]
>
Type Parameters
T
=
Data
Parameters
query
:
Find
<
T
>
Returns
Promise
<
T
[]
>
find
One
findOne
<
T
=
Data
>
(
query
:
FindOne
<
T
>
)
:
Promise
<
T
|
null
>
Type Parameters
T
=
Data
Parameters
query
:
FindOne
<
T
>
Returns
Promise
<
T
|
null
>
get
Collections
getCollections
()
:
Promise
<
string
[]
>
Returns
Promise
<
string
[]
>
isset
Collection
issetCollection
(
collection
:
string
)
:
Promise
<
boolean
>
Parameters
collection
:
string
Returns
Promise
<
boolean
>
remove
remove
<
T
=
Data
>
(
query
:
Remove
<
T
>
)
:
Promise
<
T
[]
>
Type Parameters
T
=
Data
Parameters
query
:
Remove
<
T
>
Returns
Promise
<
T
[]
>
remove
Collection
removeCollection
(
collection
:
string
)
:
Promise
<
boolean
>
Parameters
collection
:
string
Returns
Promise
<
boolean
>
remove
Index
removeIndex
(
collection
:
string
,
fields
:
string
[]
)
:
Promise
<
void
>
Parameters
collection
:
string
fields
:
string
[]
Returns
Promise
<
void
>
remove
One
removeOne
<
T
=
Data
>
(
query
:
Remove
<
T
>
)
:
Promise
<
T
|
null
>
Type Parameters
T
=
Data
Parameters
query
:
Remove
<
T
>
Returns
Promise
<
T
|
null
>
toggle
One
toggleOne
<
T
=
Data
>
(
query
:
ToggleOne
<
T
>
)
:
Promise
<
ToggleOneResult
<
T
>
>
Type Parameters
T
=
Data
Parameters
query
:
ToggleOne
<
T
>
Returns
Promise
<
ToggleOneResult
<
T
>
>
update
update
<
T
=
Data
>
(
query
:
Update
<
T
>
)
:
Promise
<
T
[]
>
Type Parameters
T
=
Data
Parameters
query
:
Update
<
T
>
Returns
Promise
<
T
[]
>
update
One
updateOne
<
T
=
Data
>
(
query
:
Update
<
T
>
)
:
Promise
<
T
|
null
>
Type Parameters
T
=
Data
Parameters
query
:
Update
<
T
>
Returns
Promise
<
T
|
null
>
update
One
Or
Add
updateOneOrAdd
<
T
=
Data
>
(
query
:
VQueryT
.
UpdateOneOrAdd
<
T
>
,
)
:
Promise
<
UpdateOneOrAddResult
<
T
>
>
Type Parameters
T
=
Data
Parameters
query
:
VQueryT
.
UpdateOneOrAdd
<
T
>
Returns
Promise
<
UpdateOneOrAddResult
<
T
>
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Methods
add
bulk
Add
c
count
create
Index
ensure
Collection
find
find
One
get
Collections
isset
Collection
remove
remove
Collection
remove
Index
remove
One
toggle
One
update
update
One
update
One
Or
Add
@wxn0brp/db-core
Loading...