Skip to main content

Function Finder

Quick reference for all 57 Tabular functions.


All Functions by Module

Email Validation (3 functions)

FunctionPurposeSpeedReturns
anofox_email_validate(email, mode)Validate email syntax, DNS, or SMTP<1ms / ~100ms / ~500msBOOLEAN
anofox_email_extract_domain(email)Extract domain from email<1msVARCHAR
anofox_email_normalize(email)Normalize email (lowercase, trim)<1msVARCHAR

Example:

SELECT anofox_email_validate('john@example.com', 'dns');  -- Returns: true

Postal & Address (4 functions)

FunctionPurposeSpeedReturns
anofox_address_validate(address)Validate street address format~10msBOOLEAN
anofox_postal_code_validate(code, country)Validate postal code<1msBOOLEAN
anofox_address_get_state(address)Extract state/province<1msVARCHAR
anofox_address_get_city(address)Extract city<1msVARCHAR

Example:

SELECT anofox_postal_code_validate('90210', 'US');  -- Returns: true

Phone (9 functions)

FunctionPurposeSpeedReturns
anofox_phone_format(number, country)Format phone number~5msVARCHAR
anofox_phone_validate(number, country)Validate phone syntax~5msBOOLEAN
anofox_phone_get_country_code(number)Extract country code<1msVARCHAR
anofox_phone_get_area_code(number, country)Extract area code<1msVARCHAR
anofox_phone_is_mobile(number, country)Check if mobile~10msBOOLEAN
anofox_phone_get_carrier(number, country)Get carrier name~50msVARCHAR
anofox_phone_normalize(number)Normalize to E.164 format<1msVARCHAR
anofox_phone_is_valid_length(number, country)Check length only<1msBOOLEAN
anofox_phone_extract_digits(number)Extract digits only<1msVARCHAR

Example:

SELECT anofox_phone_format('+1-555-0123', 'US');  -- Returns: '+1 555 0123'

Money & Currency (17 functions)

Amounts & Validation (6):

FunctionPurposeSpeedReturns
anofox_money_is_positive(amount)Check if amount > 0<1msBOOLEAN
anofox_money_is_valid_amount(amount, min, max)Check if in range<1msBOOLEAN
anofox_money_normalize(amount, decimals)Normalize to N decimals<1msDECIMAL
anofox_money_format(amount, currency)Format as currency<1msVARCHAR
anofox_money_abs(amount)Absolute value<1msDECIMAL
anofox_money_round(amount, decimals)Round to N decimals<1msDECIMAL

Currency Info (5):

FunctionPurposeSpeedReturns
anofox_currency_is_valid(code)Validate ISO 4217 code<1msBOOLEAN
anofox_currency_get_name(code)Get currency name<1msVARCHAR
anofox_currency_get_symbol(code)Get currency symbol<1msVARCHAR
anofox_currency_get_decimals(code)Get decimal places<1msINTEGER
anofox_currency_is_crypto(code)Check if cryptocurrency<1msBOOLEAN

Conversion & Arithmetic (6):

FunctionPurposeSpeedReturns
anofox_currency_convert(amount, from_code, to_code)Convert currency~50msDECIMAL
anofox_money_add(a, b)Add amounts<1msDECIMAL
anofox_money_subtract(a, b)Subtract amounts<1msDECIMAL
anofox_money_multiply(amount, factor)Multiply<1msDECIMAL
anofox_money_divide(amount, divisor)Divide<1msDECIMAL
anofox_money_percentage(amount, percent)Calculate percentage<1msDECIMAL

Example:

SELECT anofox_currency_convert(100, 'USD', 'EUR');  -- Returns: ~92.50 (approximate)

VAT (10 functions)

FunctionPurposeSpeedReturns
anofox_vat_is_valid(vat_id)Validate VAT format<1msBOOLEAN
anofox_vat_get_country(vat_id)Extract country code<1msVARCHAR
anofox_vat_verify_eu(vat_id)Verify EU VIES registration~200msBOOLEAN
anofox_vat_get_company_name(vat_id)Get company name from VIES~200msVARCHAR
anofox_vat_format(vat_id)Format as country standard<1msVARCHAR
anofox_vat_has_valid_check_digit(vat_id)Validate check digit<1msBOOLEAN
anofox_vat_is_registered(vat_id)Check registration status~200msBOOLEAN
anofox_vat_get_address(vat_id)Get registered address~200msVARCHAR
anofox_vat_is_eu_member(country)Check if EU member<1msBOOLEAN
anofox_vat_get_standard_rate(country)Get standard VAT rate<1msDECIMAL

Example:

SELECT anofox_vat_is_valid('DE123456789');  -- Returns: true
SELECT anofox_vat_verify_eu('DE123456789'); -- Returns: true/false

Data Quality (7 functions)

FunctionPurposeSpeedReturns
anofox_metric_nullness(column)% of NULL valuesO(n)DECIMAL
anofox_metric_distinctness(column)% of unique valuesO(n)DECIMAL
anofox_metric_freshness(date_column)Days since updateO(n)DECIMAL
anofox_metric_volume(table_name)Row countO(1)INTEGER
anofox_metric_consistency(columns)Format consistency %O(n)DECIMAL
anofox_metric_schema_match(table1, table2)Schema compatibilityO(1)BOOLEAN
anofox_metric_row_count(table_name)Count rowsO(1)INTEGER

Example:

SELECT anofox_metric_nullness(email) FROM customers;  -- Returns: 2.5 (2.5% nulls)

Anomaly Detection (4 functions)

FunctionPurposeSpeedReturns
anofox_zscore_anomaly(value, threshold)Z-score outlierO(n)BOOLEAN
anofox_iqr_anomaly(value, multiplier)IQR outlierO(n log n)BOOLEAN
anofox_isolation_forest_anomaly(features, contamination)Multivariate outlierO(n log n)BOOLEAN
anofox_dbscan_anomaly(features, eps, min_pts)Density-based outlierO(n²)BOOLEAN

Example:

SELECT transaction_id, amount
FROM transactions
WHERE anofox_zscore_anomaly(amount, 3.0) OVER () = TRUE;

Data Operations (2 functions)

FunctionPurposeSpeedReturns
anofox_table_diff_hash(table1, table2)Hash-based diffO(n)TABLE
anofox_table_diff_join(table1, table2, keys)Join-based diffO(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

🍪 Cookie Settings