NAME

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

VERSION

version 0.4

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) -> 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.

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.