NAME

String::SQLColumnName

DESCRIPTION

ABSTRACT: Fix strings into valid SQL column names

REQUIRES

String::CamelCase

Lingua::EN::Numbers

FUNCTIONS

sql_column_names

sql_column_names(@column_name_input)

Returns SQL-compatible and unique column names from a series of strings.

fix_name, fix_names

fix_name();
fix_names();

Combine fix_number(), fix_ordinal(), fix_reserved() and fix_chars()

fix_chars

fix_chars();

Eliminates invalid characters from column name

fix_number

fix_number('12 months');        # twelve_months
fix_number('52 weeks total');   # fifty_two_weeks_total

Eliminates starting numbers from string by traslating them to text

fix_ordinal

fix_ordinal('1st_date');        # first_date

Fixes ordinals in the string

fix_reserved

fix_reserved('group');         # group_

Adds an underscore to column whose name is a reserved word.