aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/sql/abstract-videos-query-builder.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-06-10 14:43:55 +0200
committerChocobozzz <me@florianbigard.com>2021-06-10 15:26:18 +0200
commitd9bf974f5df787bbeaab5b04949ca91a2b3ca2a3 (patch)
treeaa02ee0cc28c845432e91da43b1e6de2a2f04039 /server/models/video/sql/abstract-videos-query-builder.ts
parente5dbd5084e7ae91ce118c0bccd5b84c47b88c55f (diff)
downloadPeerTube-d9bf974f5df787bbeaab5b04949ca91a2b3ca2a3.tar.gz
PeerTube-d9bf974f5df787bbeaab5b04949ca91a2b3ca2a3.tar.zst
PeerTube-d9bf974f5df787bbeaab5b04949ca91a2b3ca2a3.zip
Use raw SQL for video get request
Diffstat (limited to 'server/models/video/sql/abstract-videos-query-builder.ts')
-rw-r--r--server/models/video/sql/abstract-videos-query-builder.ts15
1 files changed, 0 insertions, 15 deletions
diff --git a/server/models/video/sql/abstract-videos-query-builder.ts b/server/models/video/sql/abstract-videos-query-builder.ts
deleted file mode 100644
index 597a02af7..000000000
--- a/server/models/video/sql/abstract-videos-query-builder.ts
+++ /dev/null
@@ -1,15 +0,0 @@
1import { logger } from '@server/helpers/logger'
2import { Sequelize, QueryTypes } from 'sequelize'
3
4export class AbstractVideosQueryBuilder {
5 protected sequelize: Sequelize
6
7 protected query: string
8 protected replacements: any = {}
9
10 protected runQuery (nest?: boolean) {
11 logger.info('Running video query.', { query: this.query, replacements: this.replacements })
12
13 return this.sequelize.query<any>(this.query, { replacements: this.replacements, type: QueryTypes.SELECT, nest })
14 }
15}