Commit Graph
6 Commits
Author SHA1 Message Date
David Taylor b7c21ceb26 DEV: Apply syntax_tree formatting to script/* 2023-01-09 11:13:22 +00:00
Sam SaffronandGuo Xiang Tan 5fbcc5cb35 DEV: enable frozen string literal on all files
This reduces chances of errors where consumers of strings mutate inputs
and reduces memory usage of the app.

Test suite passes now, but there may be some stuff left, so we will run
a few sites on a branch prior to merging
2019-05-13 09:31:32 +08:00
702b153db3 FEATURE: New 'Reviewable' model to make reviewable items generic
Includes support for flags, reviewable users and queued posts, with REST API
backwards compatibility.

Co-Authored-By: romanrizzi <[email protected]>
Co-Authored-By: jjaffeux <[email protected]>
2019-03-28 12:45:10 -04:00
Sam 8eb8e05e99 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
Régis Hanol ef1ee1f0b1 FIX: import comments of 1st post in SE importer 2018-06-05 18:22:42 +02:00
Régis Hanol 2e01862882 FEATURE: StackOverflow importer 2018-06-04 16:57:12 +02:00