             
             fn()
                 
-
+        close: (fn)->
+            @_db.close()
+            fn?()
+        
         get: (key, fn)->
             @_client.findOne _id:key, fn
 

        distinct: (field, query, fn)->
            @_client.distinct field, query, fn

        find: (query, options, fields, fn)->			
            query ?= {}
            
            q = @_client.find(query)
            q.count (err, size)=>
                
                options ?= {}		
                
                options.skip = options.offset

                options.size = size
                
                q.toArray (err, items)=>				
                    return fn(err) if err
                    process.nextTick ()=>
                        fn null, @_filterFields(items, fields), options, fields
                        