database: more plumbing of cursors from database command.