[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

unit-testing sql interactions

David Carlton

2/4/2007 7:24:00 PM

I'm relatively new to SQL, and I'd like to get my hands a bit dirtier.
So I'm writing a toy application (in Ruby, of course) to let me get
some more experience. And I'm avoiding high-level SQL libraries
(e.g. ActiveRecord) because I don't think I'd learn as much about SQL
that way.

The application will use MySQL, but I don't feel comfortable writing
code without unit tests, and I'd rather not use MySQL there. So the
way I'd imagine this working is going through some sort of
database-independent layer, which I can either hook up to MySQL or
some sort of in-memory database.

Questions:

0) Is that a reasonable way to proceed?

1) What's the right database-independent layer? ruby-odbc?

2) What should I use for the fast in-memory database for unit testing?
Googling suggests that SQLite is a possibility, but it's not clear
to me that it's the best choice for this task.

Thanks,
David Carlton
carlton@bactrian.org
7 Answers

tomcervo

5/14/2012 4:48:00 AM

0

On May 13, 10:00 pm, "Bob(but not THAT Bob)" <nob...@nowhere.com>
wrote:
> Stan Brown wrote:
>
> > On Sun, 13 May 2012 12:54:44 -0400, David wrote:
> > > the PBS version was
> > > reduced from the original broadcast by the BBC in January. Eight
> > > minutes was cut from the 90 minute length to fit PBS's scheduled
> > > running time. "They cut scenes. Good ones. What the hell...that makes
> > > no sense," one viewer complained on a Sherlock Tumblr blog. "It's
> > > frustrating..."
>
> > Gee, PBS snipped up a British import.  When has that ever happened
> > before?  We had this discussion about /Downton Abbey/, and probably
> > about others I can't recall.
>
> > Even the skeezy cable channels disclose when what they're showing is
> > not the original version but has had bits chopped out of it.  Does
> > PBS really think it will get away with trying to keep its hack job a
> > secret?
>
> > --
> > Stan Brown, Oak Road Systems, Tompkins County, New York, USA
> >                                    http://OakRoadS...
> > Shikata ga nai...
>
> That's why the TV god made Usenet downloads - to avoid the butchery PBS
> and BBCA do to all the Brit shows

Good God, you're not exactly talking about Olivier's Lear.
But I am tired of the cuts, because they frequently occur to allow
more room for some well-compensated minor star to introduce the show
("Og stoopid! Og need man to tell him what British is!") or a shill
for the DVD's which will show you what you missed in the broadcast
versions for only $35.
And it's very important that the show end exactly at 10.30 so we won't
miss a second of the affiliate's half-hour doc on barn painting.

Patty Winter

5/14/2012 5:19:00 AM

0


In article <MPG.2a19c875d3caed3a98d75f@news.individual.net>,
Stan Brown <the_stan_brown@fastmail.fm> wrote:
>
>Even the skeezy cable channels disclose when what they're showing is
>not the original version but has had bits chopped out of it. Does
>PBS really think it will get away with trying to keep its hack job a
>secret?

It's hardly a secret. It's been discussed plenty of times by people
involved with the show, I think including in the video of the New York
City event from a couple weeks ago that's posted on PBS's own website.


Patty

Stan Brown

5/14/2012 10:57:00 AM

0

On 14 May 2012 05:19:26 GMT, Patty Winter wrote:
>
> In article <MPG.2a19c875d3caed3a98d75f@news.individual.net>,
> Stan Brown <the_stan_brown@fastmail.fm> wrote:
> >
> >Even the skeezy cable channels disclose when what they're showing is
> >not the original version but has had bits chopped out of it. Does
> >PBS really think it will get away with trying to keep its hack job a
> >secret?
>
> It's hardly a secret. It's been discussed plenty of times by people
> involved with the show, I think including in the video of the New York
> City event from a couple weeks ago that's posted on PBS's own website.

Every other channel puts up a disclaimer at the start "Edited for
time and for content" or similar. Why is PBS above such disclosures?

Honestly, I don't know how it is in other countries, but our own
public television is really annoying with the small stuff: ever-
longer commercials while they still beg us for money, ever longer
pledgeathons to tell us how they don't interrupt programs, and more
and more frequently showing truncated versions of programs without
telling us.



