SQL::Translator::Filter::Names man page on Fedora

Man page or keyword search:  
man Server   31170 pages
apropos Keyword Search (all sections)
Output format
Fedora logo
[printable version]

SQL::Translator::FilteUseraContributed Perl DSQL::Translator::Filter::Names(3)

NAME
       SQL::Translator::Filter::Names - Tweak the names of schema objects.

SYNOPSIS
	 #! /usr/bin/perl -w
	 use SQL::Translator;

	 # Lowercase all table names and upper case the first letter of all field
	 # names. (MySql style!)
	 #
	 my $sqlt = SQL::Translator->new(
	     filename => \@ARGV,
	     from     => 'MySQL',
	     to	      => 'MySQL',
	     filters => [
	       Names => {
		   'tables' => 'lc',
		   'fields' => 'ucfirst',
	       },
	     ],
	 ) || die "SQLFairy error : ".SQL::Translator->error;
	 print($sqlt->translate) || die "SQLFairy error : ".$sqlt->error;

DESCRIPTION
SEE ALSO
       perl(1), SQL::Translator

BUGS
TODO
       Name Groups
	   Define a bunch of useful groups to run the name filters over. e.g.
	   all, fkeys, pkeys etc.

       More Functions
	   e.g. camelcase, titlecase, single word etc.	Also a way to pass in
	   a regexp.

	   May also want a way to pass in arguments for the func e.g. prefix.

       Multiple Filters on the same name (filter order)?
	   Do we actually need this, you could just run lots of filters. Would
	   make adding func args to the interface easier.

	       filters => [
		   [ 'Names', { all => 'lc' } ],
		   [ 'Names', {
		       tables => 'lc',
		       fields => 'ucfirst',
		   } ],
	       ],

	   Mind you if you could give the filter a list this wouldn't be a
	   problem!

	       filters => [
		   [ 'Names',
		       all    => 'lc'
		       fields => 'ucfirst',
		   ],
	       ],

	   Which is nice. Might have to change the calling conventions for
	   filters.  Would also provide an order to run the filters in rather
	   than having to hard code it into the filter it's self.

AUTHOR
perl v5.14.2			  2011-05-04 SQL::Translator::Filter::Names(3)
[top]

List of man pages available for Fedora

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net