Skip to content

Instantly share code, notes, and snippets.

@syst3mw0rm
Created August 14, 2013 13:12
Show Gist options
  • Save syst3mw0rm/6230896 to your computer and use it in GitHub Desktop.
Save syst3mw0rm/6230896 to your computer and use it in GitHub Desktop.
public List<Tweet> fetchFeedsOfUser(Long user_id,int tweet_id) {
return jdbcTemplate.query("Select * from tweet where tweet_id < ? and (user_id in (select user_id2 from following where user_id1 = ?) or user_id = ? ) order by timestamp desc limit 15",
new Object[]{tweet_id,user_id,user_id}, new BeanPropertyRowMapper<>(Tweet.class));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment