Skip to content

Instantly share code, notes, and snippets.

View rozap's full-sized avatar

Chris Duranti rozap

View GitHub Profile
def authors(cd) do
#Connect to the database.
conn = RethinkDB.connect([host: "10.0.0.30", port: 28015])
q = case cd do
"create" -> table_create("authors")
"destroy" -> table_drop("authors")
end
|> run(conn)
defp table_action("create"), do: table_create("authors")
defp table_action("destroy"), do: table_drop("authors")
def authors(cd) do
#Connect to the database.
conn = RethinkDB.connect([host: "10.0.0.30", port: 28015])
q = table_action(cd) |> run(conn)