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

NAME

JsonSQL::Param::Condition - JsonSQL::Param::Condition object. This is a base class used to derive subclasses for parsing condition statements.

VERSION

version 0.41

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:

_op => The operator used to construct the condition

(ex: 'and', 'eq', or 'in').

Generated parameters:

$sql => SQL string of the condition
$binds => Arrayref of bind values to use with the query.

METHODS

Constructor new($conditionhashref)

Instantiates and returns a new JsonSQL::Param::Condition object.

    $conditionhashref           => A hashref of the condition statement keyed by the operator.

Returns a JsonSQL::Error object on failure.

ObjectMethod get_cond -> ( $sql, $binds )

Generates the SQL statement represented by the object. Returns:

    $sql            => An SQL string of conditional parameters to use with a conditional clause (ex: WHERE or ON).
    $binds          => An arrayref of parameterized values to pass with the query.

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.