Re: [Catalyst] connecting to a remote sqlite

2007-10-14 Thread Matt S Trout
On Sat, Oct 13, 2007 at 12:07:54PM +, rahed wrote:
 On 10/12/07, Matt S Trout [EMAIL PROTECTED] wrote:
  On Fri, Oct 12, 2007 at 11:50:01AM +0200, rahed wrote:
   Without prefetch, there is no error. Is it possible (and which way) to
   retrieve data from a remote db via proxy with Catalyst?
 
  Yes, use a database that's network capable like mysql or postgres.
 
  Trying to use DBD::Proxy for this is a -heinous- hack and almost certainly
  not going to work (::Proxy is kinda limited, it doesn't supply half the DBI
  API ... really, don't try this. I've just about made it work, once, but it
  was far far FAR too painful for words)
 
 Thank you, now I know I needn't to try further.
 
 This was only an attempt to contact my production sqlite from a
 development box. I disliked to copy the db from one box to another when
 wanted to retrieve actual data.

Use a read-only NFS mount or something then.

... dear god, I just recommended NFS as a less hacky solution to something.
Kill me now.

-- 
  Matt S Trout   Need help with your Catalyst or DBIx::Class project?
   Technical Directorhttp://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Want a managed development or deployment platform?
http://chainsawblues.vox.com/http://www.shadowcat.co.uk/servers/

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] connecting to a remote sqlite

2007-10-13 Thread rahed
On 10/12/07, Matt S Trout [EMAIL PROTECTED] wrote:
 On Fri, Oct 12, 2007 at 11:50:01AM +0200, rahed wrote:
  Without prefetch, there is no error. Is it possible (and which way) to
  retrieve data from a remote db via proxy with Catalyst?

 Yes, use a database that's network capable like mysql or postgres.

 Trying to use DBD::Proxy for this is a -heinous- hack and almost certainly
 not going to work (::Proxy is kinda limited, it doesn't supply half the DBI
 API ... really, don't try this. I've just about made it work, once, but it
 was far far FAR too painful for words)

Thank you, now I know I needn't to try further.

This was only an attempt to contact my production sqlite from a
development box. I disliked to copy the db from one box to another when
wanted to retrieve actual data.

-- 
Radek

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] connecting to a remote sqlite

2007-10-12 Thread rahed
Hello,

I connect to a local sqlite db.
The data is being retrieved roughly like this:

my $rs = $c-model('MyAppDB::Table1')-search(
  undef,
{
 prefetch={
'rel1'={'rel2'=['table4','table5'] } },
 select=['me,id','me.pd'],
 as=[qw/id pd/],
},
 );

while (my $row = $rs-next) {

}

That's ok.
But If I try to connect remotely through DBD::Proxy, the Catalyst
application emits the following error:

DBIx::Class::ResultSet::next(): DBI Exception: DBD::Proxy::db ping
failed: Unexpected EOF while waiting for server reply at
/usr/local/lib/perl5/site_perl/5.8.8/RPC/PlClient.pm line 110.

Without prefetch, there is no error. Is it possible (and which way) to
retrieve data from a remote db via proxy with Catalyst?

Thanks.

-- 
Radek

___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[EMAIL PROTECTED]/
Dev site: http://dev.catalyst.perl.org/