File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Clojure and the fly likes Setting the db var for clj-record library in a common file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » Clojure
Bookmark "Setting the db var for clj-record library in a common file" Watch "Setting the db var for clj-record library in a common file" New topic
Author

Setting the db var for clj-record library in a common file

Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

I'm trying to use the clj-record library, and I don't want to set the db variable in all my entity files. How can I put it in a common file and use it ? (I still don't get the concept of namespace well...)

Here is what I have :
chapter09/model/user.clj

I want to extract the db variable.


[My Blog]
All roads lead to JavaRanch
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

Got it. That was simple...

chapter09/config/db.clj


chapter09/model/user.clj
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Setting the db var for clj-record library in a common file