Hi Stefan, ‘this’ in the map function is the ddoc in which the view is stored. As long as you place the information in the ddoc you can access it in the map function.
Maybe thats an option for you. Ingo > On 15 Dec 2015, at 14:36, Stefan Klein <[email protected]> wrote: > > Hi CouchDB Users, > > we are using one db per user, the db name and the user name are directly > related. > There are multiple daemons on server side which pass documents between > these dbs. > Each document got multiple "owner" (it's not exactly like that, but good > enough to explain) i want to create a view of documents that are no longer > "owned" by a user and can be deleted from his db. > > Is there any way to get the name of the database (in our case the user the > db belongs to) in a map function? > > I could emit the "owner" as key, but as i said, i simplified the task i > want to solve and the key is needed for something else. > Even with using an array as key i do not see a nice way to handle that. > > regards, > Stefan
