Commit Graph

7 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
Sam 12fd0b827e PERF: release results in a couple of cases 2018-06-13 15:11:43 +10:00
Robin Ward 971e302ff2 FEATURE: Support an end date for user silencing 2017-11-14 13:20:19 -05:00
Robin Ward 1f14350220 Rename "Blocked" to "Silenced" 2017-11-10 14:10:27 -05:00
Guo Xiang Tan 1ab60d83df PERF: Terminate scheduled job earlier if badge is not enabled. 2017-06-26 10:13:58 +09:00
Guo Xiang Tan 6cc174ca82 PERF: Fetch users in batches in grant anniversary badge job. 2017-06-23 16:54:35 +09:00
Robin Ward f05f1a24d3 Change Anniversary badge to be multiple grant, once per year 2017-04-28 14:22:54 -04:00