GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  WORKFLOW::PERSISTER::DBI::AUTOGENERATEDID (3)

.ds Aq ’

NAME

Workflow::Persister::DBI::AutoGeneratedId - Pull IDs from databases that autogenerate them

CONTENTS

VERSION

This documentation describes version 1.06 of this package

SYNOPSIS



 <persister name="MyPersister"
            dsn="DBI:mysql:database=foo"
            ...



DESCRIPTION

Be able to pull an ID from a database or statement handle, or call a DBI function to get the value.

    Properties

<B>from_handleB>

If you want to pull the value from a handle specify either ’database’ or ’statement’ to specify what handle to pull it from. You must also specify a value for ’handle_property’. For example, if you are using MySQL this would be ’database’.

<B>handle_propertyB>

Property to pull from handle specified in ’from_handle’. For example, if you are using MySQL this would be ’mysql_insertid’.

<B>func_propertyB>

Property to pass to the DBI func()’ call to return the ID value. For example, if you are using SQLite this would be ’last_insert_rowid’.

    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 matching the properties outlines in the section above or throws Workflow::Exceptions if these are not defined.

Returns instantiated object upon success.

pre_fetch_id

This is a dummy method, use post_fetch_id

post_fetch_id

Returns a unique sequence id from a database.

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-2007 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.

AUTHORS

Jonas B. Nielsen (jonasbn) <jonasbn@cpan.org> is the current maintainer.

Chris Winters <chris@cwinters.com>, original author.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 WORKFLOW::PERSISTER::DBI::AUTOGENERATEDID (3) 2016-04-03

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.