1Workflow::Persister::DBUIs:e:rAuCtoonGterniebruWatoteredkdfIPldeo(rw3l:):DPoecrusmiesntteart:i:oDnBI::AutoGeneratedId(3)
2
3
4
6 Workflow::Persister::DBI::AutoGeneratedId - Pull IDs from databases
7 that autogenerate them
8
10 This documentation describes version 1.51 of this package
11
13 <persister name="MyPersister"
14 dsn="DBI:mysql:database=foo"
15 ...
16
18 Be able to pull an ID from a database or statement handle, or call a
19 DBI function to get the value.
20
21 Properties
22 from_handle
23
24 If you want to pull the value from a handle specify either 'database'
25 or 'statement' to specify what handle to pull it from. You must also
26 specify a value for 'handle_property'. For example, if you are using
27 MySQL this would be 'database'.
28
29 handle_property
30
31 Property to pull from handle specified in 'from_handle'. For example,
32 if you are using MySQL this would be 'mysql_insertid'.
33
34 func_property
35
36 Property to pass to the DBI 'func()' call to return the ID value. For
37 example, if you are using SQLite this would be 'last_insert_rowid'.
38
39 METHODS
40 new ( \%params )
41
42 This method instantiates a class for retrieval of auto-generated ids
43 from a DBI based persistance entity.
44
45 It takes a hashref containing keys matching the properties outlines in
46 the section above or throws Workflow::Exceptions if these are not
47 defined.
48
49 Returns instantiated object upon success.
50
51 pre_fetch_id
52
53 This is a dummy method, use "post_fetch_id"
54
55 post_fetch_id
56
57 Returns a unique sequence id from a database.
58
59 Takes a two parameters, a DBI database handle and a statement handle
60
61 Returns a single value, a integer representing a sequence id from the
62 provided database handle, based on the statement handle.
63
65 Copyright (c) 2003-2021 Chris Winters. All rights reserved.
66
67 This library is free software; you can redistribute it and/or modify it
68 under the same terms as Perl itself.
69
70 Please see the LICENSE
71
73 Please see Workflow
74
75
76
77perl v5.32.1 2W0o2r1k-f0l1o-w3:1:Persister::DBI::AutoGeneratedId(3)