XSDSQL

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

Test with other databases:
if you want a complete tests with one or more databases the steps are:
  install the DBD driver of the appropriate database
  set the enviroment variable XSDSQL_<dbname> with <dbname>::= DBM|ORA|PG|MYSQL and export it
  exec testall.pl in t directory 
  
  
  this examples are for the bash shell:
  
  postgres: export XSDSQL_PG='sql::pg:myuser/mypwd@mydb:127.0.0.1:5432;RaiseError => 1,AutoCommit => 0,pg_enable_utf8 => 1'
  mysql:    export XSDSQL_MYSQL='sql::mysql:myuser/mypwd@mydb:127.0.0.1:3306;RaiseError => 1,AutoCommit => 0,mysql_enable_utf8 => 1'
  dbm:      export XSDSQL_DBM='sql::DBM:dbm_mldbm=Storable;RaiseError => 1,f_dir=> q(/tmp)'
  oracle:   export XSDSQL_ORA='sql::oracle:myuser/mypwd@orcl:127.0.0.1:1522;RaiseError => 1,AutoCommit => 0'
            export NLS_LANG='AMERICAN_AMERICA.AL32UTF8' # set the utf8 on the client

  WARNING: the databases must support utf8 
  
  
  The format of connection string is:
   [<output_namespace>::]<dbtype>:<user>/<password>@<dbname>[:hostname[:port]][;<attribute>[,<attribute>...]]
   

bin/xml_repo.pl  view on Meta::CPAN

		otherwise is an error
		the form is  [<output_namespace>::]<dbtype>:<user>/<password>@<dbname>[:hostname[:port]][;<attribute>[,<attribute>...]
		<output_namespace>::<dbtype> - see the output of namespaces command 
			the default for <output_namespace> is 'sql'
		<dbname> - database name 
		<hostname> - remote host name or ip address 
		<port> - remote host port
		<attribute> - extra attribute
		Examples: 
			sql::pg:user/pwd@mydb:127.0.0.1;RaiseError => 1,AutoCommit => 0,pg_enable_utf8 => 1
			sql::mysql:user/pwd@mydb:127.0.0.1;RaiseError => 1,AutoCommit => 0,mysql_enable_utf8 => 1
			sql::oracle:user/pwd@orcl:neutrino:1522;RaiseError => 1,AutoCommit => 0
			sql::DBM:dbm_mldbm=Storable;RaiseError => 1,f_dir=> q(/tmp)
	-t <c|r> - issue a commit or rollback at the end  (default commit)
	-i ignore errors (return 0 if exists errors)
)
		,COMMON_OPTIONS1 => 'hdc:t:i' 
		,	HELP_ORDER	=> [qw(
						instruction
						namespaces 
						catalog_names 

bin/xsd2sql.pl  view on Meta::CPAN

			otherwise is an error
			the form is  [<output_namespace>::]<dbtype>:<user>/<password>@<dbname>[:hostname[:port]][;<attribute>[,<attribute>...]
			<output_namespace>::<dbtype> - see the output of namespaces command 
				the default for <output_namespace> is 'sql'
			<dbname> - database name 
			<hostname> - remote host name or ip address 
			<port> - remote host port
			<attribute> - extra attribute
			Examples: 
				sql::pg:user/pwd@mydb:127.0.0.1;RaiseError => 1,AutoCommit => 0,pg_enable_utf8 => 1
				sql::mysql:user/pwd@mydb:127.0.0.1;RaiseError => 1,AutoCommit => 0,mysql_enable_utf8 => 1
				sql::oracle:user/pwd@orcl:neutrino:1522;RaiseError => 1,AutoCommit => 0
			
        -r <root_table_name> - set the root table name  (default '".DEFAULT_ROOT_TABLE_NAME."')
        -p <table_prefix_name> - set the prefix for the tables name (default none)
        -v <view_prefix_name>  - set the prefix for views name (default '".DEFAULT_VIEW_PREFIX."')
                WARNING - This option can influence table names
        -t <table_name>|<path_name>[,<table_name>|<path_name>...] - generate view starting only from <table_name> (default all tables)
            if the first <table_name>|<path_name> begin with comma then <table_name>|<path_name> (without comma) is a file name containing a list of <table_name>|<path_name>
        -o <name>=<value>[,<name>=<value>...]
            set extra params - valid names are:

lib/blx/xsdsql/connection.pm  view on Meta::CPAN

             <attribute_name>[,<attribute_name>...]

=head1 connection string examples:

=head2 postgres

    'sql::pg:myuser/mypwd@mydb:127.0.0.1:5432;RaiseError => 1,AutoCommit => 0,pg_enable_utf8 => 1'

=head2 mysql

    'sql::mysql:myuser/mypwd@mydb:127.0.0.1:3306;RaiseError => 1,AutoCommit => 0,mysql_enable_utf8 => 1'

=head2 dbm

    'sql::DBM:dbm_mldbm=Storable;RaiseError => 1,f_dir=> q(/tmp)'

=head2 oracle

    'sql::oracle:myuser/mypwd@orcl:127.0.0.1:1522;RaiseError => 1,AutoCommit => 0'

=head1 BUGS

t/test.pl  view on Meta::CPAN

        otherwise is an error
        the form is  [<output_namespace>::]<dbtype>:<user>/<password>@<dbname>[:hostname[:port]][;<attribute>[,<attribute>...]]
        <output_namespace>::<dbtype> - see the output with 'a' option set 
            the default for <output_namespace> is 'sql'
        <dbname> - database name 
        <hostname> - remote host name or ip address 
        <port> - remote host port
        <attribute> - extra attribute
        Examples: 
            sql::pg:user/pwd@mydb:127.0.0.1;RaiseError => 1,AutoCommit => 0,pg_enable_utf8 => 1
            sql::mysql:user/pwd@mydb:127.0.0.1;RaiseError => 1,AutoCommit => 0,mysql_enable_utf8 => 1
            sql::oracle:user/pwd@orcl:neutrino:1522;RaiseError => 1,AutoCommit => 0
            sql::DBM:dbm_mldbm=Storable;RaiseError => 1,f_dir=> q(/tmp) 
    -d  - debug mode
    -f   <filename>[,<filename>...] - include in test only file match <filename>
    -i  - incremental test
    -n  - continue after xml difference
    -t  <c|r|C|R> - transaction database mode ((c)ommit for single test, (r)ollback for single test,(C)ommit global,(R)ollback global) - default c
    -s  - stop on first error
    -v  <command> - use <command> for xml validation
            use %f for xml file tag and %s for schema (xsd) file tag



( run in 0.335 second using v1.01-cache-2.11-cpan-00829025b61 )