this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add indexes to following table, closes #28

+13
+7
tests/test_save_tweets.py
··· 38 38 "media", 39 39 "media_tweets", 40 40 } == set(db.table_names()) 41 + # And check for indexes 42 + following_indexes = {tuple(i.columns) for i in db["following"].indexes} 43 + assert { 44 + ("followed_id", "follower_id"), 45 + ("followed_id",), 46 + ("follower_id",), 47 + } == following_indexes 41 48 42 49 43 50 def test_users(db):
+6
twitter_to_sqlite/utils.py
··· 257 257 ("follower_id", "users", "id"), 258 258 ), 259 259 ) 260 + # Ensure following has indexes 261 + following_indexes = {tuple(i.columns) for i in db["following"].indexes} 262 + if ("followed_id",) not in following_indexes: 263 + db["following"].create_index(["followed_id"]) 264 + if ("follower_id",) not in following_indexes: 265 + db["following"].create_index(["follower_id"]) 260 266 261 267 262 268 def save_tweets(db, tweets, favorited_by=None):