phildeman has asked for the wisdom of the Perl Monks concerning the following question:
I am using SQL Server, and I can't find any documentation on how to define the syntax that will address varchar(max).
For example:
__PACKAGE__->table( 'myTable' ); =head ACCESSORS =head2 id data_type: 'integer' is_nullable: 0 =head2 title data_type: 'varchar' is_nullable: 0 size: 200 =head2 Description data_type: 'varchar' is_nullable: 1 size: max =cut __PACKAGE__->add_columns( "id" { data_type => "integer", is_nullable => 0 } "title" { data_type => "varchar", is_nullable => 0, size => 200 } "Description" { data_type => "varchar", is_nullable => 1, size => max } ); __PACKAGE__->set_primary_key("id");
I get the following error when attempting to run perl -wc app.pm:
Bareword "max" not allowed while "strict subs" in use at mydbapp.pm
I attempted to use dbcidump to build the database package, but ran into difficulties with SQL Server.
So, I build the package myself, based previous DBIx::Class database packages for SQL Server.
Is there any one with experience on this issue that can guide me. Thanks.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How To Represent varchar(max) in DBIx::Class
by 1nickt (Canon) on Jan 08, 2018 at 01:44 UTC | |
by phildeman (Scribe) on Jan 08, 2018 at 02:13 UTC |