NAME

JsonSQL::Param::Conditions::RangeCondition - JsonSQL::Param::Conditions::RangeCondition object. Subclass for parsing range conditions.

VERSION

version 0.4

SYNOPSIS

This module constructs a Perl object representing the VALUES parameter of an SQL INSERT statement and has methods for generating the appropriate SQL string and bind values for use with the DBI module.

DESCRIPTION

Object properties:

_field => JsonSQL::Param::Field
_minvalue => <scalar> or JsonSQL::Param::Field
_maxvalue => <scalar> or JsonSQL::Param::Field

Generated parameters:

$rangeparameter => SQL::QueryMaker object.

METHODS

Constructor new($conditionhashref, $queryObj, $default_table_rules)

Instantiates and returns a new JsonSQL::Param::Conditions::RangeCondition object.

$conditionhashref           => A hashref of the condition statement keyed by the operator.
$queryObj                   => A reference to the JsonSQL::Query object that will own this object.
$default_table_rules        => The default whitelist table rules to use to validate access when the table params 
                               are not provided to the field object. Usually, these are acquired from the table params
                               of another object (ex: the FROM clause of a SELECT statement).

Returns a JsonSQL::Error object on failure.

ObjectMethod get_sql_obj -> $rangeparameter

Generates parameters represented by the object for the SQL statement. Returns:

$rangeparameter           => The range condition to append to the WHERE clause. Constructed by calling the 
                             L<SQL::QueryMaker> function defined by the dispatcher with the $field, $minvalue, and $maxvalue
                             parameters.

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.