{
    "mode": "perldoc",
    "parameter": "Class::DBI::Query",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Class%3A%3ADBI%3A%3AQuery/json",
    "generated": "2026-10-04T09:02:46Z",
    "synopsis": "my $sth = Class::DBI::Query\n->new({\nowner => $class,\nsqlname => $type,\nessential => \\@columns,\nwherecolumns => \\@wherecols,\n})\n->run($val);",
    "sections": {
        "NAME": {
            "content": "Class::DBI::Query - Deprecated SQL manager for Class::DBI\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "my $sth = Class::DBI::Query\n->new({\nowner => $class,\nsqlname => $type,\nessential => \\@columns,\nwherecolumns => \\@wherecols,\n})\n->run($val);\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This abstracts away many of the details of the Class::DBI underlying SQL mechanism. For the most\npart you probably don't want to be interfacing directly with this.\n\nThe underlying mechanisms are not yet stable, and are subject to change at any time.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "A Query can have many options set before executing. Most can either be passed as an option to",
            "subsections": [
                {
                    "name": "new",
                    "content": "owner\nThe Class::DBI subclass that 'owns' this query. In the vast majority of cases a query will\nreturn objects - the owner is the class of which instances will be returned.\n\nsqlname\nThis should be the name of a query set up using setsql.\n\nwhereclause\nThis is the raw SQL that will substituted into the 'WHERE %s' in your query. If you have\nmultiple %s's in your query then you should supply a listref of whereclauses. This SQL can\ninclude placeholders, which will be used when you call run().\n\nessential\nWhen retrieving rows from the database that match the WHERE clause of the query, these are the\ncolumns that we fetch back and pre-load the resulting objects with. By default this is the\nEssential column group of the owner class.\n"
                }
            ]
        },
        "METHODS": {
            "content": "where()\n$query->where($match, @columns);\n\nThis will extend your 'WHERE' clause by adding a 'AND $column = ?' (or whatever $match is,\nisntead of \"=\") for each column passed. If you have multiple WHERE clauses this will extend the\nlast one.\n",
            "subsections": []
        }
    },
    "summary": "Class::DBI::Query - Deprecated SQL manager for Class::DBI",
    "flags": [],
    "examples": [],
    "see_also": []
}