1DBIx::Class::Storage::DUBsIe:r:UCnoinqtureiDIbBduIetxne:td:iCfPlieaersrls(:3D:)oSctuomreangtea:t:iDoBnI::UniqueIdentifier(3)
2
3
4

NAME

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

DESCRIPTION

10       This is a storage component for databases that support GUID types such
11       as "uniqueidentifier", "uniqueidentifierstr" or "guid".
12
13       GUIDs are generated automatically for PK columns with a supported
14       data_type, as well as non-PK with auto_nextval set.
15

METHODS

17   new_guid
18       The composing class must set "new_guid" to the method used to generate
19       a new GUID. It can also set it to "undef", in which case the user is
20       required to set it, or a runtime error will be thrown. It can be:
21
22       string
23           In which case it is used as the name of database function to create
24           a new GUID,
25
26       coderef
27           In which case the coderef should return a string GUID, using
28           Data::GUID, or whatever GUID generation method you prefer. It is
29           passed the $self DBIx::Class::Storage reference as a parameter.
30
31       For example:
32
33         $schema->storage->new_guid(sub { Data::GUID->new->as_string });
34

FURTHER QUESTIONS?

36       Check the list of additional DBIC resources.
37
39       This module is free software copyright by the DBIx::Class (DBIC)
40       authors. You can redistribute it and/or modify it under the same terms
41       as the DBIx::Class library.
42
43
44
45perl v5.38.0                    DB2I0x2:3:-C0l7a-s2s0::Storage::DBI::UniqueIdentifier(3)
Impressum