On Sun, 27 May 2007, [EMAIL PROTECTED] wrote:

[DbIx::Class] How to execute stored procedure?

I have a problem with generation of model for catalyst. It's required to use 
MSSQL Server stored procedures, but i don't understand how can I do it with 
DDIx::Class?

The specificity of MSSQL is a call of SP it using STRICT SYNTAX

<EXECUTE sp_name param1, param2>


NOT SUPPORTED SYNTAX

<select * from sp_name>

Have you any suggestions?
---
P.S. I have one decision but it's not so pretty.
There is.

  1. Call SP in Catalyst controller through DBI.
  2. Create Static class for SP result (static table in DB).
  3. Using standard DBIx methods for tables to retrieve SP result into a model.



There's an entry in the Cookbook on how to make a resultsource for any sql you like, including "select * from my_sp()" or whatever.. tried looking at it ?

Jess


_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to