{
    "content": [
        {
            "type": "text",
            "text": "# DBI::SQL::Nano (info)\n\n## NAME\n\nDBI::SQL::Nano - a very tiny SQL engine\n\n## SYNOPSIS\n\nBEGIN { $ENV{DBISQLNANO}=1 } # forces use of Nano rather than SQL::Statement\nuse DBI::SQL::Nano;\nuse Data::Dumper;\nmy $stmt = DBI::SQL::Nano::Statement->new(\n\"SELECT bar,baz FROM foo WHERE qux = 1\"\n) or die \"Couldn't parse\";\nprint Dumper $stmt;\n\n## DESCRIPTION\n\n\"DBI::SQL::Nano\" is meant as a very minimal SQL engine for use in\nsituations where SQL::Statement is not available. In most situations\nyou are better off installing SQL::Statement although DBI::SQL::Nano\nmay be faster for some very simple tasks.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **USAGE**\n- **TABLES**\n- **BUGS AND LIMITATIONS**\n- **ACKNOWLEDGEMENTS**\n- **AUTHOR AND COPYRIGHT**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "DBI::SQL::Nano",
        "section": "",
        "mode": "info",
        "summary": "DBI::SQL::Nano - a very tiny SQL engine",
        "synopsis": "BEGIN { $ENV{DBISQLNANO}=1 } # forces use of Nano rather than SQL::Statement\nuse DBI::SQL::Nano;\nuse Data::Dumper;\nmy $stmt = DBI::SQL::Nano::Statement->new(\n\"SELECT bar,baz FROM foo WHERE qux = 1\"\n) or die \"Couldn't parse\";\nprint Dumper $stmt;",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 11,
                "subsections": []
            },
            {
                "name": "USAGE",
                "lines": 94,
                "subsections": []
            },
            {
                "name": "TABLES",
                "lines": 29,
                "subsections": []
            },
            {
                "name": "BUGS AND LIMITATIONS",
                "lines": 22,
                "subsections": []
            },
            {
                "name": "ACKNOWLEDGEMENTS",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "AUTHOR AND COPYRIGHT",
                "lines": 14,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "DBI::SQL::Nano - a very tiny SQL engine\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "BEGIN { $ENV{DBISQLNANO}=1 } # forces use of Nano rather than SQL::Statement\nuse DBI::SQL::Nano;\nuse Data::Dumper;\nmy $stmt = DBI::SQL::Nano::Statement->new(\n\"SELECT bar,baz FROM foo WHERE qux = 1\"\n) or die \"Couldn't parse\";\nprint Dumper $stmt;\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "\"DBI::SQL::Nano\" is meant as a very minimal SQL engine for use in\nsituations where SQL::Statement is not available. In most situations\nyou are better off installing SQL::Statement although DBI::SQL::Nano\nmay be faster for some very simple tasks.\n\nDBI::SQL::Nano, like SQL::Statement is primarily intended to provide a\nSQL engine for use with some pure perl DBDs including DBD::DBM,\nDBD::CSV, DBD::AnyData, and DBD::Excel. It is not of much use in and of\nitself.  You can dump out the structure of a parsed SQL statement, but\nthat is about it.\n",
                "subsections": []
            },
            "USAGE": {
                "content": "Setting the DBISQLNANO flag\nBy default, when a \"DBD\" uses \"DBI::SQL::Nano\", the module will look to\nsee if \"SQL::Statement\" is installed. If it is, SQL::Statement objects\nare used.  If SQL::Statement is not available, DBI::SQL::Nano objects\nare used.\n\nIn some cases, you may wish to use DBI::SQL::Nano objects even if\nSQL::Statement is available.  To force usage of DBI::SQL::Nano objects\nregardless of the availability of SQL::Statement, set the environment\nvariable DBISQLNANO to 1.\n\nYou can set the environment variable in your shell prior to running\nyour script (with SET or EXPORT or whatever), or else you can set it in\nyour script by putting this at the top of the script:\n\nBEGIN { $ENV{DBISQLNANO} = 1 }\n\nSupported SQL syntax\nHere's a pseudo-BNF.  Square brackets [] indicate optional items;\nAngle brackets <> indicate items defined elsewhere in the BNF.\n\nstatement ::=\nDROP TABLE [IF EXISTS] <tablename>\n| CREATE TABLE <tablename> <coldeflist>\n| INSERT INTO <tablename> [<insertcollist>] VALUES <vallist>\n| DELETE FROM <tablename> [<whereclause>]\n| UPDATE <tablename> SET <setclause> <whereclause>\n| SELECT <selectcollist> FROM <tablename> [<whereclause>]\n[<orderclause>]\n\nthe optional IF EXISTS clause ::=\n* similar to MySQL - prevents errors when trying to drop\na table that doesn't exist\n\nidentifiers ::=\n* table and column names should be valid SQL identifiers\n* especially avoid using spaces and commas in identifiers\n* note: there is no error checking for invalid names, some\nwill be accepted, others will cause parse failures\n\ntablename ::=\n* only one table (no multiple table operations)\n* see identifier for valid table names\n\ncoldeflist ::=\n* a parens delimited, comma-separated list of column names\n* see identifier for valid column names\n* column types and column constraints may be included but are ignored\ne.g. these are all the same:\n(id,phrase)\n(id INT, phrase VARCHAR(40))\n(id INT PRIMARY KEY, phrase VARCHAR(40) NOT NULL)\n* you are *strongly* advised to put in column types even though\nthey are ignored ... it increases portability\n\ninsertcollist ::=\n* a parens delimited, comma-separated list of column names\n* as in standard SQL, this is optional\n\nselectcollist ::=\n* a comma-separated list of column names\n* or an asterisk denoting all columns\n\nvallist ::=\n* a parens delimited, comma-separated list of values which can be:\n* placeholders (an unquoted question mark)\n* numbers (unquoted numbers)\n* column names (unquoted strings)\n* nulls (unquoted word NULL)\n* strings (delimited with single quote marks);\n* note: leading and trailing percent mark (%) and underscore ()\ncan be used as wildcards in quoted strings for use with\nthe LIKE and CLIKE operators\n* note: escaped single quotation marks within strings are not\nsupported, neither are embedded commas, use placeholders instead\n\nsetclause ::=\n* a comma-separated list of column = value pairs\n* see vallist for acceptable value formats\n\nwhereclause ::=\n* a single \"column/value <op> column/value\" predicate, optionally\npreceded by \"NOT\"\n* note: multiple predicates combined with ORs or ANDs are not supported\n* see vallist for acceptable value formats\n* op may be one of:\n< > >= <= = <> LIKE CLIKE IS\n* CLIKE is a case insensitive LIKE\n\norderclause ::= columnname [ASC|DESC]\n* a single column optional ORDER BY clause is supported\n* as in standard SQL, if neither ASC (ascending) nor\nDESC (descending) is specified, ASC becomes the default\n",
                "subsections": []
            },
            "TABLES": {
                "content": "DBI::SQL::Nano::Statement operates on exactly one table. This table\nwill be opened by inherit from DBI::SQL::Nano::Statement and implements\nthe \"opentable\" method.\n\nsub opentable ($$$$$)\n{\n...\nreturn Your::Table->new( \\%attributes );\n}\n\nDBI::SQL::Nano::Statement expects a rudimentary interface is\nimplemented by the table object, as well as SQL::Statement expects.\n\npackage Your::Table;\n\nuse vars qw(@ISA);\n@ISA = qw(DBI::SQL::Nano::Table);\n\nsub drop ($$)        { ... }\nsub fetchrow ($$$)  { ... }\nsub pushrow ($$$)   { ... }\nsub pushnames ($$$) { ... }\nsub truncate ($$)    { ... }\nsub seek ($$$$)      { ... }\n\nThe base class interfaces are provided by DBI::SQL::Nano::Table in\ncase of relying on DBI::SQL::Nano or SQL::Eval::Table (see SQL::Eval\nfor details) otherwise.\n",
                "subsections": []
            },
            "BUGS AND LIMITATIONS": {
                "content": "There are no known bugs in DBI::SQL::Nano::Statement. If you find a one\nand want to report, please see DBI for how to report bugs.\n\nDBI::SQL::Nano::Statement is designed to provide a minimal subset for\nexecuting SQL statements.\n\nThe most important limitation might be the restriction on one table per\nstatement. This implies, that no JOINs are supported and there cannot\nbe any foreign key relation between tables.\n\nThe where clause evaluation of DBI::SQL::Nano::Statement is very slow\n(SQL::Statement uses a precompiled evaluation).\n\nINSERT can handle only one row per statement. To insert multiple rows,\nuse placeholders as explained in DBI.\n\nThe DBI::SQL::Nano parser is very limited and does not support any\nadditional syntax such as brackets, comments, functions, aggregations\netc.\n\nIn contrast to SQL::Statement, temporary tables are not supported.\n",
                "subsections": []
            },
            "ACKNOWLEDGEMENTS": {
                "content": "Tim Bunce provided the original idea for this module, helped me out of\nthe tangled trap of namespaces, and provided help and advice all along\nthe way.  Although I wrote it from the ground up, it is based on Jochen\nWiedmann's original design of SQL::Statement, so much of the credit for\nthe API goes to him.\n",
                "subsections": []
            },
            "AUTHOR AND COPYRIGHT": {
                "content": "This module is originally written by Jeff Zucker < jzucker AT cpan.org\n>\n\nThis module is currently maintained by Jens Rehsack < jrehsack AT\ncpan.org >\n\nCopyright (C) 2010 by Jens Rehsack, all rights reserved.  Copyright (C)\n2004 by Jeff Zucker, all rights reserved.\n\nYou may freely distribute and/or modify this module under the terms of\neither the GNU General Public License (GPL) or the Artistic License, as\nspecified in the Perl README file.\n\nperl v5.34.0                      2026-06-22               DBI::SQL::Nano(3pm)",
                "subsections": []
            }
        }
    }
}