Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F12660222
datastore-abstract.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
datastore-abstract.ts
View Options
import
type
{
Collection
as
MongoCollection
,
InsertOneResult
,
Document
,
UpdateResult
,
DeleteResult
,
}
from
"mongodb"
;
import
type
{
App
}
from
"../main.js"
;
import
type
{
QueryStage
}
from
"./query-stage.js"
;
import
type
{
OutputOptions
}
from
"./datastore.js"
;
export
default
abstract
class
Datastore
{
constructor
(
public
app
:
App
)
{
this
.
app
=
app
;
}
abstract
start
()
:
Promise
<
void
>
;
abstract
stop
()
:
Promise
<
void
>
;
abstract
find
(
collection_name
:
string
,
query
:
Record
<
string
,
unknown
>
,
options
:
Parameters
<
MongoCollection
[
"find"
]
>
[
1
],
output_options
:
OutputOptions
)
:
Promise
<
Record
<
string
,
unknown
>
[]
>
;
abstract
aggregate
(
collection_name
:
string
,
pipeline
:
QueryStage
[],
_
:
unknown
,
output_options
:
OutputOptions
)
:
Promise
<
Record
<
string
,
unknown
>
[]
>
;
abstract
insert
(
collection_name
:
string
,
to_insert
:
Record
<
string
,
unknown
>
,
options
?:
Parameters
<
MongoCollection
[
"insertOne"
]
>
[
1
]
)
:
Promise
<
InsertOneResult
<
Document
>>
;
abstract
update
(
collection_name
:
string
,
query
:
unknown
,
new_value
:
unknown
)
:
Promise
<
UpdateResult
<
Document
>>
;
abstract
remove
(
collection_name
:
string
,
query
:
unknown
,
just_one
:
boolean
)
:
Promise
<
DeleteResult
>
;
}
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Fri, Nov 28, 15:37 (5 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1036510
Default Alt Text
datastore-abstract.ts (1 KB)
Attached To
Mode
rS Sealious
Attached
Detach File
Event Timeline
Log In to Comment