--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadS...
Shikata ga nai...

Professor Bubba

5/14/2012 12:19:00 PM

0

In article <MPG.2a1aaefc130e7ab098d769@news.individual.net>, Stan Brown
<the_stan_brown@fastmail.fm> wrote:

> On 14 May 2012 05:19:26 GMT, Patty Winter wrote:
> >
> > In article <MPG.2a19c875d3caed3a98d75f@news.individual.net>,
> > Stan Brown <the_stan_brown@fastmail.fm> wrote:
> > >
> > >Even the skeezy cable channels disclose when what they're showing is
> > >not the original version but has had bits chopped out of it. Does
> > >PBS really think it will get away with trying to keep its hack job a
> > >secret?
> >
> > It's hardly a secret. It's been discussed plenty of times by people
> > involved with the show, I think including in the video of the New York
> > City event from a couple weeks ago that's posted on PBS's own website.
>
> Every other channel puts up a disclaimer at the start "Edited for
> time and for content" or similar. Why is PBS above such disclosures?
>
> Honestly, I don't know how it is in other countries, but our own
> public television is really annoying with the small stuff: ever-
> longer commercials while they still beg us for money, ever longer
> pledgeathons to tell us how they don't interrupt programs, and more
> and more frequently showing truncated versions of programs without
> telling us.


These Sherlock cuts may have been discussed "plenty of times" somewhere
or other, but the first word I got of them was right here, in this
thread. I don't know why PBS should be above putting up a disclaimer
at the time of broadcast.

David Johnston

5/14/2012 12:43:00 PM

0

On 5/14/2012 4:56 AM, Stan Brown wrote:
> On 14 May 2012 05:19:26 GMT, Patty Winter wrote:
>>
>> In article<MPG.2a19c875d3caed3a98d75f@news.individual.net>,
>> Stan Brown<the_stan_brown@fastmail.fm> wrote:
>>>
>>> Even the skeezy cable channels disclose when what they're showing is
>>> not the original version but has had bits chopped out of it. Does
>>> PBS really think it will get away with trying to keep its hack job a
>>> secret?
>>
>> It's hardly a secret. It's been discussed plenty of times by people
>> involved with the show, I think including in the video of the New York
>> City event from a couple weeks ago that's posted on PBS's own website.
>
> Every other channel puts up a disclaimer at the start "Edited for
> time and for content" or similar.

That's what you think. Those notices only appear in front of former
theatrical movies. TV series episodes are butchered freely without
notification.


Jim G.

5/14/2012 7:11:00 PM

0

David Johnston sent the following on 5/14/2012 7:43 AM:
> On 5/14/2012 4:56 AM, Stan Brown wrote:
>> On 14 May 2012 05:19:26 GMT, Patty Winter wrote:
>>>
>>> In article<MPG.2a19c875d3caed3a98d75f@news.individual.net>,
>>> Stan Brown<the_stan_brown@fastmail.fm> wrote:
>>>>
>>>> Even the skeezy cable channels disclose when what they're showing is
>>>> not the original version but has had bits chopped out of it. Does
>>>> PBS really think it will get away with trying to keep its hack job a
>>>> secret?
>>>
>>> It's hardly a secret. It's been discussed plenty of times by people
>>> involved with the show, I think including in the video of the New York
>>> City event from a couple weeks ago that's posted on PBS's own website.
>>
>> Every other channel puts up a disclaimer at the start "Edited for
>> time and for content" or similar.
>
> That's what you think. Those notices only appear in front of former
> theatrical movies. TV series episodes are butchered freely without
> notification.

There should be a difference between first-run stuff (from our
perspective on this side of the pond) and stuff that's been airing in
syndication for years.

--
Jim G. | Waukesha, WI
"I find it's best if you just ... go with it." -- Lincoln Lee, providing
us with FRINGE's "Every question just leads to more questions" moment

Adam H. Kerman

5/14/2012 7:48:00 PM

0

Stan Brown <the_stan_brown@fastmail.fm> wrote:

>Every other channel puts up a disclaimer at the start "Edited for
>time and for content" or similar. Why is PBS above such disclosures?

The federal law concerning notice to viewers of a cut for time applies
to movies, not television. No, Stan, you've never seen this notice in
second run syndication, notorious for cuts for time.