import { QueryTypes, Sequelize } from 'sequelize'
+import { forceNumber } from '@shared/core-utils'
import { AbstractCommand } from '../shared'
export class SQLCommand extends AbstractCommand {
return parseInt(total, 10)
}
+ async getInternalFileUrl (fileId: number) {
+ return this.selectQuery(`SELECT "fileUrl" FROM "videoFile" WHERE id = ${fileId}`)
+ .then(rows => rows[0].fileUrl as string)
+ }
+
setActorField (to: string, field: string, value: string) {
const seq = this.getSequelize()
if (!total) return 0
- return parseInt(total + '', 10)
+ return forceNumber(total)
}
getActorImage (filename: string) {