<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="228650" data-post-id="228650">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="l00ker" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/l00ker/120/4095_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  l00ker
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>One solution would be to use a custom <a href="https://hexdocs.pm/ecto/Ecto.Type.html#content" rel="noopener nofollow ugc">Ecto.Type</a> on the <code>:total</code> field in your schema to convert the data when <code>load</code>ing &amp; <code>cast</code>ing the field.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="228650" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/how-to-use-elixir-function-in-ecto-query/13638/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-228650" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="228650"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #12"></div>
  </section>
</div>
    <div class="postbit" id="228654" data-post-id="228654">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="siddhant3030" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  siddhant3030
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hi Sorry. I did not notice I deleted it by mistake. I was trying to edit it. But I’ll post again</p>
<p>I had a simple requirement I want to use the Enum function in a query. I have a lot of data where I need to add some of the records after fetching from the database.</p>
<p>One of those requirements was this I was getting this result and I needed to add all the values from this list of map’s</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">[
%{
   total: %{a: 1, b: 2}
},
%{
  total: %{c: 1, d: 2}
}
]
</code></pre>
<p>Thank you for suggesting Ecto.Type. I just take a look and I think it can work here. Thanks for the suggestion</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="228654" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/how-to-use-elixir-function-in-ecto-query/13638/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-228654" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="228654"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>