discourse/lib
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
..
active_record/connection_adapters FIX: Don't clear connections on the same process. 2018-06-12 13:06:25 +08:00
auth Make rubocop happy again. 2018-06-07 13:28:18 +08:00
autospec DEV: handle termination cleanly in autospec 2018-06-19 16:13:36 +10:00
backup_restore DEV: remove exec_sql and replace with mini_sql 2018-06-19 16:13:36 +10:00
common_passwords Make rubocop happy again. 2018-06-07 13:28:18 +08:00
demon DEV: handle termination cleanly in autospec 2018-06-19 16:13:36 +10:00
email FIX: PM participants listed inline 2018-06-11 18:14:25 -07:00
emoji FEATURE: adds emoji search aliases 2018-05-01 15:43:49 +02:00
es6_module_transpiler
file_store fix s3_cdn_url when the s3 bucket contains a folder 2018-05-23 15:51:02 -05:00
freedom_patches Monkey patch in 7830a950ef 2018-06-19 09:45:48 +08:00
guardian FEATURE: New site setting, whitelisted_link_domains 2018-06-13 16:11:22 -04:00
highlight_js
i18n Make rubocop happy again. 2018-06-07 13:28:18 +08:00
import
import_export Remove use of rescue nil. 2018-04-02 13:52:51 +08:00
javascripts updates moment.js 2.22.1 and vendor moment-timezone 0.5.14 2018-04-26 09:15:53 +02:00
middleware FIX: specify path for dosp cookie 2018-04-24 11:07:58 -04:00
migration DEV: remove exec_sql and replace with mini_sql 2018-06-19 16:13:36 +10:00
onebox Make rubocop happy again. 2018-06-07 13:28:18 +08:00
plugin Add to offical plugins list 2018-06-18 10:20:49 -06:00
pretty_text FEATURE: Add quote-modified class if a quote has been modified 2018-03-13 13:41:06 -04:00
rate_limiter Add specs for RateLimiter::LimitExceeded#description. 2018-06-19 07:48:03 +08:00
scheduler FIX: Don't clear active connections in defer queue. 2018-06-19 12:45:16 +08:00
search
sidekiq FEATURE: raise an event when a sidekiq job runs 2017-10-23 17:30:17 +11:00
site_settings FIX: db:create was failing due to site settings 2018-06-07 14:51:14 +10:00
stylesheet FIX: theme CSS should recompile when theme uploads change 2018-06-15 13:12:09 +10:00
tasks DEV: remove exec_sql and replace with mini_sql 2018-06-19 16:13:36 +10:00
theme_store FIX: unable to import private themes due to key checking 2018-04-03 16:11:03 +10:00
validators FIX: staged users are still tl0 but do not trigger spam if 1 week old. 2018-06-18 17:20:04 -07:00
wizard FEATURE: show category page options on wizard 'homepage' step 2018-06-15 19:11:41 +05:30
admin_confirmation.rb
admin_constraint.rb Add extensibility to admin constraints 2018-01-25 13:56:08 -05:00
admin_user_index_query.rb DEV: Rails 5.2 upgrade and global gem upgrade 2018-06-07 14:21:33 +10:00
age_words.rb
archetype.rb
auth.rb
avatar_lookup.rb
badge_queries.rb FEATURE: Support an end date for user silencing 2017-11-14 13:20:19 -05:00
base62.rb remove constant warning in base62 file 2018-01-19 19:52:42 +01:00
cache.rb dashboard next: caching, mobile support and new charts 2018-05-03 15:41:41 +02:00
canonical_url.rb
category_badge.rb Set catogory text_color for box style 2018-05-02 16:57:35 +10:00
comment_migration.rb DEV: remove exec_sql and replace with mini_sql 2018-06-19 16:13:36 +10:00
composer_messages_finder.rb Make rubocop happy again. 2018-06-07 13:28:18 +08:00
configurable_urls.rb
content_buffer.rb
cooked_post_processor.rb DEV: remove exec_sql and replace with mini_sql 2018-06-19 16:13:36 +10:00
crawler_detection.rb FEATURE: control which web crawlers can access using a whitelist or blacklist 2018-03-22 15:41:02 -04:00
current_user.rb
custom_renderer.rb
custom_setting_providers.rb
db_helper.rb DbHelper.remap: add options to anchor at left and right of the column value 2018-06-07 13:16:03 -04:00
directory_helper.rb
discourse_cookie_store.rb
discourse_diff.rb FIX: don't add diff classes more than once 2018-04-16 15:41:45 +02:00
discourse_event.rb
discourse_hub.rb DEV: private means nothing for class methods 2017-11-01 16:43:19 +11:00
discourse_iife.rb
discourse_logstash_logger.rb FIX: Incorrect formatter used when logstash formatter is enabled. 2018-04-17 12:07:52 +08:00
discourse_plugin_registry.rb adds moment-timezone.js to the list of vendorable libs 2018-05-01 16:00:05 +02:00
discourse_plugin.rb
discourse_redis.rb FIX: Be more aggressive in checking master when trying to fallback. 2018-06-12 00:09:15 +08:00
discourse_tagging.rb FIX: automatically in/decrement topic_tags.pm_topic_count 2018-05-15 16:05:48 +02:00
discourse_updates.rb REFACTOR: Avoid duplicated logic on server and client. 2017-11-21 17:10:04 +08:00
discourse.rb FIX: Discourse.keep_readonly_mode spins a new thread each time it is called. 2018-06-19 10:24:08 +08:00
disk_space.rb
distributed_cache.rb Allow DistributedCache#delete to not publish changes. 2017-10-20 23:03:42 +08:00
distributed_memoizer.rb
distributed_mutex.rb
edit_rate_limiter.rb
email_backup_token.rb
email_cook.rb replace indentation with non-breaking spaces when cooking emails 2017-11-18 17:16:44 +01:00
email_updater.rb Make rubocop happy again. 2018-06-07 13:28:18 +08:00
email.rb Upgrade mail gem to remove dependency on mime-types. 2018-03-14 14:37:55 +08:00
enum_site_setting.rb
enum.rb
excerpt_parser.rb FIX: Calculation of text length for <details> in excerpt was wrong 2018-03-12 16:55:23 +01:00
feed_element_installer.rb FEATURE: Replace SimpleRSS with Ruby RSS module (#5311) 2017-12-06 10:45:09 +11:00
feed_item_accessor.rb FEATURE: Replace SimpleRSS with Ruby RSS module (#5311) 2017-12-06 10:45:09 +11:00
file_helper.rb Make rubocop happy again. 2018-06-07 13:28:18 +08:00
filter_best_posts.rb
final_destination.rb Don't log 404s for FinalDestination. 2018-05-25 10:11:16 +08:00
flag_query.rb Revert "Revert "Preload custom user fields when viewing flag queue"" 2018-06-13 11:44:13 -04:00
flag_settings.rb Refactor flag types for more customization 2017-10-19 13:55:23 -04:00
gaps.rb
global_path.rb
guardian.rb FIX: Allow a user to remove their title 2018-05-31 17:16:52 -06:00
has_errors.rb
headless-ember.js
hijack.rb FEATURE: detect when client thinks user is logged on but is not 2018-03-06 16:49:31 +11:00
homepage_constraint.rb FEATURE: Allow the user to select a custom home page (#5268) 2017-11-10 06:45:19 +11:00
html_prettify.rb
html_to_markdown.rb FIX: handle <pre> inside <blockquote> in html_to_markdown 2018-02-26 23:28:02 +01:00
image_sizer.rb
inline_oneboxer.rb Make rubocop happy again. 2018-06-07 13:28:18 +08:00
introduction_updater.rb
ip_addr.rb
js_locale_helper.rb Safety in case translations are missing root keys 2018-06-12 10:09:57 -04:00
json_error.rb
letter_avatar.rb FIX: don't generate an exception when trying to cleanup unexisting tmp letter avatars 2018-05-30 15:33:58 +02:00
markdown_linker.rb
mem_info.rb
memory_diagnostics.rb
message_bus_diags.rb
method_profiler.rb FIX: stop double counting net calls in logs 2018-02-28 10:45:11 +11:00
mini_sql_multisite_connection.rb DEV: remove exec_sql and replace with mini_sql 2018-06-19 16:13:36 +10:00
mobile_detection.rb
new_post_manager.rb FEATURE: Staged user moderation (#5721) 2018-04-06 11:41:25 +02:00
new_post_result.rb
notification_levels.rb
oneboxer.rb Make rubocop happy again. 2018-06-07 13:28:18 +08:00
onpdiff.rb
pbkdf2.rb more prep work for jRuby 2018-02-26 10:25:58 +11:00
permalink_constraint.rb
pinned_check.rb
plain_text_to_markdown.rb FEATURE: convert plain text emails to markdown 2017-12-06 01:47:51 +01:00
plugin_gem.rb
post_action_creator.rb
post_creator.rb DEV: Rails 5.2 upgrade and global gem upgrade 2018-06-07 14:21:33 +10:00
post_destroyer.rb FEATURE: add staff action log for 'restore topic' 2018-03-21 18:04:13 +05:30
post_enqueuer.rb
post_jobs_enqueuer.rb FIX: ensure 'notifications_state' is up to date after creating a notification 2018-05-26 02:09:48 +02:00
post_locker.rb FEATURE: Staff members can lock posts 2018-01-26 14:01:30 -05:00
post_merger.rb
post_revisor.rb DEV: remove exec_sql and replace with mini_sql 2018-06-19 16:13:36 +10:00
pretty_text.rb fix indent 2018-06-08 13:56:20 -04:00
primary_group_lookup.rb
promotion.rb FIX: Group can't be deleted if certain users are demoted. 2018-04-10 14:19:35 +08:00
quote_comparer.rb FEATURE: Add quote-modified class if a quote has been modified 2018-03-13 13:41:06 -04:00
rate_limiter.rb correct return value 2018-04-25 08:44:07 +10:00
retrieve_title.rb Make rubocop happy again. 2018-06-07 13:28:18 +08:00
route_format.rb FIX: RouteFormat is a better class name than RouteFormats 2017-12-21 15:30:32 -05:00
rtl.rb
s3_helper.rb fix s3_cdn_url when the s3 bucket contains a folder 2018-05-23 15:51:02 -05:00
score_calculator.rb
screening_model.rb
search.rb DEV: remove exec_sql and replace with mini_sql 2018-06-19 16:13:36 +10:00
secure_session.rb
single_sign_on.rb FEATURE: add profile_background fields into SSO (#5701) 2018-05-07 10:03:26 +02:00
site_setting_extension.rb REFACTOR: admin site settings controller specs to requests (#5966) 2018-06-11 12:48:09 +08:00
slug.rb FIX: strip emoji string from slug 2018-04-18 11:32:32 +05:30
socket_server.rb Remove use of rescue nil. 2018-04-02 13:52:51 +08:00
source_url.rb
spam_handler.rb
sql_builder.rb
staff_constraint.rb Extensibility for custom staff check 2018-03-28 14:48:14 -04:00
staff_message_format.rb More extensibility for custom silence/suspend messages 2018-01-19 11:35:19 -05:00
stats_socket.rb
suggested_topics_builder.rb
system_message.rb
text_cleaner.rb FIX: strip zero width spaces from topic title 2018-02-21 00:12:39 +05:30
text_sentinel.rb rename 'min_private_message_{post/title}_length' to 'min_personal_message_{post/title}_length' 2018-02-01 13:25:29 +05:30
theme_settings_manager.rb FEATURE: Theme settings (2) (#5611) 2018-03-04 19:04:23 -05:00
theme_settings_parser.rb FEATURE: Theme settings (2) (#5611) 2018-03-04 19:04:23 -05:00
timeline_lookup.rb
topic_creator.rb add client side validation for category minimum_required_tags 2018-04-11 07:17:52 +05:30
topic_list_responder.rb
topic_publisher.rb FIX: Update last_version_at when publishing 2018-03-26 16:06:20 -04:00
topic_query_sql.rb DEV: Rails 5.2 upgrade and global gem upgrade 2018-06-07 14:21:33 +10:00
topic_query.rb Make rubocop happy again. 2018-06-07 13:28:18 +08:00
topic_retriever.rb Make rubocop happy again. 2018-06-07 13:28:18 +08:00
topic_subtype.rb
topic_view.rb DEV: remove exec_sql and replace with mini_sql 2018-06-19 16:13:36 +10:00
topics_bulk_action.rb DEV: remove exec_sql and replace with mini_sql 2018-06-19 16:13:36 +10:00
trust_level.rb
twitter_api.rb FIX: do not replace hashtags in URLs 2018-05-17 00:34:17 +05:30
unread.rb
upload_creator.rb FIX: create upload record for exported csv files 2018-04-20 00:27:49 +05:30
url_helper.rb Move escape_uri method to a more suitable place 2017-12-12 20:17:46 +01:00
user_name_suggester.rb
version.rb Version bump to v2.1.0.beta1 2018-05-31 18:29:10 -04:00
wizard.rb