NAME
DBIx::QuickORM::Raw - Wrapper marking a value as already in database form.
DESCRIPTION
A thin wrapper around a single value that is already in its database (deflated) form. When used as a value in a query it binds as-is rather than being deflated again, which matters for types whose deflation is not idempotent (JSON re-encodes a string, for example).
The main use is compare-and-set guards: the guard value is read straight from a row's stored data and must be compared against the exact bytes in the database, so it must not pass through deflation a second time.
This is intentionally not a column type and cannot be used with autotype; it only ever wraps an individual value. It consumes the type role purely so the existing bind path recognizes it and calls its qorm_deflate, which hands the value back untouched.
SYNOPSIS
my $raw = DBIx::QuickORM::Raw->new($row->raw_stored_field('data'));
# Compares against the stored value exactly, no re-deflation.
$handle->where({data => {'-value' => $raw}})->...;
PUBLIC METHODS
- $raw = DBIx::QuickORM::Raw->new($value)
-
Wrap a database-form value.
- $value = $raw->qorm_deflate(%args)
-
Return the wrapped value unchanged; it is already in database form.
SOURCE
The source code repository for DBIx::QuickORM can be found at https://github.com/exodist/DBIx-QuickORM.
MAINTAINERS
AUTHORS
COPYRIGHT
Copyright Chad Granum <exodist7@gmail.com>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.