The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

DB::Object::Fields::Unknown - Unknown Field Class

SYNOPSIS

    use DB::Object::Fields::Unknown;
    my $f = DB::Object::Fields::Unknown->new(
        table => 'some_table',
        error => 'Table some_table has no such field \"some_field\".',
    ) || die( DB::Object::Fields::Unknown->error, "\n" );

VERSION

    v0.1.0

DESCRIPTION

This class represents an unknown field. This happens when DB::Object::Fields cannot find a given field used in a SQL query. Instead of returning an error (undef), it returns this object, which is then ignored when he query is formulated.

A warning is issued by DB::Object::Fields when a field is unknown, so make sure to check your error output or your error log.

METHODS

as_string

Returns the error message as a regular string.

error

Sets or gets the error that triggered this new object.

This returns the error as a string object

field

Sets or gets the name of the unknown field.

This returns the field name as a string object

table

Sets or gets the name of the table associated with this unknown field

This returns the table name as a string object

AUTHOR

Jacques Deguest <jack@deguest.jp>

SEE ALSO

DB::Object::Fields, DB::Object::Fields::Field, DB::Object::Query

COPYRIGHT & LICENSE

Copyright(c) 2022 DEGUEST Pte. Ltd.

All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.