-
-
16 Jun 2015 03:55:50 UTC
- Distribution: Fey
- Module version: 0.43
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (6)
- Testers (893 / 4 / 0)
- Kwalitee
Bus factor: 1- 97.59% Coverage
- License: artistic_2
- Activity
24 month- Tools
- Download (88.18KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 5 contributors-
Aristotle Pagaltzis
-
hdp@glaive.weftsoar.net
-
hdp@localhost
-
hdp@rook.opensourcery.com
-
Oliver Charles
- Dependencies
- Carp
- Exception::Class
- Exporter
- List::AllUtils
- Moose
- Moose::Role
- Moose::Util::TypeConstraints
- MooseX::Params::Validate
- MooseX::Role::Parameterized
- MooseX::SemiAffordanceAccessor
- MooseX::StrictConstructor
- MooseX::Types
- MooseX::Types::Combine
- MooseX::Types::Moose
- Scalar::Util
- Task::Weaken
- Tie::IxHash
- base
- namespace::autoclean
- overload
- strict
- warnings
- Reverse dependencies
- CPAN Testers List
- Dependency graph
Take me over?
The maintainer of this distribution is looking for someone to take over! If you're interested then please contact them via email.NAME
Fey::SQL::Update - Represents a UPDATE query
VERSION
version 0.43
SYNOPSIS
my $sql = Fey::SQL->new_update(); # UPDATE Part # SET quantity = 10 # WHERE part_id IN (1, 5) $sql->update($Part); $sql->set( $quantity, 10 ); $sql->where( $part_id, 'IN', 1, 5 ); print $sql->sql($dbh);
DESCRIPTION
This class represents a
UPDATE
query.METHODS
This class provides the following methods:
Constructor
To construct an object of this class, call
$query->update()
on aFey::SQL
object.$update->update()
This method specifies the
UPDATE
clause of the query. It expects one or more Fey::Table objects (not aliases). Most RDBMS implementations only allow for a single table here, but some (like MySQL) do allow for multi-table updates.$update->set(...)
This method takes a list of key/value pairs. The keys should be column objects, and the value can be one of the following:
a plain scalar, including undef
This will be passed to
Fey::Literal->new_from_scalar()
.Fey::Literal
objectFey::Column
objectA column alias cannot be used.
Fey::Placeholder
object
$update->where(...)
See the Fey::SQL section on WHERE Clauses for more details.
$update->order_by(...)
See the Fey::SQL section on ORDER BY Clauses for more details.
$update->limit(...)
See the Fey::SQL section on LIMIT Clauses for more details.
$update->sql($dbh)
Returns the full SQL statement which this object represents. A DBI handle must be passed so that identifiers can be properly quoted.
$update->bind_params()
See the Fey::SQL section on Bind Parameters for more details.
$update->update_clause()
Returns the
UPDATE
clause portion of the SQL statement as a string.$update->set_clause()
Returns the
SET
clause portion of the SQL statement as a string.$update->where_clause()
Returns the
WHERE
clause portion of the SQL statement as a string.$update->order_by_clause()
Returns the
ORDER BY
clause portion of the SQL statement as a string.$update->limit_clause()
Returns the
LIMIT
clause portion of the SQL statement as a string.ROLES
BUGS
See Fey for details on how to report bugs.
AUTHOR
Dave Rolsky <autarch@urth.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2011 - 2015 by Dave Rolsky.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
Module Install Instructions
To install Fey, copy and paste the appropriate command in to your terminal.
cpanm Fey
perl -MCPAN -e shell install Fey
For more information on module installation, please visit the detailed CPAN module installation guide.