Commit Graph

12 Commits

Author SHA1 Message Date
Sam 5f64fd0a21 DEV: remove exec_sql and replace with mini_sql
Introduce new patterns for direct sql that are safe and fast.

MiniSql is not prone to memory bloat that can happen with direct PG usage.
It also has an extremely fast materializer and very a convenient API

- DB.exec(sql, *params) => runs sql returns row count
- DB.query(sql, *params) => runs sql returns usable objects (not a hash)
- DB.query_hash(sql, *params) => runs sql returns an array of hashes
- DB.query_single(sql, *params) => runs sql and returns a flat one dimensional array
- DB.build(sql) => returns a sql builder

See more at: https://github.com/discourse/mini_sql
2018-06-19 16:13:36 +10:00
Guo Xiang Tan ad5082d969 Make rubocop happy again. 2018-06-07 13:28:18 +08:00
Guo Xiang Tan 5012d46cbd Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
Robin Ward 94a4af6af7 FIX: If posts are deleted they should be updated in consistency jobs 2016-06-21 13:05:56 -04:00
Sam 2422289c8b FIX: whispers should not be revealed in reply to, or reply expansion
FEATURE: mark whisper as experimental
FIX: badges should never apply to whispers
2015-09-25 10:16:19 +10:00
Robin Ward 9f89aefdd3 FIX: Don't update the last poster when a whisper is made 2015-09-22 12:23:37 -04:00
Sam Saffron 40b22bf367 PERF: improve performance for featured user calculation 2015-04-22 23:54:54 +10:00
Sam c6a5081763 FEATURE: reorder participants in topic so always chronological
FEATURE: tie breaker for same number of posts is last post date
UX: highlight for latest poster when it is OP
2015-04-06 17:27:05 +10:00
Sam 5193c9fd16 FIX: ensure consistency on topic featured users 2014-08-18 17:13:32 +10:00
Stephan Kaag f12925887c Drop Rails3 support 2014-02-17 19:42:08 +01:00
Robin Ward 67041d1c6d Support for tracking the count of unique participants in a topic 2013-11-14 14:32:41 -05:00
Einar Jonsson b385cdcc34 Extracted featured_users functionality out of Topic.
* Created a TopicFeatureUsers model
* Topic#featured_user_ids and Topic#feature_topic_users now delegate to
* a TopicFeatureUsers instance to keep demeter happy.
2013-08-27 09:10:50 +00:00