Data::...:Oracle(3pm)
π Data::...:Oracle(3pm) β like, the whole entire page π
okay bestie, so this is the <pink>User Contributed Perl Documentation</pink> page for Data::ObjectDriver::Driver::DBD::Oracle, and it's genuinely shorter than my attention span, so we're gonna get through it together. pull up a seat π«Ά
β¨ NAME β¨
Data::ObjectDriver::Driver::DBD::Oracle β the Oracle Driver for Data::ObjectDriver. that's it, that's the name, no notes π
πΈ DESCRIPTION πΈ
so listen β this module overrides methods of the Data::ObjectDriver::Driver::DBD module and swaps in an Oracle specific implementation. basically it takes the regular DBD driver and goes "no babe, we're doing it the Oracle way now." iconic behavior honestly π
π₯ NOTES π₯
okay this is the part you actually need, so pay attention bestie π
Oracle doesn't support auto-increment β like, at all, it's just not a thing it does, ngl. so before you use this feature, you need to create a sequence and a trigger to make it work. no cap, it's a two-step situation.
for example (fr fr, this is the actual example): say you want the field ID in table WINES to be auto-increment. then you create:
-- Create sequence
CREATE SEQUENCE WINES_ID_SEQ
MINVALUE 1
MAXVALUE 999999999999999999999999999
START WITH 1
INCREMENT BY 1
NOCACHE;
-- Create trigger
CREATE OR REPLACE TRIGGER WINES_ID_TR
BEFORE INSERT ON WINES
FOR EACH ROW
BEGIN
SELECT WINES_ID_SEQ.NEXTVAL INTO :NEW.ID FROM DUAL;
END;
the way that sequence has a MAXVALUE of 999999999999999999999999999β¦ she's got range π and NOCACHE because we're not about that cache life apparently. then the trigger swoops in BEFORE INSERT on WINES, FOR EACH ROW, and pulls WINES_ID_SEQ.NEXTVAL into :NEW.ID FROM DUAL. slay. that's the whole trick π§
π¦ LICENSE π¦
this module is free software β you may redistribute and/or modify it under the same terms as Perl itself. go off, do your thing π
π AUTHOR & COPYRIGHT π
this module is copyright (c) 2009 Xiaoou Wu <xiaoou.wu@oracle.com>. All rights reserved.
like, all of them. every single one π
okay and the little footer moment, since you asked: this page is from perl v5.42.0, dated 2024-10-24, and it's filed under Data::...:Oracle(3pm) because even the manpage header got tired and hit the ellipsis πβ¨ that's the whole page bestie, you ate that, periodt ππ
π¦ where this page comes from
- opensuse-leap 16.0: perl-Data-ObjectDriver 0.230.0-bp160.1.12 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms