UR::Da...:Table(3pm)

πŸ“¦
version 0.470 Β· 2 versions
, in debian bookworm, ubuntu jammy, ubuntu noble

πŸ’– UR::DataSource::Meta::RDBMS::Table πŸ’–

okay bestie, so this page is from the User Contributed Perl Documentation, and the class we're stanning today is UR::DataSource::Meta::RDBMS::Table β€” literally the object-oriented class for RDBMS table objects. yes. a class. for tables. iconic behavior fr fr. πŸŽ€


✨ NAME ✨

UR::DataSource::Meta::RDBMS::Table β€” Object-oriented class for RDBMS table objects. πŸ¦‹


🌸 SYNOPSIS 🌸

$t = UR::DataSource::Meta::RDBMS::Table->get(
                    data_source => 'Namespace::DataSource::Name',
                    table_name => 'MY_TABLE_NAME');
@c = $t->column_names;
@f = $t->fk_constraint_names;

like. look at her go. πŸ’…


πŸ’œ DESCRIPTION πŸ’œ

Objects of this class represent a table in a database. no cap, that's the whole vibe β€” one object, one table. 🫢

They are primarily used by the class updating logic in the command line tool ur update classes, but can be retrieved and used in any application. so like, they're the main character of ur update classes but they're not gatekeeping β€” you can pull them into whatever app you want. ✨

Their instances come from from the MetaDB (UR::DataSource::Meta) which is partitioned and has one physical database per Namespace. yes, "from from" β€” that's what the original says and I'm not about to edit the queen's grammar. 😭 one physical database per Namespace, periodt.


@col_objs = $t->columns();
@col_names = $t->column_names();
@fk_objs = $t->fk_constraints();
@fk_names = $t->fk_constraint_names();
@ref_fk_objs = $t->ref_fk_constraints();
@ref_fk_names = $t->ref_fk_constraint_names();
@pk_objs = $t->primary_key_constraint_columns();
@pk_col_names = $t->primary_key_constraint_column_names();
@bi_objs = $t->bitmap_indexes();
@bi_names = $t->bitmap_index_names();

Return related metadata objects (or names) for the given table object. that's it, that's the tea β€” call one, get back the objects, call the _names twin, get back the names. both slay. 🌈


lowkey reminder: every method up there is written exactly as it appears, so copy-paste freely and don't be out here renaming things. πŸ™ˆ

and that's the whole page bestie!! this was perl v5.32.1, dated 2022-01-17, from the UR::Da...:Table(3pm) manual page. go forth and query your metadata, you absolute legend. πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ‘‘β­πŸ“

πŸ“¦ where this page comes from