Class get_mapped_tables
source code
Convenience class to retrieve all the tables mapped to a coinc_event_id.
If added as an aggregate function to a connection, this can be called
in a query. Example:
from pylal import ligolw_sqlutils as sqlutils
connection.create_aggregate('get_mapped_tables', 1, sqlutils.get_mapped_tables)
sqlquery = '''
SELECT
coinc_event_id,
get_mapped_tables(table_name)
FROM
coinc_event_map
GROUP BY
coinc_event_id
'''
connection.cursor().execute(sqlquery)
This would return all the tables mapped to each coinc_event_id
in the coinc_event_map table.