Commit Graph

9 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
Neil Lalonde 6aa0823bf4 FIX: lounge category security settings won't be reset after an upgrade 2017-06-06 16:57:21 -04:00
Louis Rose 1574485443 Perform the where(...).first to find_by(...) refactoring.
This refactoring was automated using the command: bundle exec "ruby refactorings/where_dot_first_to_find_by/app.rb"
2014-05-06 14:41:59 +01:00
Neil Lalonde 7780013c3a Seed categories in transactions 2014-03-19 12:00:13 -04:00
Sam 7460e5ed24 BUGFIX: dupe topic names could booby trap seeding 2014-03-19 09:30:17 +11:00
Neil Lalonde 99285f73e7 FIX: don't try to create category description topic if it already exists 2014-03-14 10:26:17 -04:00
Neil Lalonde 0289053a70 Add the Lounge category, an exclusive area for trust level 3 users 2014-01-20 16:52:55 -05:00
Neil Lalonde 33c3e027b3 Revert "Add the Lounge category, an exclusive area for trust level 3 users" 2014-01-20 15:43:04 -05:00
Neil Lalonde 2d98720cc8 Add the Lounge category, an exclusive area for trust level 3 users 2014-01-20 15:06:20 -05:00