Using any clojure database/orm library, how can I create an index in a database? I can't seem to find any relevant examples. (I'm most interested in ClojureQL and clojure.java.jdbc, since I'm currently using those).
EDIT: OK, so I figured out a way to do this with clojure.java.jdbc:
(ns foo
(:require [clojure.java [jdbc :as sql]]))
(sql/with-connection db
(sql/do-commands
"CREATE INDEX IF NOT EXISTS my_index ON some_table (a_column)" ))
But I'd really like to know how to do this in ClojureQL.
ClojureQL is meant for generating the Data Manipulation part of SQL, CRUDing data, but not structure. To generate and execute the Data Definition side of SQL under Clojure, have a look at the Lobos library, which is being made to compliment ClojureQL in this regard.