Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F12656899
query-not.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
875 B
Referenced Files
None
Subscribers
None
query-not.ts
View Options
import
Query
,
{
type
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
Fri, Nov 28, 15:15 (15 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1035619
Default Alt Text
query-not.ts (875 B)
Attached To
Mode
rS Sealious
Attached
Detach File
Event Timeline
Log In to Comment