#include <TableFilter.hpp>
|
| bool | Matches (std::string_view schema, std::string_view tableName) const |
| |
| bool | MatchesAll () const noexcept |
| | Returns true if the filter matches all tables (no filtering applied).
|
| |
| size_t | PatternCount () const noexcept |
| | Returns the number of patterns in this filter.
|
| |
Filters tables by name patterns with glob-style wildcards.
Supports:
- Exact table names: "Users", "Products"
- Wildcard suffix: "User*" (matches UserAccounts, Users, etc.)
- Wildcard prefix: "*_log" (matches audit_log, error_log, etc.)
- Wildcard anywhere: "*audit*" (matches any table containing "audit")
- Single char wildcard: "User?" (matches Users, User1, etc.)
- Schema.table notation: "dbo.Users", "sales.*"
- Comma-separated patterns: "Users,Products,*_log"
Definition at line 29 of file TableFilter.hpp.
◆ Parse()
| static TableFilter Lightweight::SqlBackup::TableFilter::Parse |
( |
std::string_view |
filterSpec | ) |
|
|
static |
Parses a filter specification string.
- Parameters
-
| filterSpec | Comma-separated patterns like "table1,table2,foo*,schema.table" Empty string or "*" means match all tables. |
◆ Matches()
| bool Lightweight::SqlBackup::TableFilter::Matches |
( |
std::string_view |
schema, |
|
|
std::string_view |
tableName |
|
) |
| const |
Checks if a table matches any of the patterns.
- Parameters
-
| schema | The schema name (can be empty). |
| tableName | The table name. |
- Returns
- true if the table matches at least one pattern.
◆ MatchesAll()
| bool Lightweight::SqlBackup::TableFilter::MatchesAll |
( |
| ) |
const |
|
inlinenoexcept |
Returns true if the filter matches all tables (no filtering applied).
Definition at line 46 of file TableFilter.hpp.
◆ PatternCount()
| size_t Lightweight::SqlBackup::TableFilter::PatternCount |
( |
| ) |
const |
|
inlinenoexcept |
Returns the number of patterns in this filter.
Definition at line 49 of file TableFilter.hpp.
The documentation for this class was generated from the following file: