NAME

DBIO::DB2::Storage::Cursor - Reads the character columns of a Db2 result as characters

VERSION

version 0.900004

DESCRIPTION

DBD::DB2 returns the text of a result as the UTF-8 bytes the server holds, without the UTF-8 flag, and has no attribute to change that. This cursor decodes them: every column of a character type (CHAR, VARCHAR, LONG VARCHAR, CLOB, DBCLOB, the wide forms) of a database whose code set is UTF-8 ("_utf8_database" in DBIO::DB2::Storage). A binary column (BLOB, BINARY, VARBINARY) is left as it comes, a NULL stays NULL, and a database that is not UTF-8 is read as the DBD hands it over.

Used by DBIO::DB2::Storage as its cursor_class. Rows that do not come through a cursor ("select_single" in DBIO::Storage::DBI, which reads numbers and the like) are not decoded.

METHODS

decode_rows

DBIO::DB2::Storage::Cursor->decode_rows($storage, $sth, \@row, ...);

Decodes, in place, the character columns of the given rows (array references) of the result of $sth. Nothing happens when the database is not UTF-8 or the result has no character column. The one place that does it, for the cursor and for "select_single" in DBIO::DB2::Storage.

next

"next" in DBIO::Storage::DBI::Cursor, the character columns decoded.

all

"all" in DBIO::Storage::DBI::Cursor, the character columns decoded.

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.