aspose 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


Win a copy of Java 8 in Action this week in the Java 8 forum!
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: 14687
    
  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: 14687
    
  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
 
Similar Threads
IllegalArgumentException when using clj-record's create function
What do you think on these two things?
about record index
still question about search method
Best way to keep track of record in JTable