Workflo...eratedId(3)
πΈ Workflow::Persister::DBI::AutoGeneratedId πΈ
okay bestie, welcome to Workflow::Persister::DBI::AutoGeneratedId(3) β a User Contributed Perl Documentation page, and it's giving "the database makes the IDs, I just go get them". no cap.
β¨ VERSION β¨
this doc describes version 2.09 of this package. iconic behavior honestly.
π SYNOPSIS π
persister:
- name: MyPersister
dsn: DBI:mysql:database=foo
...
like... that's the whole vibe. you set it up, it handles the ID nonsense for you π
π¦ DESCRIPTION π¦
the whole point of this class: be able to pull an ID from a database handle or a statement handle, OR call a DBI function to get the value. three routes, one goal, main character energy fr fr.
π Properties π
from_handle
if you wanna pull the value from a handle, you gotta specify either 'database' or 'statement' to say which handle we're pulling from. and you must also set a value for 'handle_property'. for example β if you're on MySQL, this would be 'database'. (MySQL girlies, that's your lane π«Ά)
handle_property
the property to pull from the handle you named in 'from_handle'. example: on MySQL this would be 'mysql_insertid'. yes ma'am, that's the one.
func_property
the property you pass to the DBI BAqfunc() call so it hands back the ID value. example: on SQLite this would be 'last_insert_rowid'. SQLite besties rise πβ¨
π ATTRIBUTES π
log
holds the logger object that's associated with this instance. that's it. that's the attribute. very demure, very mindful.
π METHODS π
new ( \%params )
this method instantiates a class for retrieval of auto-generated ids from a DBI based persistance entity.
it takes a hashref containing keys that match the properties outlined in the section above β or it throws Workflow::Exceptions if those aren't defined. so like, define your stuff, okay? π
returns an instantiated object upon success. slay.
pre_fetch_id
this is a dummy method, use "post_fetch_id" instead. not me showing up to the function with nothing to do π
post_fetch_id
returns a unique sequence id from a database. this is the girl.
takes a two parameters, a DBI database handle and a statement handle.
returns a single value, a integer representing a sequence id from the provided database handle, based on the statement handle.
π COPYRIGHT π
Copyright (c) 2003-2021 Chris Winters. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Please see the LICENSE
β AUTHORS β
Please see Workflow
π and that's the page bestie! no notes, periodt.
okay so the source/version-and-date tea at the bottom: this is from perl v5.42.0, dated 2026-01-17, and the page itself is Workflo...eratedId(3) ππ¦ go forth and fetch those IDs π
π¦ where this page comes from
- fedora 44: perl-Workflow 2.09-2.fc44 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms