Re: [CDBI] Using One Class to connect to multiple instances and more.

Jeff Pelkey <[email protected]> Sat, 4 Apr 2009 17:38:30 -0400
Newsgroups gmane.comp.lang.perl.modules.class-dbi
Message-ID <[email protected]>
--===============0301829337==
Content-Type: multipart/alternative; boundary=0016361e86c085a3690466c17c3b

--0016361e86c085a3690466c17c3b
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Thanks for the info and links!  I got that to work, but this week and I have
been told I am going to working on a new development project!  So I won't
start on the other project of replacing the legacy system until next fall.

In reading the other threads, I also looked at using DBIx::Class, but like
the ease of using CDBI and it's easier to teach our junior programmers.  One
of the jr programmers has caught on quickly and now she is creating the
basic regular classes and will be creating reports and test scripts on this
project.  I think she was really motivated to learn perl, when she heard
they wanted her to attend a COBOL programming seminar!  LOL!

Thanks for the info and the help! -- Jeff.

On Fri, Mar 20, 2009 at 10:48 PM, Michael G Schwern <[email protected]>wrote:

> Perrin Harkins wrote:
> > On Fri, Mar 20, 2009 at 6:44 PM, Jeff Pelkey <[email protected]>
> wrote:
> >> My question is this:  What is the best way to create one base to
> >> connect to all the instances and one regular class for each table.
> >> Then I just pass the region_id to the base class and have it connect
> >> to that instance.  Plus access all the tables using a variable that
> >> identifies each stores and connect to each table using that method?
> >
> > There are examples of dynamically switching between schemas on the
> > wiki.  Switching tables on the fly might be harder.  I'm not sure off
> > the top of my head what's being done at compile time.  But check the
> > wiki first and see what the examples there do for you.
>
> The wiki being here.
> http://wiki.class-dbi.com/wiki/Main_Page
>
> And the article on multiple databases here:
> http://wiki.class-dbi.com/wiki/Using_multiple_databases
>
>
> --
> I have a date with some giant cartoon robots and booze.
>



-- 
Jeff Pelkey

--0016361e86c085a3690466c17c3b
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Thanks for the info and links!=A0 I got that to work, but this week and I h=
ave been told I am going to working on a new development project!=A0 So I w=
on&#39;t start on the other project of replacing the legacy system until ne=
xt fall.<br>

<br>In reading the other threads, I also looked at using DBIx::Class, but l=
ike the ease of using CDBI and it&#39;s easier to teach our junior programm=
ers.=A0 One of the jr programmers has caught on quickly and now she is crea=
ting the basic regular classes and will be creating reports and test script=
s on this project.=A0 I think she was really motivated to learn perl, when =
she heard they wanted her to attend a COBOL programming seminar!=A0 LOL!=A0=
 <br>

<br>Thanks for the info and the help! -- Jeff.<br><br><div class=3D"gmail_q=
uote">On Fri, Mar 20, 2009 at 10:48 PM, Michael G Schwern <span dir=3D"ltr"=
>&lt;<a href=3D"mailto:[email protected]" target=3D"_blank">[email protected]=
om</a>&gt;</span> wrote:<br>

<blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, =
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><=
div>Perrin Harkins wrote:<br>
&gt; On Fri, Mar 20, 2009 at 6:44 PM, Jeff Pelkey &lt;<a href=3D"mailto:pel=
[email protected]" target=3D"_blank">[email protected]</a>&gt; wrote:<=
br>
&gt;&gt; My question is this: =A0What is the best way to create one base to=
<br>
&gt;&gt; connect to all the instances and one regular class for each table.=
<br>
&gt;&gt; Then I just pass the region_id to the base class and have it conne=
ct<br>
&gt;&gt; to that instance. =A0Plus access all the tables using a variable t=
hat<br>
&gt;&gt; identifies each stores and connect to each table using that method=
?<br>
&gt;<br>
&gt; There are examples of dynamically switching between schemas on the<br>
&gt; wiki. =A0Switching tables on the fly might be harder. =A0I&#39;m not s=
ure off<br>
&gt; the top of my head what&#39;s being done at compile time. =A0But check=
 the<br>
&gt; wiki first and see what the examples there do for you.<br>
<br>
</div></div>The wiki being here.<br>
<a href=3D"http://wiki.class-dbi.com/wiki/Main_Page" target=3D"_blank">http=
://wiki.class-dbi.com/wiki/Main_Page</a><br>
<br>
And the article on multiple databases here:<br>
<a href=3D"http://wiki.class-dbi.com/wiki/Using_multiple_databases" target=
=3D"_blank">http://wiki.class-dbi.com/wiki/Using_multiple_databases</a><br>
<font color=3D"#888888"><br>
<br>
--<br>
I have a date with some giant cartoon robots and booze.<br>
</font></blockquote></div><br><br clear=3D"all"><br>-- <br>Jeff Pelkey<br><=
br>

--0016361e86c085a3690466c17c3b--


--===============0301829337==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
ClassDBI mailing list
ClassDBI-Ra3b/[email protected]
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi

--===============0301829337==--