Función list Las funciones list en CouchDB permiten generar salida de vistas en cualquier formato Son guardadas bajo el campo lists del documento de diseño: { "_id" : "_ design / foo ", "_ rev " : "1-67at7bg", " lists " : { "bar" : " function (head, req ) { var row ; while ( row = getRow ()) { ... } }", "zoom" : " function () { return 'zoom!' }", } } La función es invocada con dos argumentos: head y req Donde head tiene el formato: {total_rows:10, offset:0} Donde req es el mismo objeto que reciben las funciones show , update y filter , conteniendo: { " info ": { " db_name ": " test_suite_db","doc_count ": 11,"doc_del_count": 0, " update_seq ": 11,"purge_seq": 0,"compact_running": false,"disk_size ": 4930, " instance_start_time ": "1250046852578425","disk_format_version": 4}, " method ": "GET", " path ": [" test_suite_db","_design","lists","_list","basicJSON","basicView "], " query ": {" foo ":"bar"}, " headers ": {" Accept ": " text / html,application / xhtml+xml , application / xml;q =0.9,*/*;q=0.8", " Accept-Charset ": "ISO-8859-1,utf-8;q=0.7,*;q=0.7","Accept-Encoding": " gzip,deflate","Accept-Language ": "en- us,en;q =0.5","Connection": " keep-alive ", …} " body ": " undefined ", " form ": {}, " userCtx ": {" db ": " test_suite_db","name ": null,"roles ": ["_admin"]} }