NAME
SQL::Engine::Operation - SQL Operation
ABSTRACT
SQL Statement Operation
SYNOPSIS
use SQL::Engine::Operation;
my $operation = SQL::Engine::Operation->new(
statement => 'SELECT * FROM "tasks" WHERE "reporter" = ? AND "assigned" = ?',
bindings => {
0 => 'user_id',
1 => 'user_id'
}
);
# my @bindings = $operation->parameters({
# user_id => 123
# });
DESCRIPTION
This package provides SQL Statement Operation.
LIBRARIES
This package uses type constraints from:
ATTRIBUTES
This package has the following attributes:
bindings
bindings(HashRef)
This attribute is read-only, accepts (HashRef)
values, and is required.
statement
statement(Str)
This attribute is read-only, accepts (Str)
values, and is required.
METHODS
This package implements the following methods:
parameters
parameters(Maybe[HashRef] $values) : ArrayRef
The parameters method returns positional bind values for use with statement handlers.
- parameters example #1
-
# given: synopsis my $bindings = $operation->parameters({ user_id => 123 }); # [123, 123]
AUTHOR
Al Newkirk, awncorp@cpan.org
LICENSE
Copyright (C) 2011-2019, Al Newkirk, et al.
This is free software; you can redistribute it and/or modify it under the terms of the The Apache License, Version 2.0, as elucidated in the "license file".