mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 18:29:27 +02:00
Improve local search relevancy
This commit is contained in:
parent
f27f392721
commit
e18ac0a468
4 changed files with 25 additions and 16 deletions
|
@ -10,11 +10,13 @@ export class AbstractRunQuery {
|
|||
protected query: string
|
||||
protected replacements: any = {}
|
||||
|
||||
protected queryConfig = ''
|
||||
|
||||
constructor (protected readonly sequelize: Sequelize) {
|
||||
|
||||
}
|
||||
|
||||
protected runQuery (options: { nest?: boolean, transaction?: Transaction, logging?: boolean } = {}) {
|
||||
protected async runQuery (options: { nest?: boolean, transaction?: Transaction, logging?: boolean } = {}) {
|
||||
const queryOptions = {
|
||||
transaction: options.transaction,
|
||||
logging: options.logging,
|
||||
|
@ -23,6 +25,10 @@ export class AbstractRunQuery {
|
|||
nest: options.nest ?? false
|
||||
}
|
||||
|
||||
if (this.queryConfig) {
|
||||
await this.sequelize.query(this.queryConfig, queryOptions)
|
||||
}
|
||||
|
||||
return this.sequelize.query<any>(this.query, queryOptions)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue