all repos — fixyoutube-go @ 5dec14aac005f3e3e59c9e5881d83be6729d388c

A better way to embed YouTube videos everywhere (inspired by FixTweet).

invidious/queries.go (view raw)

 1package invidious
 2
 3const createQueryVideos = `
 4CREATE TABLE IF NOT EXISTS videos (
 5    videoId TEXT PRIMARY KEY,
 6    title TEXT NOT NULL,
 7    description TEXT NOT NULL,
 8    uploader TEXT NOT NULL,
 9    duration int NOT NULL,
10    url TEXT NOT NULL,
11    expire DATETIME NOT NULL
12);`
13
14const getVideoQuery = "SELECT * FROM videos WHERE videoId = (?);"
15
16const cacheVideoQuery = "INSERT OR REPLACE INTO videos (videoId, title, description, uploader, duration, url, expire) VALUES (?, ?, ?, ?, ?, ?, ?);"
17
18const clearQuery = "DELETE FROM videos;"