From: Brandon Black Date: Sun, 12 Feb 2006 22:50:56 +0000 (+0000) Subject: docs updates / version bump for 0.02000 X-Git-Tag: 0.03000~21 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=89ecd854bc20494eaf22db9057969a69d4e199c8;p=dbsrgits%2FDBIx-Class-Schema-Loader.git docs updates / version bump for 0.02000 --- diff --git a/Changes b/Changes index d866f40..ead1704 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,8 @@ Revision history for Perl extension DBIx::Class::Schema::Loader +0.02000 Sun Feb 12 22:43:47 UTC 2006 + - Just docs/version update, 0.01004 code released as 0.02000 + 0.01004 Tue Feb 7 03:58:01 UTC 2006 - No longer tries to parse out the table name from the dsn for mysql, was unneccesary vestigial code from previous method. diff --git a/META.yml b/META.yml index 6137726..858167a 100644 --- a/META.yml +++ b/META.yml @@ -1,6 +1,6 @@ --- name: DBIx-Class-Schema-Loader -version: 0.01004 +version: 0.02000 author: - 'Brandon Black, C' abstract: Dynamic definition of a DBIx::Class::Schema @@ -20,7 +20,7 @@ build_requires: provides: DBIx::Class::Schema::Loader: file: lib/DBIx/Class/Schema/Loader.pm - version: 0.01004 + version: 0.02000 DBIx::Class::Schema::Loader::DB2: file: lib/DBIx/Class/Schema/Loader/DB2.pm DBIx::Class::Schema::Loader::Generic: diff --git a/README b/README index c7c1842..98a4aed 100644 --- a/README +++ b/README @@ -42,15 +42,9 @@ SYNOPSIS my $classes = $schema1->loader->classes; # Use the schema as per normal for DBIx::Class::Schema - my $rs = $schema1->resultset($monikers->{table_table})->search(...); + my $rs = $schema1->resultset($monikers->{foo_table})->search(...); DESCRIPTION - THIS IS A DEVELOPMENT RELEASE. This is 0.01xxx, the first public - releases. Expect things to be broken in various ways. Expect the entire - design to be fatally flawed. Expect the interfaces to change if it - becomes neccessary. It's mostly here for people to poke at it and find - the flaws in it. 0.02 will hopefully have some sanity when we get there. - DBIx::Class::Schema::Loader automates the definition of a DBIx::Class::Schema by scanning table schemas and setting up columns and primary keys. @@ -63,6 +57,23 @@ DESCRIPTION This module requires DBIx::Class 0.05 or later, and obsoletes DBIx::Class::Loader for DBIx::Class version 0.05 and later. + While on the whole, the bare table definitions are fairly + straightforward, relationship creation is somewhat heuristic, especially + in the choosing of relationship types, join types, and relationship + names. The relationships generated by this module will probably never be + as well-defined as hand-generated ones. Because of this, over time a + complex project will probably wish to migrate off of + DBIx::Class::Schema::Loader. + + It is designed more to get you up and running quickly against an + existing database, or to be effective for simple situations, rather than + to be what you use in the long term for a complex database/project. + + That being said, transitioning your code from a Schema generated by this + module to one that doesn't use this module should be straightforward and + painless, so don't shy away from it just for fears of the transition + down the road. + METHODS load_from_connection Example in Synopsis above demonstrates the available arguments. For @@ -75,6 +86,12 @@ METHODS during construction. See the DBIx::Class::Schema::Loader::Generic docs for more information on the available loader methods there. +KNOWN BUGS + Aside from relationship definitions being less than ideal in general, + this version is known not to handle the case of multiple relationships + between the same pair of tables. All of the relationship code will be + overhauled on the way to 0.03, at which time that bug will be addressed. + AUTHOR Brandon Black, "blblack@gmail.com" diff --git a/TODO b/TODO index 73ab417..47604db 100644 --- a/TODO +++ b/TODO @@ -3,7 +3,8 @@ Reminders to myself or whoever else ever looks in here... SQLite needs some heavy refactoring, the subroutines are becoming too complex to understand easily. -Consider: +Relationship stuff: + Fix multiple rels between same pair of tables If local column is UNIQUE or PK, use has_one() for relation? Re-scan relations/tables after initial relation setup to find ->many_to_many() relations to be set up? Check NULLability of columns involved in the relationship, which might suggest a more optimal non-default -join-type? diff --git a/lib/DBIx/Class/Schema/Loader.pm b/lib/DBIx/Class/Schema/Loader.pm index a9a4b35..6c403e2 100644 --- a/lib/DBIx/Class/Schema/Loader.pm +++ b/lib/DBIx/Class/Schema/Loader.pm @@ -10,7 +10,7 @@ use UNIVERSAL::require; # Always remember to do all digits for the version even if they're 0 # i.e. first release of 0.XX *must* be 0.XX000. This avoids fBSD ports # brain damage and presumably various other packaging systems too -our $VERSION = '0.01004'; +our $VERSION = '0.02000'; __PACKAGE__->mk_classaccessor('loader'); @@ -59,17 +59,10 @@ DBIx::Class::Schema::Loader - Dynamic definition of a DBIx::Class::Schema my $classes = $schema1->loader->classes; # Use the schema as per normal for DBIx::Class::Schema - my $rs = $schema1->resultset($monikers->{table_table})->search(...); + my $rs = $schema1->resultset($monikers->{foo_table})->search(...); =head1 DESCRIPTION -THIS IS A DEVELOPMENT RELEASE. This is 0.01xxx, the first public -releases. Expect things to be broken in various ways. Expect the -entire design to be fatally flawed. Expect the interfaces to change if -it becomes neccessary. It's mostly here for people to poke at it and -find the flaws in it. 0.02 will hopefully have some sanity when we get -there. - DBIx::Class::Schema::Loader automates the definition of a DBIx::Class::Schema by scanning table schemas and setting up columns and primary keys. @@ -82,6 +75,22 @@ db-specific subclass for an unsupported db. This module requires L 0.05 or later, and obsoletes L for L version 0.05 and later. +While on the whole, the bare table definitions are fairly straightforward, +relationship creation is somewhat heuristic, especially in the choosing +of relationship types, join types, and relationship names. The relationships +generated by this module will probably never be as well-defined as +hand-generated ones. Because of this, over time a complex project will +probably wish to migrate off of L. + +It is designed more to get you up and running quickly against an existing +database, or to be effective for simple situations, rather than to be what +you use in the long term for a complex database/project. + +That being said, transitioning your code from a Schema generated by this +module to one that doesn't use this module should be straightforward and +painless, so don't shy away from it just for fears of the transition down +the road. + =head1 METHODS =head2 load_from_connection @@ -119,6 +128,14 @@ that was used during construction. See the L docs for more information on the available loader methods there. +=head1 KNOWN BUGS + +Aside from relationship definitions being less than ideal in general, +this version is known not to handle the case of multiple relationships +between the same pair of tables. All of the relationship code will +be overhauled on the way to 0.03, at which time that bug will be +addressed. + =head1 AUTHOR Brandon Black, C