@wxn0brp/db-core
Preparing search index...
types/valthera
ValtheraCompatible
Interface ValtheraCompatible
interface
ValtheraCompatible
{
add
<
T
=
Data
>
(
collection
:
string
,
data
:
Arg
<
T
>
,
id_gen
?:
boolean
,
)
:
Promise
<
T
>
;
c
(
collection
:
string
)
:
default
;
ensureCollection
(
collection
:
string
)
:
Promise
<
boolean
>
;
find
<
T
=
Data
>
(
collection
:
string
,
search
?:
Search
<
T
>
,
options
?:
DbFindOpts
<
T
>
,
findOpts
?:
FindOpts
<
T
>
,
context
?:
VContext
,
)
:
Promise
<
T
[]
>
;
findOne
<
T
=
Data
>
(
collection
:
string
,
search
?:
Search
<
T
>
,
findOpts
?:
FindOpts
<
T
>
,
context
?:
VContext
,
)
:
Promise
<
T
>
;
getCollections
()
:
Promise
<
string
[]
>
;
issetCollection
(
collection
:
string
)
:
Promise
<
boolean
>
;
remove
<
T
=
Data
>
(
collection
:
string
,
search
:
Search
<
T
>
,
context
?:
VContext
,
)
:
Promise
<
boolean
>
;
removeCollection
(
collection
:
string
)
:
Promise
<
boolean
>
;
removeOne
<
T
=
Data
>
(
collection
:
string
,
search
:
Search
<
T
>
,
context
?:
VContext
,
)
:
Promise
<
boolean
>
;
toggleOne
<
T
=
Data
>
(
collection
:
string
,
search
:
Search
<
T
>
,
data
?:
Arg
<
T
>
,
context
?:
VContext
,
)
:
Promise
<
boolean
>
;
update
<
T
=
Data
>
(
collection
:
string
,
search
:
Search
<
T
>
,
updater
:
Updater
<
T
>
,
context
?:
VContext
,
)
:
Promise
<
boolean
>
;
updateOne
<
T
=
Data
>
(
collection
:
string
,
search
:
Search
<
T
>
,
updater
:
Updater
<
T
>
,
context
?:
VContext
,
)
:
Promise
<
boolean
>
;
updateOneOrAdd
<
T
=
Data
>
(
collection
:
string
,
search
:
Search
<
T
>
,
updater
:
Updater
<
T
>
,
opts
?:
UpdateOneOrAdd
<
T
>
,
)
:
Promise
<
boolean
>
;
}
Implemented by
ValtheraClass
Index
Methods
add
c
ensure
Collection
find
find
One
get
Collections
isset
Collection
remove
remove
Collection
remove
One
toggle
One
update
update
One
update
One
Or
Add
Methods
add
add
<
T
=
Data
>
(
collection
:
string
,
data
:
Arg
<
T
>
,
id_gen
?:
boolean
)
:
Promise
<
T
>
Type Parameters
T
=
Data
Parameters
collection
:
string
data
:
Arg
<
T
>
Optional
id_gen
:
boolean
Returns
Promise
<
T
>
c
c
(
collection
:
string
)
:
default
Parameters
collection
:
string
Returns
default
ensure
Collection
ensureCollection
(
collection
:
string
)
:
Promise
<
boolean
>
Parameters
collection
:
string
Returns
Promise
<
boolean
>
find
find
<
T
=
Data
>
(
collection
:
string
,
search
?:
Search
<
T
>
,
options
?:
DbFindOpts
<
T
>
,
findOpts
?:
FindOpts
<
T
>
,
context
?:
VContext
,
)
:
Promise
<
T
[]
>
Type Parameters
T
=
Data
Parameters
collection
:
string
Optional
search
:
Search
<
T
>
Optional
options
:
DbFindOpts
<
T
>
Optional
findOpts
:
FindOpts
<
T
>
Optional
context
:
VContext
Returns
Promise
<
T
[]
>
find
One
findOne
<
T
=
Data
>
(
collection
:
string
,
search
?:
Search
<
T
>
,
findOpts
?:
FindOpts
<
T
>
,
context
?:
VContext
,
)
:
Promise
<
T
>
Type Parameters
T
=
Data
Parameters
collection
:
string
Optional
search
:
Search
<
T
>
Optional
findOpts
:
FindOpts
<
T
>
Optional
context
:
VContext
Returns
Promise
<
T
>
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
>
(
collection
:
string
,
search
:
Search
<
T
>
,
context
?:
VContext
,
)
:
Promise
<
boolean
>
Type Parameters
T
=
Data
Parameters
collection
:
string
search
:
Search
<
T
>
Optional
context
:
VContext
Returns
Promise
<
boolean
>
remove
Collection
removeCollection
(
collection
:
string
)
:
Promise
<
boolean
>
Parameters
collection
:
string
Returns
Promise
<
boolean
>
remove
One
removeOne
<
T
=
Data
>
(
collection
:
string
,
search
:
Search
<
T
>
,
context
?:
VContext
,
)
:
Promise
<
boolean
>
Type Parameters
T
=
Data
Parameters
collection
:
string
search
:
Search
<
T
>
Optional
context
:
VContext
Returns
Promise
<
boolean
>
toggle
One
toggleOne
<
T
=
Data
>
(
collection
:
string
,
search
:
Search
<
T
>
,
data
?:
Arg
<
T
>
,
context
?:
VContext
,
)
:
Promise
<
boolean
>
Type Parameters
T
=
Data
Parameters
collection
:
string
search
:
Search
<
T
>
Optional
data
:
Arg
<
T
>
Optional
context
:
VContext
Returns
Promise
<
boolean
>
update
update
<
T
=
Data
>
(
collection
:
string
,
search
:
Search
<
T
>
,
updater
:
Updater
<
T
>
,
context
?:
VContext
,
)
:
Promise
<
boolean
>
Type Parameters
T
=
Data
Parameters
collection
:
string
search
:
Search
<
T
>
updater
:
Updater
<
T
>
Optional
context
:
VContext
Returns
Promise
<
boolean
>
update
One
updateOne
<
T
=
Data
>
(
collection
:
string
,
search
:
Search
<
T
>
,
updater
:
Updater
<
T
>
,
context
?:
VContext
,
)
:
Promise
<
boolean
>
Type Parameters
T
=
Data
Parameters
collection
:
string
search
:
Search
<
T
>
updater
:
Updater
<
T
>
Optional
context
:
VContext
Returns
Promise
<
boolean
>
update
One
Or
Add
updateOneOrAdd
<
T
=
Data
>
(
collection
:
string
,
search
:
Search
<
T
>
,
updater
:
Updater
<
T
>
,
opts
?:
UpdateOneOrAdd
<
T
>
,
)
:
Promise
<
boolean
>
Type Parameters
T
=
Data
Parameters
collection
:
string
search
:
Search
<
T
>
updater
:
Updater
<
T
>
Optional
opts
:
UpdateOneOrAdd
<
T
>
Returns
Promise
<
boolean
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Methods
add
c
ensure
Collection
find
find
One
get
Collections
isset
Collection
remove
remove
Collection
remove
One
toggle
One
update
update
One
update
One
Or
Add
@wxn0brp/db-core
Loading...