Hi Francois,

RAPPAZ Francois <francois.rap...@unifr.ch> writes:

> Hi there,
> My first mail as be truncated, so I repost:
> Can I send a raw sql string to a mysql DB using DBIX::Class ?
> If 
> $schema =  Dbc::Schema->connect( .);
> From the doc (under ResultSet->Search_litteral ) it seems that a 
> $schema->search function exists
> But
> $schema->search(\["select * from  ."]); does not work  (no search method in 
> schema)

That is a typo in the documentation, it should be '$rs->search(\[])'.
Sorry for the confusion.

> Thanks for any suggestion

For completely arbitrary SQL queries you need to use a virtual view:

https://metacpan.org/pod/DBIx::Class::ResultSource::View

> François

Regards,

Ilmari

-- 
"The surreality of the universe tends towards a maximum" -- Skud's Law
"Never formulate a law or axiom that you're not prepared to live with
 the consequences of."                              -- Skud's Meta-Law


_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk

Reply via email to