Send email asynchroniously using Sidekiq.
Create your mailer us usual:
$ pg_dump -h <public dns> -U <my username> -f <name of dump file .sql> <name of my database>
$ psql -U <postgresql username> -d <database name> -f <dump file that you want to restore>
# Basic key operators to query the JSON objects : | |
# #> : Get the JSON object at that path (if you need to do something fancy) | |
# -> : Get the JSON object at that path (if you don't) | |
# ->> : Get the JSON object at that path as text | |
# {obj, n} : Get the nth item in that object | |
# https://www.postgresql.org/docs/9.4/functions-json.html#FUNCTIONS-JSONB-OP-TABLE | |
# Date | |
# date before today |
Example:
array_of_hashes = [
{:a=>1}, {:a=>2}, {:a=>3},
{:b=>4}, {:b=>5}, {:b=>6}, {:b=>7}, {:b=>8}, {:b=>9},
{:c=>10}
]
Solution 1: