{
    "content": [
        {
            "type": "text",
            "text": "# Class::DBI::Iterator (perldoc)\n\n## NAME\n\nClass::DBI::Iterator - Iterate over Class::DBI search results\n\n## SYNOPSIS\n\nmy $it = My::Class->search(foo => 'bar');\nmy $results = $it->count;\nmy $firstresult = $it->first;\nwhile ($it->next) { ... }\nmy @slice = $it->slice(10,19);\nmy $slice = $it->slice(10,19);\n$it->reset;\n$it->deleteall;\n\n## DESCRIPTION\n\nAny Class::DBI search (including a hasmany method) which returns multiple objects can be made\nto return an iterator instead simply by executing the search in scalar context.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **CAVEAT**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Class::DBI::Iterator",
        "section": "",
        "mode": "perldoc",
        "summary": "Class::DBI::Iterator - Iterate over Class::DBI search results",
        "synopsis": "my $it = My::Class->search(foo => 'bar');\nmy $results = $it->count;\nmy $firstresult = $it->first;\nwhile ($it->next) { ... }\nmy @slice = $it->slice(10,19);\nmy $slice = $it->slice(10,19);\n$it->reset;\n$it->deleteall;",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 14,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "CAVEAT",
                "lines": 3,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Class::DBI::Iterator - Iterate over Class::DBI search results\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "my $it = My::Class->search(foo => 'bar');\n\nmy $results = $it->count;\n\nmy $firstresult = $it->first;\nwhile ($it->next) { ... }\n\nmy @slice = $it->slice(10,19);\nmy $slice = $it->slice(10,19);\n\n$it->reset;\n\n$it->deleteall;\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Any Class::DBI search (including a hasmany method) which returns multiple objects can be made\nto return an iterator instead simply by executing the search in scalar context.\n\nThen, rather than having to fetch all the results at the same time, you can fetch them one at a\ntime, potentially saving a considerable amount of processing time and memory.\n",
                "subsections": []
            },
            "CAVEAT": {
                "content": "Note that there is no provision for the data changing (or even being deleted) in the database\ninbetween performing the search and retrieving the next result.\n",
                "subsections": []
            }
        }
    }
}