The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

JsonSQL::Query::Query - JSON query base class. Provides the quote_identifier method for escaping table and column identifiers.

VERSION

version 0.41

SYNOPSIS

This is a base module used to construct JsonSQL::Query modules. It is not meant to be instantiated directly. Instead have a look at,

You can also create your own subclass...

METHODS

Constructor new($query_rulesets, $json_schema, $quote_char) -> JsonSQL::Query::Query

Creates a JsonSQL::Validator object using the supplied $query_rulesets and $json_schema and stores a reference to use for future validation and whitelist checking purposes. See JsonSQL::Validator for more information.

    $query_rulesets     => The whitelist rule sets to be associated with this JsonSQL::Query object.
    $json_schema        => The name of the JSON schema to use for validation of the query.
    $quote_char         => The character to use for quoting identifiers. Defaults to ANSI double quotes.

ObjectMethod quote_identifier($identifier) -> quoted $identifier

Since table and column identifiers cannot be parameterized by most databases they have to be quoted. This method is used during SQL query construction to quote non-parameterized identifiers.

    $identifier         => The identifier string to quote.

    Ex:
        Column1     => "Column1"
        Co"lumn1    => "Co""lumn1"

AUTHOR

Chris Hoefler <bhoefler@draper.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2017 by Chris Hoefler.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.