Some DBMS (like PostgreSQL) supports arrays and SQL::Abstract itself
support them via array_datatypes => 1 option. See
http://search.cpan.org/~frew/SQL-Abstract-1.73/lib/SQL/Abstract.pm#Inserting_and_Updating_Arrays
But DBIx::DataModel pre-validates data passed to update() and insert()
methods and ignores arrays.
DBIx::DataModel::ConnectedSource:237-248
$to_set->apply_column_handler('to_DB');
# remove references to foreign objects
# leave refs to SCALAR or REF because they are used by SQLA for
verbatim SQL
my @sub_refs = grep {my $reftype = reftype($to_set->{$_}) || '';
$reftype eq 'HASH' || $reftype eq 'ARRAY'}
grep {$_ ne '__schema'} keys %$to_set;
if (@sub_refs) {
carp "data passed to update() contained nested references : ",
CORE::join ", ", @sub_refs;
delete @{$to_set}{@sub_refs};
}
Technically its quite simple to make $reftype eq 'ARRAY' check
conditional on $schema->sql_abstract->{array_datatypes}
As another possible solution is to avoid extra validation if there are
user defined to_DB/from_DB. This is probably not so safe, but more
flexible to let users to pass everything they want to SQL::Abstract.
BTW, I was able to pass array to -where using the following syntax:
column => { '=' => \['?', \@array ] }
Please let me know if you have any plans to add support for arrays in
the nearest future. Also I can try to make the changes myself and send
you a patch for review.