This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT vid_id, created, time_in_video FROM bookmark_index WHERE user_id = '' AND tvshow_id = '' AND season = '' AND continue_watching = '' AND video_id IN ('666QAZ', '666WSX', '666EDC'); | |
vid_id | created | time_in_video | |
--------+--------------------------+--------------- | |
666QAZ | 2013-12-25 15:12:51+0100 | 20 | |
666WSX | 2013-12-26 15:12:51+0100 | 40 | |
666EDC | 2013-12-27 15:12:51+0100 | 40 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT vid_id, created, time_in_video FROM bookmark_index WHERE user_id = '' AND tvshow_id = 'Baywatch' AND season = '' AND continue_watching = '' AND video_id = ''; | |
vid_id | created | time_in_video | |
--------+--------------------------+--------------- | |
666QAZ | 2013-12-25 15:12:51+0100 | 20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT vid_id, created, time_in_video FROM bookmark_index WHERE user_id = 'johnny' AND tvshow_id = 'Baywatch' AND season = '1' AND continue_watching = '' AND video_id = ''; | |
vid_id | created | time_in_video | |
--------+--------------------------+--------------- | |
666QAZ | 2013-12-25 15:12:51+0100 | 20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT vid_id, created, time_in_video FROM bookmark_index WHERE user_id = 'johnny' AND tvshow_id = '' AND season = '' AND continue_watching = 'true' AND video_id = ''; | |
vid_id | created | time_in_video | |
--------+--------------------------+--------------- | |
666QAZ | 2013-12-25 15:12:51+0100 | 20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT vid_id, created, time_in_video FROM bookmark_index WHERE user_id = 'johnny' AND tvshow_id = '' AND season = '' AND continue_watching = '' AND video_id = '666QAZ'; | |
vid_id | created | time_in_video | |
--------+--------------------------+--------------- | |
666QAZ | 2013-12-25 15:12:51+0100 | 20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT INTO bookmark_index (user_id, tvshow_id, season, continue_watching, video_id, created, time_in_video, vid_id) VALUES ('johnny', 'Baywatch', '1', 'true', '666QAZ', '2013-12-25 15:12:51', 20, '666QAZ'); | |
INSERT INTO bookmark_index (user_id, tvshow_id, season, continue_watching, video_id, created, time_in_video, vid_id) VALUES ('johnny', 'Baywatch', '1', 'true', '', '2013-12-25 15:12:51', 20, '666QAZ'); | |
INSERT INTO bookmark_index (user_id, tvshow_id, season, continue_watching, video_id, created, time_in_video, vid_id) VALUES ('johnny', 'Baywatch', '1', '', '666QAZ', '2013-12-25 15:12:51', 20, '666QAZ'); | |
INSERT INTO bookmark_index (user_id, tvshow_id, season, continue_watching, video_id, created, time_in_video, vid_id) VALUES ('johnny', 'Baywatch', '1', '', '', '2013-12-25 15:12:51', 20, '666QAZ'); | |
INSERT INTO bookmark_index (user_id, tvshow_id, season, continue_watching, video_id, created, time_in_video, vid_id) VALUES ('johnny', 'Baywatch', '', 'true', '666QAZ', '2013-12-25 15:12:51', 20, '666QAZ'); | |
INSER |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE bookmark_index ( | |
user_id text, | |
tvshow_id text, | |
season text, | |
continue_watching text, | |
video_id text, | |
created timestamp, | |
time_in_video int, | |
vid_id text, | |
PRIMARY KEY ((user_id, tvshow_id, season, continue_watching, video_id)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT video_id, created, time_in_video FROM bookmark_by_user_tvshow_and_season WHERE user_id = 'johnny' AND tvshow_id = 'Baywatch' AND season = 1 ; | |
video_id | created | time_in_video | |
----------+--------------------------+--------------- | |
666QAZ | 2013-12-25 15:12:51+0100 | 20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * FROM bookmark_by_user_tvshow_and_season ; | |
user_id | tvshow_id | season | video_id | continue_watching | created | time_in_video | |
---------+--------------+--------+----------+-------------------+--------------------------+--------------- | |
patrick | A-Team | 5 | 666EDC | True | 2013-12-27 15:12:51+0100 | 40 | |
hayato | Thundercats | 1 | 666RFV | False | 2013-12-28 15:12:51+0100 | 50 | |
johnny | Knight Rider | 3 | 666WSX | False | 2013-12-26 15:12:51+0100 | 30 | |
johnny | Baywatch | 1 | 666QAZ | True | 2013-12-25 15:12:51+0100 | 20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT INTO bookmark_by_user_tvshow_and_season (user_id, tvshow_id, season, continue_watching, video_id, created, time_in_video) VALUES ('johnny', 'Baywatch', 1, true, '666QAZ', '2013-12-25 15:12:51', 20); | |
INSERT INTO bookmark_by_user_tvshow_and_season (user_id, tvshow_id, season, continue_watching, video_id, created, time_in_video) VALUES ('johnny', 'Knight Rider', 3, false, '666WSX', '2013-12-26 15:12:51', 30); | |
INSERT INTO bookmark_by_user_tvshow_and_season (user_id, tvshow_id, season, continue_watching, video_id, created, time_in_video) VALUES ('patrick', 'A-Team', 5, true, '666EDC', '2013-12-27 15:12:51', 40); | |
INSERT INTO bookmark_by_user_tvshow_and_season (user_id, tvshow_id, season, continue_watching, video_id, created, time_in_video) VALUES ('hayato', 'Thundercats', 1, false, '666RFV', '2013-12-28 15:12:51', 50); |