Skip to content

Commit

Permalink
all implementations updated to use hyperion.api
Browse files Browse the repository at this point in the history
  • Loading branch information
slagyr committed Aug 30, 2012
1 parent 7c80846 commit 03abcda
Show file tree
Hide file tree
Showing 26 changed files with 40 additions and 37 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -9,3 +9,4 @@
*.lein-deps-sum
*.idea
*.iml
repl-port
2 changes: 1 addition & 1 deletion api/src/hyperion/dev/spec_helper.clj
@@ -1,7 +1,7 @@
(ns hyperion.dev.spec-helper
(:use
[speclj.core]
[hyperion.core :only [*ds*]]
[hyperion.api :only [*ds*]]
[hyperion.dev.memory :only [new-memory-datastore]]))

(defn with-memory-datastore []
Expand Down
2 changes: 1 addition & 1 deletion gae/project.clj
Expand Up @@ -3,7 +3,7 @@
(defproject hyperion/hyperion-gae (:version config)
:description "Google App Engine Datastore for Hyperion"
:dependencies [[org.clojure/clojure ~(:clojure-version config)]
[hyperion/hyperion-core ~(:version config)]
[hyperion/hyperion-api ~(:version config)]
[com.google.appengine/appengine-api-1.0-sdk "1.6.6"]]

; leiningen 1
Expand Down
2 changes: 1 addition & 1 deletion gae/spec/hyperion/gae_spec.clj
@@ -1,6 +1,6 @@
(ns hyperion.gae-spec
(:use [speclj.core]
[hyperion.core]
[hyperion.api]
[hyperion.dev.spec :only [it-behaves-like-a-datastore]]
[hyperion.gae.spec-helper :only (with-local-datastore)]
[hyperion.gae :only (new-gae-datastore) :as gae]
Expand Down
12 changes: 6 additions & 6 deletions gae/src/hyperion/gae.clj
@@ -1,11 +1,11 @@
(ns hyperion.gae
(:use [chee.string :only (gsub spear-case)]
[chee.util :only (->options)]
[hyperion.core :only (Datastore *entity-specs*)])
(:require [clojure.string :as str]
(:require [chee.string :refer [gsub spear-case]]
[chee.util :refer [->options]]
[clojure.string :as str]
[hyperion.abstr :refer [Datastore]]
[hyperion.filtering :as filter]
[hyperion.gae.types]
[hyperion.sorting :as sort]
[hyperion.filtering :as filter])
[hyperion.sorting :as sort])
(:import [com.google.appengine.api.datastore Entity Entities Query DatastoreService DatastoreServiceFactory Query$FilterOperator
Query$SortDirection FetchOptions$Builder EntityNotFoundException KeyFactory Key]))

Expand Down
2 changes: 1 addition & 1 deletion gae/src/hyperion/gae/spec_helper.clj
@@ -1,7 +1,7 @@
(ns hyperion.gae.spec-helper
(:use
[speclj.core]
[hyperion.core :only [*ds*]]
[hyperion.api :only [*ds*]]
[hyperion.gae :only [new-gae-datastore]])
(:import
[com.google.appengine.tools.development.testing
Expand Down
2 changes: 1 addition & 1 deletion gae/src/hyperion/gae/types.clj
@@ -1,5 +1,5 @@
(ns hyperion.gae.types
(:use [hyperion.core :only [pack unpack]])
(:use [hyperion.api :only [pack unpack]])
(:import [com.google.appengine.api.datastore
Key KeyFactory ShortBlob Blob Category Email GeoPt Link
IMHandle IMHandle$Scheme PostalAddress Rating PhoneNumber Text]
Expand Down
4 changes: 2 additions & 2 deletions mongo/README.md
Expand Up @@ -9,9 +9,9 @@ Indexes should be added externally since Hyperion doesn't support indexes.

## Usage

(require 'hyperion.core)
(require 'hyperion.api)
(require 'hyperion.mongo)
(binding [hyperion.core/*ds* (hyperion.mongo/new-mongo-datastore :host "localhost" :port 27017 :database "mydb")]
(binding [hyperion.api/*ds* (hyperion.mongo/new-mongo-datastore :host "localhost" :port 27017 :database "mydb")]
(save {:kind "test" :value "test"})
(find-by-kind "test"))

Expand Down
2 changes: 1 addition & 1 deletion mongo/project.clj
Expand Up @@ -3,7 +3,7 @@
(defproject hyperion/hyperion-mongo (:version config)
:description "Mongo Datastore for Hyperion"
:dependencies [[org.clojure/clojure ~(:clojure-version config)]
[hyperion/hyperion-core ~(:version config)]
[hyperion/hyperion-api ~(:version config)]
[org.mongodb/mongo-java-driver "2.8.0"]]

; leiningen 2
Expand Down
2 changes: 1 addition & 1 deletion mongo/spec/hyperion/mongo_spec.clj
@@ -1,6 +1,6 @@
(ns hyperion.mongo-spec
(:require [speclj.core :refer :all ]
[hyperion.core :refer :all ]
[hyperion.api :refer :all ]
[hyperion.dev.spec :refer [it-behaves-like-a-datastore]]
[hyperion.mongo.spec-helper :refer [with-testable-mongo-datastore]]
[hyperion.mongo :refer :all ]))
Expand Down
2 changes: 1 addition & 1 deletion mongo/src/hyperion/mongo.clj
@@ -1,5 +1,5 @@
(ns hyperion.mongo
(:require [hyperion.core :refer [Datastore]]
(:require [hyperion.abstr :refer [Datastore]]
[hyperion.key :refer (compose-key decompose-key)]
[chee.util :refer [->options]]))

Expand Down
2 changes: 1 addition & 1 deletion mongo/src/hyperion/mongo/spec_helper.clj
@@ -1,7 +1,7 @@
(ns hyperion.mongo.spec-helper
(:require [speclj.core :refer :all ]
[hyperion.mongo :refer :all ]
[hyperion.core :refer [*ds*]]))
[hyperion.api :refer [*ds*]]))

(def test-mongo (atom nil))

Expand Down
2 changes: 1 addition & 1 deletion mysql/project.clj
Expand Up @@ -3,7 +3,7 @@
(defproject hyperion/hyperion-mysql (:version config)
:description "MySQL Datastore for Hyperion"
:dependencies [[org.clojure/clojure ~(:clojure-version config)]
[hyperion/hyperion-core ~(:version config)]
[hyperion/hyperion-api ~(:version config)]
[hyperion/hyperion-sql ~(:version config)]
[mysql/mysql-connector-java "5.1.6"]]

Expand Down
2 changes: 1 addition & 1 deletion mysql/spec/hyperion/mysql_spec.clj
Expand Up @@ -2,7 +2,7 @@
(:use [speclj.core]
[hyperion.sql.spec-helper]
[hyperion.dev.spec :only [it-behaves-like-a-datastore]]
[hyperion.core :only [*ds* new-datastore]]
[hyperion.api :only [*ds* new-datastore]]
[hyperion.sql.jdbc :only [execute-mutation]]
[hyperion.sql.query]
[hyperion.mysql :only [new-mysql-datastore]]))
Expand Down
2 changes: 1 addition & 1 deletion postgres/project.clj
Expand Up @@ -3,7 +3,7 @@
(defproject hyperion/hyperion-postgres (:version config)
:description "Postgres Datastore for Hyperion"
:dependencies [[org.clojure/clojure ~(:clojure-version config)]
[hyperion/hyperion-core ~(:version config)]
[hyperion/hyperion-api ~(:version config)]
[hyperion/hyperion-sql ~(:version config)]
[postgresql/postgresql "8.4-702.jdbc4"]]

Expand Down
2 changes: 1 addition & 1 deletion postgres/spec/hyperion/postgres_spec.clj
Expand Up @@ -2,7 +2,7 @@
(:use [speclj.core]
[hyperion.sql.spec-helper]
[hyperion.dev.spec :only [it-behaves-like-a-datastore]]
[hyperion.core :only [*ds*]]
[hyperion.api :only [*ds*]]
[hyperion.sql.jdbc :only [execute-mutation]]
[hyperion.sql.connection :only [connection]]
[hyperion.sql.query]
Expand Down
2 changes: 1 addition & 1 deletion riak/project.clj
Expand Up @@ -3,7 +3,7 @@
(defproject hyperion/hyperion-riak (:version config)
:description "Riak Datastore for Hyperion"
:dependencies [[org.clojure/clojure ~(:clojure-version config)]
[hyperion/hyperion-core ~(:version config)]
[hyperion/hyperion-api ~(:version config)]
[com.basho.riak/riak-client "1.0.5"]
[cheshire "4.0.1"]]

Expand Down
2 changes: 1 addition & 1 deletion riak/spec/hyperion/riak_spec.clj
@@ -1,6 +1,6 @@
(ns hyperion.riak-spec
(:require [speclj.core :refer :all ]
[hyperion.core :refer :all ]
[hyperion.api :refer :all ]
[hyperion.dev.spec :refer [it-behaves-like-a-datastore]]
[hyperion.riak.spec-helper :refer [with-testable-riak-datastore]]
[hyperion.riak :refer :all ]
Expand Down
14 changes: 7 additions & 7 deletions riak/src/hyperion/riak.clj
@@ -1,14 +1,14 @@
(ns hyperion.riak
(:require [hyperion.core :refer [Datastore]]
[hyperion.memory :as memory]
[hyperion.sorting :as sort]
[hyperion.filtering :as filter]
[hyperion.key :refer (compose-key decompose-key)]
[chee.util :refer [->options]]
(:require [chee.util :refer [->options]]
[cheshire.core :refer [generate-string parse-string]]
[clojure.data.codec.base64 :refer [encode decode]]
[clojure.set :refer [intersection]]
[clojure.string :as string]
[clojure.set :refer [intersection]])
[hyperion.abstr :refer [Datastore]]
[hyperion.filtering :as filter]
[hyperion.key :refer (compose-key decompose-key)]
[hyperion.memory :as memory]
[hyperion.sorting :as sort])
(:import [com.basho.riak.client.builders RiakObjectBuilder]
[com.basho.riak.client.query.functions NamedErlangFunction JSSourceFunction]
[com.basho.riak.client.query.indexes BinIndex KeyIndex IntIndex]
Expand Down
2 changes: 1 addition & 1 deletion riak/src/hyperion/riak/spec_helper.clj
@@ -1,7 +1,7 @@
(ns hyperion.riak.spec-helper
(:require [speclj.core :refer :all ]
[hyperion.riak :refer :all ]
[hyperion.core :refer [*ds*]]
[hyperion.api :refer [*ds*]]
[clojure.set :refer [difference union]])
(:import [com.basho.riak.client.query.indexes BinIndex KeyIndex]
[com.basho.riak.client.raw.query.indexes BinRangeQuery]))
Expand Down
2 changes: 1 addition & 1 deletion sql/project.clj
Expand Up @@ -3,7 +3,7 @@
(defproject hyperion/hyperion-sql (:version config)
:description "SQL utilities for hyperion"
:dependencies [[org.clojure/clojure ~(:clojure-version config)]
[hyperion/hyperion-core ~(:version config)]
[hyperion/hyperion-api ~(:version config)]
[org.clojure/data.codec "0.1.0"]]

; leiningen 1
Expand Down
3 changes: 2 additions & 1 deletion sql/spec/hyperion/sql_spec.clj
@@ -1,6 +1,7 @@
(ns hyperion.sql-spec
(:require [speclj.core :refer :all]
[hyperion.core :refer :all]
[hyperion.abstr :refer :all]
[hyperion.api :refer :all]
[hyperion.sql :refer :all]
[hyperion.sql.key :refer [compose-key]]
[hyperion.sql.query-builder :refer [new-query-builder]]
Expand Down
3 changes: 2 additions & 1 deletion sql/src/hyperion/sql.clj
@@ -1,6 +1,7 @@
(ns hyperion.sql
(:require [clojure.string :as string]
[hyperion.core :refer [Datastore new? ds-delete-by-kind ds-find-by-kind]]
[hyperion.abstr :refer [Datastore ds-delete-by-kind ds-find-by-kind]]
[hyperion.api :refer [new?]]
[hyperion.sql.connection :refer [with-connection]]
[hyperion.sql.query-builder :refer :all ]
[hyperion.sql.query :refer [make-query]]
Expand Down
2 changes: 1 addition & 1 deletion sql/src/hyperion/sql/middleware.clj
@@ -1,6 +1,6 @@
(ns hyperion.sql.middleware
(:use
[hyperion.core :only [*ds*]]
[hyperion.api :only [*ds*]]
[hyperion.sql.jdbc :only [transaction]]
[hyperion.sql.connection :only [with-connection-url]]))

Expand Down
2 changes: 1 addition & 1 deletion sqlite/project.clj
Expand Up @@ -3,7 +3,7 @@
(defproject hyperion/hyperion-sqlite (:version config)
:description "SQLite Datastore for Hyperion"
:dependencies [[org.clojure/clojure ~(:clojure-version config)]
[hyperion/hyperion-core ~(:version config)]
[hyperion/hyperion-api ~(:version config)]
[hyperion/hyperion-sql ~(:version config)]
[sqlitejdbc "0.5.6"]]

Expand Down
2 changes: 1 addition & 1 deletion sqlite/spec/hyperion/sqlite_spec.clj
Expand Up @@ -2,7 +2,7 @@
(:use [speclj.core]
[hyperion.sql.spec-helper]
[hyperion.dev.spec :only [it-behaves-like-a-datastore]]
[hyperion.core :only [*ds* new-datastore]]
[hyperion.api :only [*ds* new-datastore]]
[hyperion.sql.connection :only [connection]]
[hyperion.sql.jdbc :only [execute-mutation]]
[hyperion.sql.query]
Expand Down

0 comments on commit 03abcda

Please sign in to comment.