discourse/app/serializers
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
..
concerns FEATURE: option for tags in a tag group to be visible only to staff 2018-03-26 17:05:09 -04:00
about_serializer.rb
admin_badge_serializer.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
admin_badges_serializer.rb
admin_detailed_user_serializer.rb Review Changes for f4f8a293e7. 2018-02-21 14:55:49 +08:00
admin_email_template_serializer.rb FIX: Translate titles of email templates 2017-01-05 01:26:38 +01:00
admin_plugin_serializer.rb Fix regression introduced in 8cf0f51eb2. 2018-05-16 14:26:03 +08:00
admin_user_action_serializer.rb Make rubocop happy again. 2018-06-07 13:28:18 +08:00
admin_user_list_serializer.rb UX: Display lock icon in admin user lists when user has 2FA enabled. 2018-02-22 09:00:09 +08:00
admin_user_serializer.rb FIX: do not show "Send Activation Email" button if must_approve_users setting is enabled 2017-07-04 14:00:50 +05:30
admin_web_hook_event_serializer.rb FEATURE: prompts new webhook events 2016-09-19 12:07:17 +08:00
admin_web_hook_serializer.rb FEATURE: Webhooks. 2016-09-05 18:44:00 +08:00
api_key_serializer.rb
application_serializer.rb
archetype_serializer.rb
backup_serializer.rb
badge_grouping_serializer.rb
badge_index_serializer.rb
badge_serializer.rb FEATURE: grant badges in post admin wrench (#5498) 2018-01-22 14:10:53 +11:00
badge_type_serializer.rb
basic_category_serializer.rb FEATURE: enforce tagging on categories 2018-04-11 07:15:24 +05:30
basic_group_history_serializer.rb FEATURE: Group logs. 2016-12-12 17:29:54 +08:00
basic_group_serializer.rb Make rubocop happy again. 2018-06-07 13:28:18 +08:00
basic_group_user_serializer.rb FIX: Group owners should be able to invite users to their groups. 2017-07-21 23:48:25 +09:00
basic_post_serializer.rb FIX: Don't hardcode the path into translations. 2017-10-30 12:47:34 +08:00
basic_topic_serializer.rb
basic_user_badge_serializer.rb
basic_user_serializer.rb Revert "FIX: Move check to right serializer." 2017-09-12 18:11:08 +08:00
category_and_topic_lists_serializer.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
category_detailed_serializer.rb FIX: use 'topic_all_time' as topic count failover in /categories page 2016-08-29 10:25:46 +02:00
category_list_serializer.rb
category_serializer.rb FIX: localize everyone group name in default category permissions 2018-04-19 11:14:18 +02:00
category_upload_serializer.rb FIX: Associate category logo and background to uploads record. 2016-12-12 17:37:28 +08:00
color_scheme_color_serializer.rb FEATURE: Native theme support 2017-04-12 10:53:49 -04:00
color_scheme_serializer.rb FIX: properly clean up related color schemes on delete 2017-05-04 14:03:17 -04:00
current_user_serializer.rb FEATURE: New site setting, whitelisted_link_domains 2018-06-13 16:11:22 -04:00
detailed_user_badge_serializer.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
directory_item_serializer.rb REFACTOR: remove AgeWord calls from serializers and do it in javascript 2017-11-17 17:53:30 -05:00
directory_serializer.rb
discourse_version_check_serializer.rb REFACTOR: Avoid duplicated logic on server and client. 2017-11-21 17:10:04 +08:00
email_log_serializer.rb
embeddable_host_serializer.rb Add embed class name setup for embeddable hosts 2017-05-11 15:16:16 -04:00
embedding_serializer.rb
emoji_serializer.rb
flagged_topic_serializer.rb
flagged_topic_summary_serializer.rb Refactor flag types for more customization 2017-10-19 13:55:23 -04:00
flagged_user_serializer.rb FIX: Properly avoid n+1 query on flagged posts 2018-06-14 09:46:52 -04:00
gap_serializer.rb
group_post_serializer.rb FIX: link to sub-categories in group activity feed wasn't working 2017-09-13 23:14:46 +02:00
group_post_user_serializer.rb Revert "FIX: Move check to right serializer." 2017-09-12 18:11:08 +08:00
group_show_serializer.rb FIX: correct group membership on cards for admins 2018-06-12 14:57:26 -07:00
group_user_serializer.rb
grouped_screened_url_serializer.rb
grouped_search_result_serializer.rb FIX: don't show Create Topic button on full search page to users who can't create topics 2017-11-10 15:39:04 -05:00
incoming_email_details_serializer.rb FIX: don't blow up on badly encoding incoming email body 2018-01-30 23:47:58 +01:00
incoming_email_serializer.rb FIX: allow an admin to click on blank errors (#5027) 2017-08-04 20:04:26 +02:00
invite_serializer.rb
invited_user_serializer.rb REFACTOR: remove AgeWord calls from serializers and do it in javascript 2017-11-17 17:53:30 -05:00
listable_topic_serializer.rb Make rubocop happy again. 2018-06-07 13:28:18 +08:00
new_post_result_serializer.rb
notification_serializer.rb FEATURE: use fancy title in notifications 2017-05-15 15:38:30 -04:00
penalty_counts_serializer.rb Move some display logic out of model, upgrade old code patterns 2018-05-25 12:54:22 -04:00
permalink_serializer.rb fix permalinks serializer with subfolder setups 2017-04-05 18:45:01 +02:00
post_action_type_serializer.rb Make rubocop happy again. 2018-06-07 13:28:18 +08:00
post_action_user_serializer.rb
post_item_excerpt.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
post_revision_serializer.rb Make rubocop happy again. 2018-06-07 13:28:18 +08:00
post_serializer.rb Make rubocop happy again. 2018-06-07 13:28:18 +08:00
post_stream_serializer_mixin.rb Shorten some very long lines 2017-08-12 04:18:04 +02:00
post_wordpress_serializer.rb
primary_group_serializer.rb FEATURE: primary group class on avatars in topic list 2017-02-20 15:55:10 -05:00
queued_post_serializer.rb
screened_email_serializer.rb
screened_ip_address_serializer.rb
screened_url_serializer.rb
search_logs_serializer.rb FEATURE: support search click through tracking for user, category and tags 2017-12-01 12:04:55 +05:30
search_post_serializer.rb PERF: N+1 query in search when plugin loads custom fields in TopicListItemSerializer. 2017-05-31 09:54:10 +09:00
search_result_user_serializer.rb create searchResultUserSerializer, display name next to username in search results 2017-03-01 13:11:01 +01:00
search_topic_list_item_serializer.rb FEATURE: Allow staffs to tag PMs 2018-02-21 20:11:46 +05:30
similar_topic_serializer.rb
single_sign_on_record_serializer.rb FIX: do not show SSO external_email to moderators 2018-06-12 14:20:44 +05:30
site_serializer.rb FEATURE: Shared Drafts 2018-03-20 17:15:26 -04:00
site_text_serializer.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
staff_action_logs_serializer.rb FEATURE: dropdown to filter staff action logs 2017-05-30 11:25:42 -04:00
suggested_topic_serializer.rb FEATURE: Allow staffs to tag PMs 2018-02-21 20:11:46 +05:30
suggested_topics_mixin.rb PERF: Only send down suggested payload when loading last chunk. 2017-09-26 14:42:27 +08:00
tag_group_serializer.rb FEATURE: move staff tags setting to tag group settings 2018-04-20 15:34:23 -04:00
tag_serializer.rb FIX: when deleting a tag, the warning modal has the wrong topic count 2018-01-12 16:35:27 -05:00
theme_serializer.rb Add plugin outlet in admin theme list (#5837) 2018-05-18 10:09:21 +02:00
theme_settings_serializer.rb FEATURE: Theme settings (2) (#5611) 2018-03-04 19:04:23 -05:00
top_list_serializer.rb
topic_embed_serializer.rb
topic_flag_type_serializer.rb Make rubocop happy again. 2018-06-07 13:28:18 +08:00
topic_link_serializer.rb DEV: remove exec_sql and replace with mini_sql 2018-06-19 16:13:36 +10:00
topic_list_item_serializer.rb FIX: Shared draft performance fix + missing avatars 2018-03-28 16:11:43 -04:00
topic_list_serializer.rb Revert "PERF: Don't join on shared drafts unless you have to" 2018-03-28 15:35:13 -04:00
topic_post_count_serializer.rb FEATURE: group avatar flair shows on topic participants list, and participant avatars can have custom styles 2017-01-18 11:38:00 -05:00
topic_poster_serializer.rb FEATURE: primary group class on avatars in topic list 2017-02-20 15:55:10 -05:00
topic_timer_serializer.rb rename topic_status_update to topic_timer 2017-05-11 18:27:53 -04:00
topic_tracking_state_serializer.rb
topic_view_posts_serializer.rb PERF: Only send down suggested payload when loading last chunk. 2017-09-26 14:42:27 +08:00
topic_view_serializer.rb Make rubocop happy again. 2018-06-07 13:28:18 +08:00
topic_view_wordpress_serializer.rb
trust_level_serializer.rb
trust_level3_requirements_serializer.rb FIX: Don't allow a user to become TL3 if they've ever been penalized 2018-04-24 15:15:32 -04:00
upload_serializer.rb FEATURE: image uploads now have short urls 2017-08-22 16:40:08 -04:00
user_action_serializer.rb FIX: Wrong target user displayed for user actions in activity stream. 2018-05-18 11:28:13 +08:00
user_badge_serializer.rb
user_badges_serializer.rb
user_field_serializer.rb
user_history_serializer.rb FEATURE: Native theme support 2017-04-12 10:53:49 -04:00
user_name_serializer.rb
user_option_serializer.rb FEATURE: Allow the user to select a custom home page (#5268) 2017-11-10 06:45:19 +11:00
user_serializer.rb Trim WebHookUserSerializer. 2018-05-21 17:29:58 +08:00
user_summary_serializer.rb FIX: missing likes count on top topics in user summary 2017-11-27 13:42:16 -05:00
user_wordpress_serializer.rb
watched_word_list_serializer.rb FEATURE: Support regular expressions for watched words 2017-09-27 15:48:57 -04:00
watched_word_serializer.rb FEATURE: Watched Words: when posts contain words, do one of flag, require approval, censor, or block 2017-07-26 11:01:09 -04:00
web_hook_category_serializer.rb Exclude available_groups from category web hooks 2018-04-10 16:46:22 +05:30
web_hook_flag_serializer.rb Refactor WebHookFlagSerializer. 2018-05-21 17:29:58 +08:00
web_hook_group_serializer.rb Inherit from BasicGroupSerializer for WebHookGroupSerializer. 2018-05-21 17:29:58 +08:00
web_hook_post_serializer.rb Trim WebHookPostSerializer further. 2018-05-21 17:29:58 +08:00
web_hook_topic_view_serializer.rb Trim WebHookTopicSerializer further. 2018-05-21 17:29:58 +08:00
web_hook_user_serializer.rb Trim WebHookUserSerializer. 2018-05-21 17:29:58 +08:00
wizard_field_choice_serializer.rb New step to choose emoji set 2016-09-22 09:52:19 -04:00
wizard_field_serializer.rb Add locale step 2016-09-22 09:52:19 -04:00
wizard_serializer.rb Wizard: Step 1 2016-09-22 09:48:58 -04:00
wizard_step_serializer.rb Added images to the first and last step of the wizard 2016-09-22 09:52:19 -04:00