Last active
August 29, 2015 13:57
-
-
Save echupriyanov/9758230 to your computer and use it in GitHub Desktop.
Problematic gen-class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns task02.Database | |
(:gen-class | |
; :methods [^:static [InitDatabase [] void] | |
; ^:static [Select [String] String]] | |
; :main false | |
:prefix - | |
) | |
(:use [task02 db query]) | |
) | |
;; Объявить класс task02.Database с двумя статическими функциями доступными из Java: | |
;; - void InitDatabase() - должна выполнять начальную загрузку данных используя функцию | |
;; task02.db/load-initial-data | |
;; - String Select(String query) - должна выполнять запрос к базе данных | |
;; (task02.query/perform-query) и возвращать результат в виде строки в формате EDN. | |
;; Hint: load-initial-data, pr-str, perform-query | |
; :implement-me | |
(defn -InitDatabase [] ; not generated without explicit declaration | |
(load-initial-data)) | |
(defn -Select [^String s] ; not generated without explicit declaration | |
(pr-str (perform-query s))) | |
(defn -toString [this] ; generated | |
"Hi, there!") | |
(defn -myLovelyMethod ; not generated without explicit declaration | |
[this] | |
"Long live Clojure!" | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment