mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 17:16:14 +01:00
feat: fullname search (#8641)
* feat: fullname search * fix: take last element * fix: attempt to fix psql like query * feat: upgrade sript, another fix attempt * fix: psql test * fix: psql scan * feat: add debug for test * feat: test collate * feat: cleanup * fix: upgrade script
This commit is contained in:
committed by
GitHub
parent
9389749b79
commit
4be693f2e7
@@ -582,15 +582,15 @@ DELETE FROM "legacy_zset" z
|
||||
if (min.match(/^\(/)) {
|
||||
q.values.push(min.substr(1));
|
||||
q.suffix += 'GT';
|
||||
q.where += ` AND z."value" > $` + q.values.length + `::TEXT`;
|
||||
q.where += ` AND z."value" > $` + q.values.length + `::TEXT COLLATE "C"`;
|
||||
} else if (min.match(/^\[/)) {
|
||||
q.values.push(min.substr(1));
|
||||
q.suffix += 'GE';
|
||||
q.where += ` AND z."value" >= $` + q.values.length + `::TEXT`;
|
||||
q.where += ` AND z."value" >= $` + q.values.length + `::TEXT COLLATE "C"`;
|
||||
} else {
|
||||
q.values.push(min);
|
||||
q.suffix += 'GE';
|
||||
q.where += ` AND z."value" >= $` + q.values.length + `::TEXT`;
|
||||
q.where += ` AND z."value" >= $` + q.values.length + `::TEXT COLLATE "C"`;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -598,15 +598,15 @@ DELETE FROM "legacy_zset" z
|
||||
if (max.match(/^\(/)) {
|
||||
q.values.push(max.substr(1));
|
||||
q.suffix += 'LT';
|
||||
q.where += ` AND z."value" < $` + q.values.length + `::TEXT`;
|
||||
q.where += ` AND z."value" < $` + q.values.length + `::TEXT COLLATE "C"`;
|
||||
} else if (max.match(/^\[/)) {
|
||||
q.values.push(max.substr(1));
|
||||
q.suffix += 'LE';
|
||||
q.where += ` AND z."value" <= $` + q.values.length + `::TEXT`;
|
||||
q.where += ` AND z."value" <= $` + q.values.length + `::TEXT COLLATE "C"`;
|
||||
} else {
|
||||
q.values.push(max);
|
||||
q.suffix += 'LE';
|
||||
q.where += ` AND z."value" <= $` + q.values.length + `::TEXT`;
|
||||
q.where += ` AND z."value" <= $` + q.values.length + `::TEXT COLLATE "C"`;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user