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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Languages » Clojure
Reply 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: 14672
    
  11

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: 14672
    
  11

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
What do you think on these two things?
still question about search method
about record index
Best way to keep track of record in JTable
IllegalArgumentException when using clj-record's create function