SQL::Tr...::Oracle(3)
π NAME π
okay bestie, welcome to the SQL::Tr...::Oracle(3) page from the User Contributed Perl Documentation! This one is short and iconic: SQL::Translator::Parser::Oracle is, lowkey, a parser for Oracle. That's the name, that's the vibe, no cap. β¨
β¨ SYNOPSIS β¨
Here's how you summon it:
use SQL::Translator;
use SQL::Translator::Parser::Oracle;
my $translator = SQL::Translator->new;
$translator->parser("SQL::Translator::Parser::Oracle");
That's the whole ritual, bestie. π«Ά
πΈ DESCRIPTION πΈ
Straight from http://www.ss64.com/ora/table_c.html β yes, the source link is right there β here's the big CREATE TABLE grammar, and it's giving main character energy:
CREATE [GLOBAL TEMPORARY] TABLE [schema.]table (tbl_defs,...)
[ON COMMIT {DELETE|PRESERVE} ROWS]
[storage_options | CLUSTER cluster_name (col1, col2,... )
| ORGANIZATION {HEAP [storage_options]
| INDEX idx_organized_tbl_clause}]
[LOB_storage_clause][varray_clause][nested_storage_clause]
partitioning_options
[[NO]CACHE] [[NO]MONITORING] [PARALLEL parallel_clause]
[ENABLE enable_clause | DISABLE disable_clause]
[AS subquery]
Then the tbl_defs chunk goes like:
tbl_defs:
column datatype [DEFAULT expr] [column_constraint(s)]
table_ref_constraint
The storage_options block is next, and it's kind of a whole menu:
storage_options:
PCTFREE int
PCTUSED int
INITTRANS int
MAXTRANS int
STORAGE storage_clause
TABLESPACE tablespace
[LOGGING|NOLOGGING]
idx_organized_tbl_clause is where it gets extra:
idx_organized_tbl_clause:
storage_option(s) [PCTTHRESHOLD int]
[COMPRESS int|NOCOMPRESS]
[ [INCLUDING column_name] OVERFLOW [storage_option(s)] ]
nested_storage_clause is serving this:
nested_storage_clause:
NESTED TABLE nested_item STORE AS storage_table
[RETURN AS {LOCATOR|VALUE} ]
And partitioning_options is short but slay:
partitioning_options:
Partition_clause {ENABLE|DISABLE} ROW MOVEMENT
Column constraints live over at http://www.ss64.com/ora/clause_constraint_col.html, and they look like this:
CONSTRAINT constrnt_name {UNIQUE|PRIMARY KEY} constrnt_state
CONSTRAINT constrnt_name CHECK(condition) constrnt_state
CONSTRAINT constrnt_name [NOT] NULL constrnt_state
CONSTRAINT constrnt_name REFERENCES [schema.]table[(column)]
[ON DELETE {CASCADE|SET NULL}] constrnt_state
Then constrnt_state is the little tail that keeps the whole thing cute:
constrnt_state
[[NOT] DEFERRABLE] [INITIALLY {IMMEDIATE|DEFERRED}]
[RELY | NORELY] [USING INDEX using_index_clause]
[ENABLE|DISABLE] [VALIDATE|NOVALIDATE]
[EXCEPTIONS INTO [schema.]table]
β οΈ important caveat, bestie: probably not all of the above syntax is supported, but the grammar was altered to better handle the syntax created by DDL::Oracle. So yeah β the page itself says probably not all of it is supported. Don't come for me if your wildest Oracle DDL doesn't parse. π
π«Ά AUTHOR π«Ά
Written by Ken Youens-Clark <kclark@cpan.org>. β shoutout to the author, fr fr. π
π¦ SEE ALSO π¦
Go check out these icons too: SQL::Translator, Parse::RecDescent, and DDL::Oracle. Periodt. π
That's the whole page, bestie! This little manual is SQL::Tr...::Oracle(3), from perl v5.42.0, dated 2024-12-12, and that's the cute sign-off. mwah πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-SQL-Translator 1.660.0-bp160.1.11 Β· (Artistic-1.0 OR GPL-1.0-or-later) AND GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms