Function Finder
Quick reference for all 57 Tabular functions.
All Functions by Module
Email Validation (3 functions)
| Function | Purpose | Speed | Returns |
|---|---|---|---|
anofox_email_validate(email, mode) | Validate email syntax, DNS, or SMTP | <1ms / ~100ms / ~500ms | BOOLEAN |
anofox_email_extract_domain(email) | Extract domain from email | <1ms | VARCHAR |
anofox_email_normalize(email) | Normalize email (lowercase, trim) | <1ms | VARCHAR |
Example:
SELECT anofox_email_validate('john@example.com', 'dns'); -- Returns: true
Postal & Address (4 functions)
| Function | Purpose | Speed | Returns |
|---|---|---|---|
anofox_address_validate(address) | Validate street address format | ~10ms | BOOLEAN |
anofox_postal_code_validate(code, country) | Validate postal code | <1ms | BOOLEAN |
anofox_address_get_state(address) | Extract state/province | <1ms | VARCHAR |
anofox_address_get_city(address) | Extract city | <1ms | VARCHAR |
Example:
SELECT anofox_postal_code_validate('90210', 'US'); -- Returns: true
Phone (9 functions)
| Function | Purpose | Speed | Returns |
|---|---|---|---|
anofox_phone_format(number, country) | Format phone number | ~5ms | VARCHAR |
anofox_phone_validate(number, country) | Validate phone syntax | ~5ms | BOOLEAN |
anofox_phone_get_country_code(number) | Extract country code | <1ms | VARCHAR |
anofox_phone_get_area_code(number, country) | Extract area code | <1ms | VARCHAR |
anofox_phone_is_mobile(number, country) | Check if mobile | ~10ms | BOOLEAN |
anofox_phone_get_carrier(number, country) | Get carrier name | ~50ms | VARCHAR |
anofox_phone_normalize(number) | Normalize to E.164 format | <1ms | VARCHAR |
anofox_phone_is_valid_length(number, country) | Check length only | <1ms | BOOLEAN |
anofox_phone_extract_digits(number) | Extract digits only | <1ms | VARCHAR |
Example:
SELECT anofox_phone_format('+1-555-0123', 'US'); -- Returns: '+1 555 0123'
Money & Currency (17 functions)
Amounts & Validation (6):
| Function | Purpose | Speed | Returns |
|---|---|---|---|
anofox_money_is_positive(amount) | Check if amount > 0 | <1ms | BOOLEAN |
anofox_money_is_valid_amount(amount, min, max) | Check if in range | <1ms | BOOLEAN |
anofox_money_normalize(amount, decimals) | Normalize to N decimals | <1ms | DECIMAL |
anofox_money_format(amount, currency) | Format as currency | <1ms | VARCHAR |
anofox_money_abs(amount) | Absolute value | <1ms | DECIMAL |
anofox_money_round(amount, decimals) | Round to N decimals | <1ms | DECIMAL |
Currency Info (5):
| Function | Purpose | Speed | Returns |
|---|---|---|---|
anofox_currency_is_valid(code) | Validate ISO 4217 code | <1ms | BOOLEAN |
anofox_currency_get_name(code) | Get currency name | <1ms | VARCHAR |
anofox_currency_get_symbol(code) | Get currency symbol | <1ms | VARCHAR |
anofox_currency_get_decimals(code) | Get decimal places | <1ms | INTEGER |
anofox_currency_is_crypto(code) | Check if cryptocurrency | <1ms | BOOLEAN |
Conversion & Arithmetic (6):
| Function | Purpose | Speed | Returns |
|---|---|---|---|
anofox_currency_convert(amount, from_code, to_code) | Convert currency | ~50ms | DECIMAL |
anofox_money_add(a, b) | Add amounts | <1ms | DECIMAL |
anofox_money_subtract(a, b) | Subtract amounts | <1ms | DECIMAL |
anofox_money_multiply(amount, factor) | Multiply | <1ms | DECIMAL |
anofox_money_divide(amount, divisor) | Divide | <1ms | DECIMAL |
anofox_money_percentage(amount, percent) | Calculate percentage | <1ms | DECIMAL |
Example:
SELECT anofox_currency_convert(100, 'USD', 'EUR'); -- Returns: ~92.50 (approximate)
VAT (10 functions)
| Function | Purpose | Speed | Returns |
|---|---|---|---|
anofox_vat_is_valid(vat_id) | Validate VAT format | <1ms | BOOLEAN |
anofox_vat_get_country(vat_id) | Extract country code | <1ms | VARCHAR |
anofox_vat_verify_eu(vat_id) | Verify EU VIES registration | ~200ms | BOOLEAN |
anofox_vat_get_company_name(vat_id) | Get company name from VIES | ~200ms | VARCHAR |
anofox_vat_format(vat_id) | Format as country standard | <1ms | VARCHAR |
anofox_vat_has_valid_check_digit(vat_id) | Validate check digit | <1ms | BOOLEAN |
anofox_vat_is_registered(vat_id) | Check registration status | ~200ms | BOOLEAN |
anofox_vat_get_address(vat_id) | Get registered address | ~200ms | VARCHAR |
anofox_vat_is_eu_member(country) | Check if EU member | <1ms | BOOLEAN |
anofox_vat_get_standard_rate(country) | Get standard VAT rate | <1ms | DECIMAL |
Example:
SELECT anofox_vat_is_valid('DE123456789'); -- Returns: true
SELECT anofox_vat_verify_eu('DE123456789'); -- Returns: true/false
Data Quality (7 functions)
| Function | Purpose | Speed | Returns |
|---|---|---|---|
anofox_metric_nullness(column) | % of NULL values | O(n) | DECIMAL |
anofox_metric_distinctness(column) | % of unique values | O(n) | DECIMAL |
anofox_metric_freshness(date_column) | Days since update | O(n) | DECIMAL |
anofox_metric_volume(table_name) | Row count | O(1) | INTEGER |
anofox_metric_consistency(columns) | Format consistency % | O(n) | DECIMAL |
anofox_metric_schema_match(table1, table2) | Schema compatibility | O(1) | BOOLEAN |
anofox_metric_row_count(table_name) | Count rows | O(1) | INTEGER |
Example:
SELECT anofox_metric_nullness(email) FROM customers; -- Returns: 2.5 (2.5% nulls)
Anomaly Detection (4 functions)
| Function | Purpose | Speed | Returns |
|---|---|---|---|
anofox_zscore_anomaly(value, threshold) | Z-score outlier | O(n) | BOOLEAN |
anofox_iqr_anomaly(value, multiplier) | IQR outlier | O(n log n) | BOOLEAN |
anofox_isolation_forest_anomaly(features, contamination) | Multivariate outlier | O(n log n) | BOOLEAN |
anofox_dbscan_anomaly(features, eps, min_pts) | Density-based outlier | O(n²) | BOOLEAN |
Example:
SELECT transaction_id, amount
FROM transactions
WHERE anofox_zscore_anomaly(amount, 3.0) OVER () = TRUE;
Data Operations (2 functions)
| Function | Purpose | Speed | Returns |
|---|---|---|---|
anofox_table_diff_hash(table1, table2) | Hash-based diff | O(n) | TABLE |
anofox_table_diff_join(table1, table2, keys) | Join-based diff | O(n log n) | TABLE |
Example:
SELECT * FROM anofox_table_diff_hash('customers_old', 'customers_new');
Quick Lookup by Use Case
Validating Customer Data
-- Email
anofox_email_validate(email, 'dns')
-- Phone
anofox_phone_format(phone, 'US')
-- Address
anofox_address_validate(address)
-- VAT (B2B)
anofox_vat_is_valid(vat_id)
-- Amount
anofox_money_is_positive(amount)
Data Quality Assessment
-- Completeness
anofox_metric_nullness(column)
-- Uniqueness
anofox_metric_distinctness(column)
-- Freshness
anofox_metric_freshness(date_column)
-- Volume
anofox_metric_volume(table_name)
Anomaly Detection
-- Single column, normal distribution
anofox_zscore_anomaly(value, 3.0)
-- Single column, any distribution
anofox_iqr_anomaly(value, 1.5)
-- Multiple columns
anofox_isolation_forest_anomaly(ARRAY[col1, col2], 0.05)
-- Density-based
anofox_dbscan_anomaly(ARRAY[col1, col2], 0.5, 10)
Currency Conversion
-- Check if valid currency
anofox_currency_is_valid('USD')
-- Convert between currencies
anofox_currency_convert(amount, 'USD', 'EUR')
-- Format as currency
anofox_money_format(amount, 'USD')
International Compliance
-- EU VAT
anofox_vat_verify_eu(vat_id)
-- Check if EU member
anofox_vat_is_eu_member('DE')
-- Get VAT rate
anofox_vat_get_standard_rate('FR')
Performance Tips
- Fast functions (<1ms): Regex, format, syntax checks
- Medium functions (~100ms): DNS, format validation
- Slow functions (~500ms): SMTP, carrier lookup
- Data-dependent (O(n)): Anomaly detection, metrics
- Parallelizable: All functions work on single columns
Next Steps
- Validation Functions — Email, phone, VAT, address APIs
- Financial Functions — Money and currency functions
- Quality Metrics — Data profiling functions