gavo.rsc.metatable module

Handling table metadata in the dc.(table|column)meta tables.

This has been a mediocre plan, and it’s almost unused these days except to locate RDs for tables. Hence, we should tear this entire thing down and have the table->RD mapping stowed somewhere else.

Or at least give up on the extra connection and have the clients use base.getTableDefForTable(connection, tableName) directly.

class gavo.rsc.metatable.MetaTableHandler[source]

Bases: object

an interface to DaCHS meta tables.

This used to be a fairly complex interface to all sorts for DC-related metadata. These day, the only thing it does is figure out where table definitions reside and which are available for ADQL. This thing has been a bad idea all around.

Though you can construct MetaTableHandlers of your own, you should use base.caches.getMTH(None) when reading.

getTAPTables()[source]

returns a list of all names of tables accessible through TAP in this data center.

getTableDefForTable(tableName)[source]

returns a TableDef for tableName.

As it is not a priori clear which RD a given table lives in, this goes through dc.tablemeta to figure this out. The object comes from the actual RD, though, so this might very well trigger database action and RD loading.