SqlTableSelectionTrait
trait SqlTableSelectionTrait (View source)
Note: when using this trait, also implement ConfigAwareInterface/ConfigAwareTrait.
Methods
Given a list of all tables, expand the convert the wildcards in the option-provided lists into a list of actual table names.
Given the table names in the input array that may contain wildcards (*
),
expand the table names so that the array returned only contains table names
that exist in the database.
Expand wildcard tables.
Filters tables.
Construct an array that places table names in appropriate buckets based on whether the table is to be skipped, included for structure only, or have structure and data dumped.
Consult the specified options and return the list of tables specified.
Details
array
getExpandedTableSelection(array $options, array $all_tables)
Given a list of all tables, expand the convert the wildcards in the option-provided lists into a list of actual table names.
array
expandAndFilterTables(array $tables, array $db_tables)
Given the table names in the input array that may contain wildcards (*
),
expand the table names so that the array returned only contains table names
that exist in the database.
array
expandWildcardTables(array $tables, array $db_tables)
Expand wildcard tables.
array
filterTables(array $tables, array $db_tables)
Filters tables.
array
getTableSelection(array $options)
Construct an array that places table names in appropriate buckets based on whether the table is to be skipped, included for structure only, or have structure and data dumped.
The keys of the array are:
- skip: tables to be skipped completed in the dump
- structure: tables to only have their structure i.e. DDL dumped
- tables: tables to have structure and data dumped
array
getRawTableList(string $option_name, array $options)
Consult the specified options and return the list of tables specified.