NAME
DBIO::MySQL::SQLMaker - MySQL-specific SQL generation for DBIO
VERSION
version 0.900000
SYNOPSIS
# Used automatically by DBIO::MySQL::Storage — no manual setup needed.
DESCRIPTION
MySQL-specific SQL generation layer for DBIO. Extends DBIO::SQLMaker with the following MySQL adaptations:
INSERTwith no columns emitsINSERT INTO t () VALUES ()instead of the standardINSERT INTO t DEFAULT VALUES, which MySQL does not support.Supports
STRAIGHT_JOINas a join type hint via thejoin_typeresult source attribute.UPDATEandDELETEstatements that reference the modification target table in a subquery are automatically wrapped in a double subquery to work around MySQL's restriction against self-referencing in DML.Implements MySQL's
SELECT ... FOR UPDATE / FOR SHARElocking syntax, including theOF tbl_name,NOWAIT, andSKIP LOCKEDclauses introduced in MySQL 8.0.1.
METHODS
apply_limit
Uses MySQL's LIMIT [offset,] rows syntax instead of the standard LIMIT rows OFFSET offset.
insert
Overrides the standard INSERT to emit INSERT INTO t () VALUES () for rows with no column values, satisfying MySQL's syntax requirements.
update
delete
Overrides the base update and delete methods. When the modification target table is referenced in a subquery within the same statement (a pattern MySQL rejects), the affected subquery is automatically re-wrapped in an additional SELECT * FROM (...) `_forced_double_subquery` layer to satisfy MySQL's parser.
_lock_select
Generates the locking clause appended to SELECT statements. Accepts either a plain string ('update', 'share') or a hashref for fine-grained control:
$rs->search({}, { for => { type => 'update', of => ['tbl'], modifier => 'nowait' } });
Valid type values: update, share. Valid modifier values: nowait, skip_locked. The of key takes a table name or arrayref of table names.
DBIO::MySQL::Storage - Storage class that uses this SQL maker
DBIO::MySQL - Schema component entry point
AUTHOR
DBIO & DBIx::Class Authors
COPYRIGHT AND LICENSE
Copyright (C) 2026 DBIO Authors Portions Copyright (C) 2005-2025 DBIx::Class Authors Based on DBIx::Class, heavily modified.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 285:
Unknown directive: =seealso