constants library
Global constants for the Query Analyzer package.
Constants
-
kAggregateFunctions
→ const List<
String> - SQL aggregate functions tracked for expensive computation detection.
- kDefaultMaxStoredQueries → const int
- Default number of recent queries kept in memory.
- kDefaultSlowQueryThresholdMs → const int
- Default threshold (ms) above which a query is considered slow.
- kEmailPattern → const String
- Regex that matches email addresses for PII masking.
-
kFullScanKeywords
→ const List<
String> - SQL keywords that hint at a full-table scan when no WHERE clause is present.
- kIpv4Pattern → const String
- Regex that matches IPv4 addresses for PII masking.
- kLargeResultRowThreshold → const int
- Default row-count threshold to flag a "large result set".
- kLocalMetricsDbName → const String
- SQLite local metrics database name.
- kLogTag → const String
- Log tag used throughout the package.
- kMaxSubqueryDepth → const int
- Default maximum depth for sub-query nesting checks.
- kMetricsRetentionDays → const int
- Maximum age (days) of stored metrics before auto-pruning.
- kMetricsTableName → const String
- Metrics table name in local SQLite.
- kNPlusOneMinCount → const int
- Minimum number of similar queries within the window to flag N+1.
- kNPlusOneWindowMs → const int
- Default time window (minutes) used in N+1 detection.
- kNumLiteralPattern → const String
- Regex that matches SQL numeric literals.
- kPackageVersion → const String
- Current package version.
- kStrLiteralPattern → const String
- Regex that matches SQL string literals (single-quoted).
-
kTrackedPercentiles
→ const List<
int> - Percentiles calculated for execution-time distribution.
- kWebhookTimeoutSeconds → const int
- HTTP timeout (seconds) for webhook alert delivery.