Advertisement
Guest User

Untitled

a guest
Aug 30th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. defmodule Example do
  2. @moduledoc """
  3. Documentation for Example.
  4. """
  5.  
  6. @doc """
  7. Hello world.
  8.  
  9. ## Examples
  10.  
  11. iex> Example.hello()
  12. :world
  13.  
  14. """
  15. def hello do
  16. require Logger
  17. {:ok, pid} = Mysqlex.Connection.start_link(username: "", database: "", password: "", hostname: "127.0.0.1")
  18. {:ok, items} = Mysqlex.Connection.query(pid, "SELECT * FROM items LIMIT 1")
  19. Logger.info "Items=#{inspect items}"
  20. end
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement