I hereby claim:
- I am avdgaag on github.
- I am avdgaag (https://keybase.io/avdgaag) on keybase.
- I have a public key whose fingerprint is 4F42 6A06 0AD7 FB17 65C7 F164 7109 F6F2 67B5 C31C
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
import Html.App as App | |
import Html exposing (..) | |
import Html.Attributes exposing (..) | |
import Http | |
import Task | |
import Json.Decode as Json exposing ((:=)) | |
-- MODEL | |
type alias Model = |
def index(conn, _params) do | |
conn = conn | |
|> put_resp_content_type("text/csv") | |
|> put_resp_header("content-disposition", "attachment; filename=export.csv") | |
|> send_cunked(200) | |
Repo.transaction fn -> | |
Ecto.Adapters.SQL.stream(Repo, "COPY expensive_report TO STDOUT CSV HEADER") | |
|> Stream.map(&(chunk(conn, &1.rows))) | |
|> Stream.run |