=for comment POD_DERIVED_INDEX_GENERATED
The following documentation is automatically generated.  Please do not edit
this file, but rather the original, inline with DBIx::Class::Storage::DBI::AutoCast
at lib/DBIx/Class/Storage/DBI/AutoCast.pm
(on the system that originally ran this).
If you do edit this file, and don't want your changes to be removed, make
sure you change the first line.

=cut

=head1 NAME

DBIx::Class::Storage::DBI::AutoCast - Storage component for RDBMS requiring explicit placeholder typing

=head1 SYNOPSIS

  $schema->storage->auto_cast(1);

=head1 DESCRIPTION

In some combinations of RDBMS and DBD drivers (e.g. FreeTDS and Sybase)
statements with values bound to columns or conditions that are not strings will
throw implicit type conversion errors.

As long as a column L<data_type|DBIx::Class::ResultSource/add_columns> is
defined and resolves to a base RDBMS native type via L</_native_data_type> as
defined in your Storage driver, the placeholder for this column will be
converted to:

  CAST(? as $mapped_type)

This option can also be enabled in
L<connect_info|DBIx::Class::Storage::DBI/connect_info> as:

  on_connect_call => ['set_auto_cast']

=head2 connect_call_set_auto_cast

Executes:

  $schema->storage->auto_cast(1);

on connection.

Used as:

    on_connect_call => ['set_auto_cast']

in L<connect_info|DBIx::Class::Storage::DBI/connect_info>.

=head1 INHERITED METHODS

=over 4

=item L<DBIx::Class::Storage::DBI>

L<auto_savepoint|DBIx::Class::Storage::DBI/auto_savepoint>, L<bind_attribute_by_data_type|DBIx::Class::Storage::DBI/bind_attribute_by_data_type>, L<build_datetime_parser|DBIx::Class::Storage::DBI/build_datetime_parser>, L<columns_info_for|DBIx::Class::Storage::DBI/columns_info_for>, L<connect_call_datetime_setup|DBIx::Class::Storage::DBI/connect_call_datetime_setup>, L<connect_call_do_sql|DBIx::Class::Storage::DBI/connect_call_do_sql>, L<connect_info|DBIx::Class::Storage::DBI/connect_info>, L<connected|DBIx::Class::Storage::DBI/connected>, L<create_ddl_dir|DBIx::Class::Storage::DBI/create_ddl_dir>, L<datetime_parser|DBIx::Class::Storage::DBI/datetime_parser>, L<datetime_parser_type|DBIx::Class::Storage::DBI/datetime_parser_type>, L<dbh|DBIx::Class::Storage::DBI/dbh>, L<dbh_do|DBIx::Class::Storage::DBI/dbh_do>, L<delete|DBIx::Class::Storage::DBI/delete>, L<deploy|DBIx::Class::Storage::DBI/deploy>, L<deployment_statements|DBIx::Class::Storage::DBI/deployment_statements>, L<disable_sth_caching|DBIx::Class::Storage::DBI/disable_sth_caching>, L<disconnect|DBIx::Class::Storage::DBI/disconnect>, L<disconnect_call_do_sql|DBIx::Class::Storage::DBI/disconnect_call_do_sql>, L<ensure_connected|DBIx::Class::Storage::DBI/ensure_connected>, L<get_dbms_capability|DBIx::Class::Storage::DBI/get_dbms_capability>, L<get_use_dbms_capability|DBIx::Class::Storage::DBI/get_use_dbms_capability>, L<insert|DBIx::Class::Storage::DBI/insert>, L<insert_bulk|DBIx::Class::Storage::DBI/insert_bulk>, L<is_datatype_numeric|DBIx::Class::Storage::DBI/is_datatype_numeric>, L<is_replicating|DBIx::Class::Storage::DBI/is_replicating>, L<lag_behind_master|DBIx::Class::Storage::DBI/lag_behind_master>, L<last_insert_id|DBIx::Class::Storage::DBI/last_insert_id>, L<new|DBIx::Class::Storage::DBI/new>, L<on_connect_call|DBIx::Class::Storage::DBI/on_connect_call>, L<on_connect_do|DBIx::Class::Storage::DBI/on_connect_do>, L<on_disconnect_call|DBIx::Class::Storage::DBI/on_disconnect_call>, L<on_disconnect_do|DBIx::Class::Storage::DBI/on_disconnect_do>, L<relname_to_table_alias|DBIx::Class::Storage::DBI/relname_to_table_alias>, L<select|DBIx::Class::Storage::DBI/select>, L<select_single|DBIx::Class::Storage::DBI/select_single>, L<set_dbms_capability|DBIx::Class::Storage::DBI/set_dbms_capability>, L<set_use_dbms_capability|DBIx::Class::Storage::DBI/set_use_dbms_capability>, L<source_bind_attributes|DBIx::Class::Storage::DBI/source_bind_attributes>, L<sql_limit_dialect|DBIx::Class::Storage::DBI/sql_limit_dialect>, L<sql_maker|DBIx::Class::Storage::DBI/sql_maker>, L<sql_maker_class|DBIx::Class::Storage::DBI/sql_maker_class>, L<sql_name_sep|DBIx::Class::Storage::DBI/sql_name_sep>, L<sql_quote_char|DBIx::Class::Storage::DBI/sql_quote_char>, L<sqlt_type|DBIx::Class::Storage::DBI/sqlt_type>, L<sth|DBIx::Class::Storage::DBI/sth>, L<svp_begin|DBIx::Class::Storage::DBI/svp_begin>, L<svp_release|DBIx::Class::Storage::DBI/svp_release>, L<svp_rollback|DBIx::Class::Storage::DBI/svp_rollback>, L<txn_begin|DBIx::Class::Storage::DBI/txn_begin>, L<txn_commit|DBIx::Class::Storage::DBI/txn_commit>, L<txn_do|DBIx::Class::Storage::DBI/txn_do>, L<txn_rollback|DBIx::Class::Storage::DBI/txn_rollback>, L<unsafe|DBIx::Class::Storage::DBI/unsafe>, L<update|DBIx::Class::Storage::DBI/update>, L<with_deferred_fk_checks|DBIx::Class::Storage::DBI/with_deferred_fk_checks>

=item L<DBIx::Class::Storage>

L<cursor|DBIx::Class::Storage/cursor>, L<cursor_class|DBIx::Class::Storage/cursor_class>, L<debug|DBIx::Class::Storage/debug>, L<debugcb|DBIx::Class::Storage/debugcb>, L<debugfh|DBIx::Class::Storage/debugfh>, L<debugobj|DBIx::Class::Storage/debugobj>, L<savepoints|DBIx::Class::Storage/savepoints>, L<schema|DBIx::Class::Storage/schema>, L<set_schema|DBIx::Class::Storage/set_schema>, L<throw_exception|DBIx::Class::Storage/throw_exception>, L<transaction_depth|DBIx::Class::Storage/transaction_depth>, L<txn_scope_guard|DBIx::Class::Storage/txn_scope_guard>

=back

=head1 AUTHOR

See L<DBIx::Class/CONTRIBUTORS>

=head1 LICENSE

You may distribute this code under the same terms as Perl itself.

