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

DBIx::Class::Storage::DBI::UniqueIdentifier - Storage component for RDBMSes supporting GUID types

DESCRIPTION

This is a storage component for databases that support GUID types such as uniqueidentifier, uniqueidentifierstr or guid.

GUIDs are generated automatically for PK columns with a supported data_type, as well as non-PK with auto_nextval set.

METHODS

new_guid

The composing class must set new_guid to the method used to generate a new GUID. It can also set it to undef, in which case the user is required to set it, or a runtime error will be thrown. It can be:

string

In which case it is used as the name of database function to create a new GUID,

coderef

In which case the coderef should return a string GUID, using Data::GUID, or whatever GUID generation method you prefer. It is passed the $self DBIx::Class::Storage reference as a parameter.

For example:

  $schema->storage->new_guid(sub { Data::GUID->new->as_string });

INHERITED METHODS

DBIx::Class::Storage::DBI

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

DBIx::Class::Storage

cursor, cursor_class, debug, debugcb, debugfh, debugobj, savepoints, schema, set_schema, throw_exception, transaction_depth, txn_scope_guard

AUTHOR

See "AUTHOR" in DBIx::Class and "CONTRIBUTORS" in DBIx::Class.

LICENSE

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