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
Guo Xiang Tan 5012d46cbd Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
Régis Hanol 4e8e9c2d2f FIX: ensure we never collide ids in the JIVE API importer 2017-06-06 16:13:07 +02:00
Régis Hanol b93a4e369d add support for importing content by id in JIVE API importer 2017-06-03 21:49:30 +02:00
Régis Hanol 2826f98bb9 update JIVE API importer 2017-05-16 10:22:44 +02:00
Régis Hanol 4b9cc1ad17 import likes & bookmarks in JIVE API importer 2017-05-03 16:00:23 +02:00
Régis Hanol e155cb6db1 FIX: JIVE API Importer
- Added the 'hierarchical=false' query parameter to retrieve comments (replies) chronologically
- Calling 'create_post' (singular) wasn't updating the LookupContainer and thus we couldn't populate the 'reply_to_post_number' column
2017-04-26 15:36:35 +02:00
Régis Hanol 29ddb3a611 update JIVE API importer 2017-04-24 22:03:12 +02:00
Régis Hanol ff6a98183f WIP: JIVE importer using the API 2017-04-12 22:30:36 +02:00