<commit_before>module Docker
  class EyeshadeHelper
    class << self    
      def insert_contribution_transaction_sql(channel_identifier, amount, transaction_id)
        "insert into transactions (id, transaction_type, from_account_type, from_account, to_account_type, to_account, amount) values('#{transaction_id}', 'contribution', 'uphold', '00000000-0000-4000-0000-000000000000 ', 'channel', '#{channel_identifier}', '#{amount}');"
      end

      def insert_referral_transaction_sql(owner_identifier, amount, transaction_id)
        "insert into transactions (id, transaction_type, from_account_type, from_account, to_account_type, to_account, amount) values('#{transaction_id}', 'referral', 'uphold', '00000000-0000-4000-0000-000000000000 ', 'owner', '#{owner_identifier}', '#{amount}');"
      end

      def refresh_account_balances_sql
        "refresh materialized view account_balances;"
      end
    end
  end
end
<commit_msg>Provide a description and a channel since the eyeshade /transactions endpoint requires it (#1647)<commit_after>module Docker
  class EyeshadeHelper
    class << self
      def insert_contribution_transaction_sql(channel_identifier, amount, transaction_id)
        "insert into transactions (id, transaction_type, description, from_account_type, from_account, to_account_type, to_account, amount, channel) values('#{transaction_id}', 'contribution', 'manual insertion', 'uphold', '00000000-0000-4000-0000-000000000000 ', 'channel', '#{channel_identifier}', '#{amount}', '#{channel_identifier}');"
      end

      def insert_referral_transaction_sql(owner_identifier, amount, transaction_id)
        "insert into transactions (id, transaction_type, description, from_account_type, from_account, to_account_type, to_account, amount, channel) values('#{transaction_id}', 'referral', 'manual insertion', 'uphold', '00000000-0000-4000-0000-000000000000 ', 'owner', '#{owner_identifier}', '#{amount}', '#{owner_identifier}');"
      end

      def refresh_account_balances_sql
        "refresh materialized view account_balances;"
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.11556829035339064, 'fraction_numerical': 0.06303724928366762, 'mean_word_length': 5.567398119122257, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 8, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1855279', 'n_tokens_mistral': 696, 'n_tokens_neox': 581, 'n_words': 143}