index=PG_DB.query_one?("SELECT index FROM playlist_videos WHERE plid = $1 AND id = $2 LIMIT 1",playlist.id,continuation,as:Int64)
offset=playlist.index.index(index)||0
end
db.query_all("SELECT * FROM playlist_videos WHERE plid = $1 ORDER BY array_position($2, index) LIMIT 100 OFFSET $3",playlist.id,playlist.index,offset,as:PlaylistVideo)