discourse/app/controllers
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
..
admin DEV: remove exec_sql and replace with mini_sql 2018-06-19 16:13:36 +10:00
users FIX: Use user account email instead of auth email when totp is enabled. 2018-05-30 12:15:12 +08:00
about_controller.rb Refactor requires login logic, reduce duplicate code 2018-02-01 15:17:59 +11:00
application_controller.rb Make rubocop happy again. 2018-06-07 13:28:18 +08:00
badges_controller.rb PERF: N+1 queries on badges page. 2018-03-19 14:36:09 +08:00
categories_controller.rb Make rubocop happy again. 2018-06-07 13:28:18 +08:00
category_hashtags_controller.rb Refactor requires login logic, reduce duplicate code 2018-02-01 15:17:59 +11:00
clicks_controller.rb Make rubocop happy again. 2018-06-07 13:28:18 +08:00
composer_controller.rb Refactor requires login logic, reduce duplicate code 2018-02-01 15:17:59 +11:00
composer_messages_controller.rb Refactor requires login logic, reduce duplicate code 2018-02-01 15:17:59 +11:00
directory_items_controller.rb make 🤖 rubocop happy 2018-05-16 16:35:04 +02:00
draft_controller.rb Refactor requires login logic, reduce duplicate code 2018-02-01 15:17:59 +11:00
email_controller.rb FIX: stop adding email to unsubscribe url 2018-05-22 09:07:03 +10:00
embed_controller.rb Make rubocop happy again. 2018-06-07 13:28:18 +08:00
exceptions_controller.rb Make rubocop happy again. 2018-06-07 13:28:18 +08:00
export_csv_controller.rb Make rubocop happy again. 2018-06-07 13:28:18 +08:00
extra_locales_controller.rb simplify production switch and serve extra locales from actual site 2018-01-10 08:19:51 +11:00
finish_installation_controller.rb Make rubocop happy again. 2018-06-07 13:28:18 +08:00
forums_controller.rb PERF: add frozen strings 2018-01-15 12:44:54 +11:00
groups_controller.rb REFACTOR: Remove extra param for group mentionable and messableable route. 2018-06-06 09:42:09 +08:00
highlight_js_controller.rb Fix all the errors to get our tests green on Rails 5.1. 2017-09-25 13:48:58 +08:00
inline_onebox_controller.rb Refactor requires login logic, reduce duplicate code 2018-02-01 15:17:59 +11:00
invites_controller.rb Make rubocop happy again. 2018-06-07 13:28:18 +08:00
list_controller.rb FIX: parameterize tag_id 2018-04-14 16:42:53 +05:30
metadata_controller.rb FIX: start_url was wrong in non-subfolder 2018-06-15 14:29:33 -03:00
notifications_controller.rb Make rubocop happy again. 2018-06-07 13:28:18 +08:00
offline_controller.rb FIX: offline controller regression 2017-10-31 15:44:50 +11:00
onebox_controller.rb FIX: include title in local onebox when linking to a different topic 2018-02-19 22:40:14 +01:00
permalinks_controller.rb Fix all the errors to get our tests green on Rails 5.1. 2017-09-25 13:48:58 +08:00
post_action_users_controller.rb UX: cap likes 2 (#5237) 2017-11-15 11:28:54 +11:00
post_actions_controller.rb Make rubocop happy again. 2018-06-07 13:28:18 +08:00
posts_controller.rb FEATURE: Add option to delete all replies of flagged post 2018-04-24 11:08:05 -04:00
push_notification_controller.rb Feature: Push notifications for Android (#5792) 2018-05-04 15:31:48 -07:00
queued_posts_controller.rb Make rubocop happy again. 2018-06-07 13:28:18 +08:00
qunit_controller.rb DEV: remove qunit rails fork and add a couple of async tests 2018-04-23 16:42:40 +10:00
robots_txt_controller.rb FEATURE: block top level /my/ routes 2018-06-12 19:47:45 +10:00
safe_mode_controller.rb Allow staff members to enable safe mode, even if disabled 2018-04-25 11:49:57 -04:00
search_controller.rb FEATURE: support search click through tracking for user, category and tags 2017-12-01 12:04:55 +05:30
session_controller.rb FIX: avatar_url includes upload_path twice when local storage used 2018-06-06 18:27:30 +05:30
similar_topics_controller.rb display 'similar to' earlier when composing a post 2017-09-16 01:03:29 +02:00
site_controller.rb FEATURE: custom setting for large square site icon 2017-11-03 16:19:31 +11:00
static_controller.rb FIX: add check for missing assets file in development 2018-06-11 11:18:34 -07:00
steps_controller.rb Refactor requires login logic, reduce duplicate code 2018-02-01 15:17:59 +11:00
stylesheets_controller.rb Make rubocop happy again. 2018-06-07 13:28:18 +08:00
tag_groups_controller.rb Make rubocop happy again. 2018-06-07 13:28:18 +08:00
tags_controller.rb Make rubocop happy again. 2018-06-07 13:28:18 +08:00
themes_controller.rb FEATURE: Native theme support 2017-04-12 10:53:49 -04:00
topics_controller.rb FIX: in rare conditions post timing would miss the user 2018-05-24 15:38:33 +10:00
uploads_controller.rb Remove use of rescue nil. 2018-04-02 13:52:51 +08:00
user_actions_controller.rb FIX: Remove mentions filters from user and groups 2017-12-07 16:29:02 -05:00
user_api_keys_controller.rb Refactor requires login logic, reduce duplicate code 2018-02-01 15:17:59 +11:00
user_avatars_controller.rb FEATURE: limit assets less that non asset paths 2018-03-06 15:20:39 +11:00
user_badges_controller.rb Make rubocop happy again. 2018-06-07 13:28:18 +08:00
users_controller.rb Make rubocop happy again. 2018-06-07 13:28:18 +08:00
users_email_controller.rb Review Changes for f4f8a293e7. 2018-02-21 14:55:49 +08:00
webhooks_controller.rb Make rubocop happy again. 2018-06-07 13:28:18 +08:00
wizard_controller.rb Refactor requires login logic, reduce duplicate code 2018-02-01 15:17:59 +11:00