Rafael Kitover [Fri, 28 Oct 2011 16:43:41 +0000]
better dynamic schema_base_class implementation
Remove the restriction that dynamic schemas can't define a connection
method by finding the next method to call in mro::get_linear_isa.
Rafael Kitover [Tue, 25 Oct 2011 20:56:48 +0000]
use connection hack only for schema_base_class
Use the horrible mro hack in ::Loader::connection only if
schema_base_class and/or schema_components were defined.
Add warnings to the POD for these options that dynamic schemas cannot
define a connection method.
Rafael Kitover [Tue, 25 Oct 2011 19:58:23 +0000]
bump String::ToIdentifier::EN dep to 0.05
0.04 has some horrible bugs, this is the first version that works
reasonably well.
Rafael Kitover [Tue, 25 Oct 2011 10:55:39 +0000]
implement schema_base_class for dynamic schemas
Implement schema_base_class and schema_components support for dynamic
schemas at 'connection' time.
Augment btilly's test to check that schema_components are also applied
at 'connection' time.
This requires a rather horrible hack in ::Loader::connection, because
mro cannot normally deal with a changing @ISA inside of a call chain,
but it works.
Ben Tilly [Sat, 9 Jul 2011 19:24:57 +0000]
test for connecting through schema_base_class
Add test for applying schema_base_class to dynamic schemas at
'connection' time.
Rafael Kitover [Tue, 25 Oct 2011 11:12:42 +0000]
update DBIx::Class::Schema::Loader POD
Update list of supported DBDs and minimum necessary DBIx::Class version.
Remove the admonition that this module is for simple situations only.
Add link to ::Loader::Base for options.
Rafael Kitover [Mon, 24 Oct 2011 21:24:04 +0000]
add 'ALL' key for naming hash
Because I earlier added the 'force_ascii' parameter for the naming hash,
I now add the 'ALL' key to set 'relationships', 'monikers' and
'column_accessors' in one shot. This lets you do:
naming => { ALL => 'v8', force_ascii => 1 }
Rafael Kitover [Sun, 23 Oct 2011 01:39:35 +0000]
fully implement naming=v8 and force_ascii
Use String::ToIdentifier::EN or ::Unicode on column accessors and
relationship accessors as well as monikers, for the experimental v8
naming mode.
Rafael Kitover [Fri, 21 Oct 2011 16:59:17 +0000]
update comment table support for multi-db_schema
Update the POD related to the table_comments and column_comments tables
to note that these tables must be in the same database and schema as the
tables they are describing.
Add a clone method to ::DBObject and use it to find the comment tables,
changing just the table name to table_comments_table or
column_comments_table.
Rafael Kitover [Wed, 7 Jul 2010 23:19:07 +0000]
better rel postfix stripping for v8 mode
Change the _id stripping in ::RelBuilder to strip other things as well,
like Id, ref, cd, code, _num.
This is only activated for the experimental { naming => 'v8' } mode.
Rafael Kitover [Thu, 20 Oct 2011 11:08:40 +0000]
fix no table warnings for MS Access over DBD::ADO
The _table_comment and _column_comment methods in ::DBI do queries on
the 'table_comments' and 'column_comments' tables for getting
table/column comments in databases which do not support them natively
(or well.) These tables usually do not exist.
DBD::ADO throws a warning from Win32::OLE when it encounters a query on
a table that does not exist. Here we trap and ignore those warnings for
the comments tables.
Rafael Kitover [Wed, 28 Sep 2011 16:28:05 +0000]
fix some issues with multi-db_schema support
Fix unique constraint detection for Oracle in multischema setups
(RT#70851) previously identically named tables in different schemas with
an identically named unique constraint would cause the columns in the
constraint definition to be repeated. Modifies the multischema extra
tests for all databases to test for the correctness of the dumped unique
constraint.
Update Oracle multischema extra tests to include the complete set of
test cases used in multischema test sets for other databases.
Update Oracle is_auto_increment detection code to work in multischema
setups. The new logic is by necessity fuzzier, please report false
positives to RT. At some point this will get rewritten to use a PL/SQL
parser on the trigger code.
Add a test for the miscaching of table keys when there are identically
named tables in different schemas for all databases. This was fixed for
MySQL in master.
Completely rewrite the table monikerization code to work better with
moniker_parts, preserving the functionality of all naming versions.
Schema/database names are transformed to parts of the moniker name using
String::ToIdentifier::EN::Unicode (or String::ToIdentifier::EN if
naming => { force_ascii => 1 }
is set.) to translate non-identifier characters.
Add the next naming version, v8 as an experimental mode. In this mode,
the table names go through String::ToIdentifier::EN::Unicode as
well, instead of non-identifier characters being stripped out.
The clashing monikers error message is updated to mention moniker_parts
in multischema configurations.
The ::RelBuilder duplicate relationship name disambiguator has been
updated to handle the case of relationships in the same class pointing
to identically named tables in different schemas/databases.
Improve the multischema extra tests to include an identically named
table in both schemas and to use moniker_parts. This also reduces the
chances of moniker clashes on a tester's database.
Change the multidatabase tests to test both
db_schema => { db1 => '%', db2 => '%' }
and
db_schema => { '%' => '%' }
as well as to include an identically named table.
Rafael Kitover [Wed, 19 Oct 2011 20:58:43 +0000]
fix uninitialized warnings for Firebird
Check if the character_set_id for a column is NULL before comparing it
to a value to fix uninitialized warnings in the tests.
Rafael Kitover [Wed, 19 Oct 2011 20:52:06 +0000]
ignore type_info errors from DBD::Sybase+MSSQL
When testing multi-database schemas on MSSQL, a weird error comes up
from type_info_all in DBD::Sybase. This needs to be investigated
further, but for now the call to type_info in ::DBI is wrapped in a try.
Rafael Kitover [Wed, 19 Oct 2011 20:46:09 +0000]
remove placeholders from tab/col comments queries
Changes the use placeholders in ::DBI _table_comment and _column_comment
methods to inline $dbh->quote protected values.
This is for DBD::Sybase with ASE versions that do not support
placeholders and MSSQL connections with a low tds version.
At some point we'll have methods for doing queries that do the right
thing depending on what the driver/database supports.
Rafael Kitover [Wed, 19 Oct 2011 19:53:07 +0000]
update SQLAnywhere ODBC driver for default \"null"
Previously a fix was committed to support DEFAULT NULL in Pg, this
broke the SQLAnywhere ODBC driver tests, because ::DBI::SQLAnywhere had
a fixup for default_value => \"NULL", and it is now lowercased.
Only the ODBC driver sets nullable columns DEFAULT NULL, so this fixup
has been moved to ::DBI::ODBC::SQL_Anywhere, with the correct case.
All SQL Anywhere tests pass again.
Rafael Kitover [Thu, 13 Oct 2011 17:04:52 +0000]
add "use utf8;" at the top of all generated files
In preparation for supporting Unicode identifiers in the future, this
commit adds "use utf8;" to the top of all generated files, before the
"package ...;" statement.
Rafael Kitover [Thu, 13 Oct 2011 05:09:25 +0000]
add POD for using non-English databases
Adds POD describing the loader options to use to turn off inflection for
English.
Rafael Kitover [Wed, 12 Oct 2011 15:15:12 +0000]
use full table name for MySQL key cache
Primary/unique key cache now caches by $table->sql_name instead of
$table.
Failure to do so returned the wrong keys for the same table name in
multi-db_schema dumps.
Rafael Kitover [Wed, 12 Oct 2011 14:56:30 +0000]
match case of FK remote database in MySQL
Matches the remote database of a cross-database foreign key in MySQL to
the case of the database in SHOW DATABASES, if it's there and the user
has permissions to run SHOW DATABASES.
Rafael Kitover [Tue, 11 Oct 2011 17:33:22 +0000]
make MySQL FK handling more robust
Now handles FKs to schemas not listed in db_schema, and to tables that
don't exist at all.
Rafael Kitover [Wed, 10 Aug 2011 08:45:13 +0000]
minor fix for 5.8.1
sub {} returns the args it is passed on 5.8.1, so have to use
sub { return () } .
Rafael Kitover [Wed, 28 Sep 2011 19:31:02 +0000]
remove dependency on File::Slurp
The current version of File::Slurp has a "use 5.6.2;" statement. This
throws a warning on perl 5.10.0 which breaks some of our tests. The
statement should be "use 5.006002;".
My attempts to contact the author, Uri Guttman were not successful.
As we have our own convenience method 'slurp_file' in ::Utils now, there
is little need to depend on File::Slurp anymore anyway.
For these reasons the dependency has been removed.
Brian Phillips [Wed, 28 Sep 2011 16:21:25 +0000]
allow constraint/exclude options together
Rafael Kitover [Sat, 24 Sep 2011 19:28:04 +0000]
fix t/backcompat/0.04006 tests
The Oracle driver no longer lowercases table names from the catalog, and
these names are normalized to upper case. The main common tests alias
the lowercase table names for the monikers and classes hashes for this
case; this commit adds the same code to the t/backcompat/0.04006 common
tests (in lib/dbixcsl_common_tests.pm .)
Rafael Kitover [Sat, 24 Sep 2011 14:05:22 +0000]
fix preserve_case tests in common tests
Rescans with preserve_case option reset to the original value after
doing a rescan with preserve_case set to 1 and running the preserve_case
tests.
Failure to do so was breaking the Oracle extra tests.
Peter Rabbitson [Wed, 7 Sep 2011 19:27:00 +0000]
Fix the failing pg tests (unicode wasn't slurped)
Rafael Kitover [Wed, 7 Sep 2011 11:07:26 +0000]
fix backcompat
Fixes generating the old moniker when upgrading from a previous code
version (v4 unsingularized monikers -> singularized.)
t/25backcompat.t passes again.
Rafael Kitover [Tue, 6 Sep 2011 08:21:41 +0000]
fix uninit warn for no pod and result_base_class
Rafael Kitover [Tue, 6 Sep 2011 08:16:11 +0000]
fix multiple DEFAULT NULLs
$info->{default_value} = \'null'
is unsafe because Data::Dump optimizes
refs to constants, so we must make sure to use:
my $null = 'null';
$info->{default_value} = \$null;
for all scalar refs in the dump.
Rafael Kitover [Tue, 6 Sep 2011 07:44:10 +0000]
fix defaults broken by last Pg defaults fix commit
Rafael Kitover [Tue, 6 Sep 2011 07:23:04 +0000]
update Changes with Pg defaults fixes
Rafael Kitover [Tue, 6 Sep 2011 07:18:58 +0000]
improve Pg default handling
Correctly handles these cases:
- <type> DEFAULT NULL
- boolean DEFAULT 0::boolean
Rafael Kitover [Thu, 18 Aug 2011 20:55:09 +0000]
sort unique constraints
Relationships and unique constraints are now sorted by name in the
Result files to cut down on pointless diff spam in version control.
This commit also adds checking for the SCHEMA_LOADER_TESTS_NOCLEANUP
environment variable when removing the test sqlite DBs used by various
tests, this allows for inspecting them with the sqlite3 shell.
Rafael Kitover [Mon, 30 May 2011 20:01:46 +0000]
multi db_schema support
Allows putting multiple schemas or databases and schemas into the
db_schema option. Supports cross-schema foreign keys where available. On
Sybase ASE, MSSQL and Informix multiple databases as well as schemas are
supported (but only Sybase ASE allows cross-database foreign keys.)
Adds the moniker_parts option for resolving name clashes when using
multiple schemas that have tables with the same name.
Table names are now represented by the ::Table class (all the code for
which is in the ::DBObject superclass.) There is also ::Table::Sybase
for Sybase ASE and MSSQL as well as ::Table::Informix for Informix. In
the future other database objects such as sequences may use the
::DBObject class.
Currently there are extra tests for objects in separate schemas and
cross-schema relationships for each database separately, these may later
be merged into the common tests in some fashion.
All database backends are up to date with respect to their capabilities
for fully qualified table names, with some exceptions.
- no support for dblinks in Oracle
- no support for serverlinks in MSSQL
- no support for databases attached as namespaces in SQLite
For SQLite, Firebird and MS Access it is possible to pass a single
db_schema and have DBIC names qualified with it, but this capability is
primarily for testing and deployment.
Rafael Kitover [Wed, 10 Aug 2011 08:58:14 +0000]
silence comment tests
Adds quiet => 1 to loader_options for the comment tests to disable the
"Dumping manual schema..." warnings.
Rafael Kitover [Wed, 10 Aug 2011 08:47:26 +0000]
update Changes with dbicdump config file support
Rafael Kitover [Sun, 7 Aug 2011 12:57:12 +0000]
opt deps for dbicdump config and test
Adds Config::Any to dbicdump_config group in ::Optional::Dependencies
and Config::Any with Config::General to the test_dbicdump_config group.
Adds t/60dbicdump_config.t test for using a config file with dbicdump.
Al Newkirk [Tue, 26 Jul 2011 07:39:52 +0000]
config file support for dbicdump script
Changes dbicdump so that if only one parameter is given it is used as
the config file loaded with Config::Any. The config file must have the
keys schema_class and connect_info, and optionally loader_options.
Rafael Kitover [Fri, 5 Aug 2011 08:44:15 +0000]
pigs don't fly, they just roll around in shit
Revert commit
f1740f1b11e070f4e794fa43c606323d3ef528ab.
Rafael Kitover [Fri, 5 Aug 2011 06:34:28 +0000]
some changes to filter code
Renames filter_generated_text => filter_generated_code.
Changes the filter coderef signature to take the type of file being
filtered, 'schema' or 'result'.
Adds support for setting the option to a string which is used as an
external filter program.
Updates Changes.
Ben Tilly [Wed, 3 Aug 2011 23:24:25 +0000]
adds the ability to filter generated code
Adds the filter_generated_text option which takes a coderef for
filtering the generated code. The coderef takes the class and code as
parameters.
Matt S Trout [Tue, 2 Aug 2011 13:05:43 +0000]
flying pigs. almost as likely as win32 doing what you wanted it to.
Rafael Kitover [Tue, 2 Aug 2011 10:07:38 +0000]
minor changes to table/column comment code
Updates Changes.
Mentions Oracle support in generate_pod POD in ::Loader::Base.
Adds checking for generic comments via ->next::method in ::DBI::Oracle
as well.
Wraps table/column comment queries for MySQL on information_schema in
try blocks, as not all versions of MySQL have information_schema (5.0+
do.)
Changes MySQL comment tests to use the new slurp_file util.
Makes the test messages in t/30_*.t more clear.
Ben Tilly [Fri, 22 Jul 2011 23:03:34 +0000]
generic comments mechanism, MySQL specific support
Adds support for the table_comments and column_comments tables, which
override the db-specific metadata comment support in ::Loader::DBI.
Documents these tables in ::Loader::Base .
Also adds support for MySQL table and column comments from
information_schema.
Rafael Kitover [Mon, 25 Jul 2011 19:28:28 +0000]
fucking pigs broke my Win32 perl
The fucking pigs did something to my Win32 perl so that command line
args with special characters like [] and {} are not parsed correctly.
This problem does not show up for CPAN testers running these tests,
t/23dumpmore.t and t/26dump_use_moose.t .
This commit adds a check for refs in loader options or connect_info in
the t/lib/dbixcsl_dumper_tests.pm test lib, and skips tests on Win32 if
the FUCKING_PIGS environment variable is set.
Rafael Kitover [Mon, 25 Jul 2011 13:02:55 +0000]
support alternate line endings
Adds a utility method slurp_file to ::Utils for reading files in UTF-8
and converting the CRLFs or LFs inside to the platform \n. Changes all
uses of File::Slurp::read_file to slurp_file and changes some regexes to
match \r? at line ends.
Rafael Kitover [Sun, 24 Jul 2011 17:04:15 +0000]
fix t/10_11msaccess_common.t on non-Win32
Changes a "use Win32::OLE" to a require where needed.
Rafael Kitover [Sun, 24 Jul 2011 16:30:17 +0000]
fix backcompat tests
Updates the RelBuilder classes to take into account that
->_inflect_singular and ->_inflect_plural return a list instead of a
scalar now.
Rafael Kitover [Sun, 24 Jul 2011 05:23:03 +0000]
add quiet option
Also adds some improvements to the t/lib/dbixcsl_dumper_tests.pm test
library:
- list warnings if warning count doesn't match
- fixes undefined warning if there are more expected warnings than
received warnings
Rafael Kitover [Sat, 23 Jul 2011 18:15:44 +0000]
make $schema->loader a public method
Also adds some TODO entries, adds Task::Weaken to dependencies and
removes a duplicate dependency on List::MoreUtils.
Ben Tilly [Sat, 9 Jul 2011 19:19:03 +0000]
Removing these files from master because they are not for the next release.
I will recreate them on a branch, as I originally intended to.
Ben Tilly [Thu, 7 Jul 2011 23:46:55 +0000]
Add failing test for feature I want.
Rafael Kitover [Tue, 5 Jul 2011 09:30:55 +0000]
add schema_components option
Rafael Kitover [Tue, 5 Jul 2011 08:00:05 +0000]
sort relationships
Rafael Kitover [Fri, 3 Jun 2011 21:24:55 +0000]
better option validation for result_component_map, result_role_map and rel_collision_map
Rafael Kitover [Tue, 14 Jun 2011 14:53:55 +0000]
add handle for Ben Tilly in CONTRIBUTORS
Rafael Kitover [Tue, 14 Jun 2011 04:37:54 +0000]
add rel_name_map option
Rafael Kitover [Fri, 10 Jun 2011 17:37:16 +0000]
fix syntax error in common tests
Rafael Kitover [Fri, 10 Jun 2011 16:54:56 +0000]
fix the decimal data type for MS Access over ODBC
Rafael Kitover [Fri, 10 Jun 2011 14:24:08 +0000]
handle MySQL enums/sets containing elements with single quotes
Rafael Kitover [Fri, 10 Jun 2011 10:52:55 +0000]
another enum test for MySQL
Rafael Kitover [Fri, 10 Jun 2011 04:55:58 +0000]
fix enum/set detection for MySQL (RT#68717)
Caleb Cushing [Thu, 9 Jun 2011 21:07:20 +0000]
document dumping a remote host
Signed-off-by: Caleb Cushing <xenoterracide@gmail.com>
Rafael Kitover [Thu, 9 Jun 2011 13:44:50 +0000]
fix is_nullable detection on MS Access
Rafael Kitover [Tue, 7 Jun 2011 08:44:02 +0000]
fix POD for scalarref tables
Rafael Kitover [Tue, 7 Jun 2011 07:55:46 +0000]
fix backcompat tests
Rafael Kitover [Tue, 7 Jun 2011 07:49:52 +0000]
fix uniq_to_primary test on DB2 and SQLAnywhere
Rafael Kitover [Tue, 7 Jun 2011 06:02:22 +0000]
improve uniq_to_primary test
Rafael Kitover [Mon, 6 Jun 2011 10:37:11 +0000]
only promote uniqs with non-nullable columns to pks
Rafael Kitover [Fri, 3 Jun 2011 20:22:35 +0000]
run col_accessor_map tests with skip_rels too
Rafael Kitover [Wed, 1 Jun 2011 04:43:25 +0000]
update Changes
Rafael Kitover [Mon, 30 May 2011 20:05:15 +0000]
fix test counts, cleanup new test table
Rafael Kitover [Mon, 30 May 2011 15:29:23 +0000]
added uniq_to_primary option to promote unique keys to primary keys (RT#25944)
Rafael Kitover [Mon, 30 May 2011 14:23:26 +0000]
reset _uniqs_started for POD on rescan
Rafael Kitover [Mon, 30 May 2011 14:08:11 +0000]
generate POD for unique constraints, set_primary_key and table
Rafael Kitover [Sun, 29 May 2011 21:12:04 +0000]
fix t/backcompat/0.04006/23dumpmore.t
Rafael Kitover [Sun, 29 May 2011 20:38:50 +0000]
fix Oracle
Rafael Kitover [Sun, 29 May 2011 20:36:12 +0000]
fix t/23dumpmore.t
Rafael Kitover [Sun, 29 May 2011 15:49:47 +0000]
support arrayrefs for result_namespace and resultset_namespace (RT#40214)
Rafael Kitover [Sun, 29 May 2011 13:34:35 +0000]
fix clasing test dbs
Rafael Kitover [Sat, 28 May 2011 20:20:36 +0000]
fixup POD
Rafael Kitover [Sat, 28 May 2011 15:04:23 +0000]
add more naming options
Rafael Kitover [Sat, 28 May 2011 01:46:05 +0000]
fix warning, fix test counts
Rafael Kitover [Sat, 28 May 2011 00:40:42 +0000]
run the preserve rel name test on MySQL too
Rafael Kitover [Fri, 27 May 2011 14:50:17 +0000]
support quoted PostgreSQL schema names with special chars (RT#64766)
Rafael Kitover [Thu, 26 May 2011 20:54:46 +0000]
automatically turn on quoting for MySQL (RT#60469)
Rafael Kitover [Thu, 26 May 2011 19:50:56 +0000]
become utf8-aware (RT#67920)
Rafael Kitover [Thu, 26 May 2011 13:48:08 +0000]
check for relname accessor collisions on duplicate disambiguation
Rafael Kitover [Thu, 26 May 2011 04:26:12 +0000]
workaround for common tests for MySQL on Win32
Rafael Kitover [Wed, 18 May 2011 02:24:16 +0000]
handle duplicate relationship names (RT#64041)
Rafael Kitover [Tue, 24 May 2011 15:24:33 +0000]
Revert "set cascade_update => 0 on might_have relationships"
This reverts commit
9b1dd93554ec8f70923940e2ae88e2e0260d0b55.
Rafael Kitover [Tue, 24 May 2011 15:15:28 +0000]
set cascade_update => 0 on might_have relationships
Rafael Kitover [Fri, 20 May 2011 10:26:44 +0000]
change a couple references in Base POD to links
Mark A. Stratman [Thu, 19 May 2011 14:46:51 +0000]
Fixed typo in S::L::Base POD
Rafael Kitover [Wed, 18 May 2011 02:30:05 +0000]
add asterisks to items in POD class lists
Rafael Kitover [Tue, 17 May 2011 21:02:24 +0000]
generate POD for result_base_class as well
Rafael Kitover [Tue, 17 May 2011 20:34:38 +0000]
generate POD for additional_classes, additional_base_classes, left_base_classes, components, result_components_map, result_roles and result_roles_map
Rafael Kitover [Tue, 17 May 2011 18:59:41 +0000]
move roles to the end of the generated class so that "requires" works with columns/rels
Rafael Kitover [Tue, 17 May 2011 18:43:19 +0000]
add an extra symbol to the rt59849 test