Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
Neos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
love_飞影
Neos
Commits
e9be2905
Commit
e9be2905
authored
Aug 17, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix fts
parent
888bd8b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
16 deletions
+18
-16
src/middleware/sqlite/fts.ts
src/middleware/sqlite/fts.ts
+18
-16
No files found.
src/middleware/sqlite/fts.ts
View file @
e9be2905
...
...
@@ -51,26 +51,28 @@ function getFtsCondtions(conditions: FtsConditions): string {
const
assertMonster
=
`(type &
${
TYPE_MONSTER
}
) > 0`
;
const
typesCondition
=
types
?
.
map
((
type
)
=>
`(type &
${
type
}
) > 0`
)
.
map
((
type
)
=>
`(type &
${
type
}
) > 0`
)
.
join
(
"
OR
"
);
const
levelsCondition
=
levels
?
.
map
((
level
)
=>
`level =
${
level
}
`
)
.
map
((
level
)
=>
`level =
${
level
}
`
)
.
join
(
"
OR
"
);
const
atkCondition
=
atk
?
`atk BETWEEN
${
handleFinite
(
atk
.
min
,
"
min
"
)}
AND
${
handleFinite
(
atk
.
max
,
"
max
"
,
)}
AND
${
assertMonster
}
`
:
undefined
;
const
defCondition
=
def
?
`def BETWEEN
${
handleFinite
(
def
.
min
,
"
min
"
)}
AND
${
handleFinite
(
def
.
max
,
"
max
"
,
)}
AND
${
assertMonster
}
`
:
undefined
;
const
raceCondition
=
races
?.
map
((
race
)
=>
`race =
${
race
}
`
).
join
(
"
OR
"
);
const
atkCondition
=
atk
.
min
!==
null
||
atk
.
max
!==
null
?
`atk BETWEEN
${
handleFinite
(
atk
.
min
,
"
min
"
)}
AND
${
handleFinite
(
atk
.
max
,
"
max
"
,
)}
AND
${
assertMonster
}
`
:
undefined
;
const
defCondition
=
def
.
min
!==
null
||
def
.
max
!==
null
?
`def BETWEEN
${
handleFinite
(
def
.
min
,
"
min
"
)}
AND
${
handleFinite
(
def
.
max
,
"
max
"
,
)}
AND
${
assertMonster
}
`
:
undefined
;
const
raceCondition
=
races
.
map
((
race
)
=>
`race =
${
race
}
`
).
join
(
"
OR
"
);
const
attributeCondition
=
attributes
?
.
map
((
attribute
)
=>
`attribute =
${
attribute
}
`
)
.
map
((
attribute
)
=>
`attribute =
${
attribute
}
`
)
.
join
(
"
OR
"
);
const
merged
=
[
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment