Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F1374853
query-not.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
870 B
Referenced Files
None
Subscribers
None
query-not.ts
View Options
import
Query
,
{
QueryStage
}
from
"./query.js"
;
import
type
QueryStep
from
"./query-step.js"
;
import
type
{
SQLPreparedStatement
}
from
"./query-base.js"
;
export
default
class
Not
extends
Query
{
query
:
Query
;
constructor
(
query
:
Query
)
{
super
();
this
.
query
=
query
;
this
.
addQuery
(
query
);
}
addQuery
(
query
:
Query
)
:
void
{
const
steps
=
query
.
dump
();
this
.
steps
.
push
(...
steps
);
}
dump
()
:
QueryStep
[]
{
return
this
.
steps
.
map
((
step
)
=>
step
.
negate
());
}
toPipeline
()
:
QueryStage
[]
{
return
this
.
dump
()
.
map
((
step
)
=>
step
.
toPipeline
())
.
reduce
((
acc
,
cur
)
=>
[...
acc
,
...
cur
],
[]);
}
toPreparedStatement
()
:
SQLPreparedStatement
{
const
queryPreparedStatment
=
this
.
query
.
toPreparedStatement
();
return
{
...
queryPreparedStatment
,
where
:
queryPreparedStatment
.
where
?
`(NOT
${
queryPreparedStatment
.
where
}
)`
:
""
,
};
}
}
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Tue, Feb 25, 14:39 (1 d, 9 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
610586
Default Alt Text
query-not.ts (870 B)
Attached To
Mode
rS Sealious
Attached
Detach File
Event Timeline
Log In to Comment