Re: Implemented idea, feedback needed/welcome

"H.Merijn Brand" <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase.devel
Message-ID <[email protected]>
On Wed, 4 Aug 2010 19:50:36 +0200, Jens Rehsack
<[email protected]> wrote:

> 2010/8/4 H.Merijn Brand <[email protected]>:
> > http://www.xs4all.nl/~hmbrand/TD.tgz
> >
> >    use DBI;
> >    use Tie::DBD;
> >
> >    my $dbh = DBI->connect ("dbi:Pg:", ...);
> >
> >    tie my %hash, "Tie::DBD", $dbh;
> >    tie my %hash, "Tie::DBD", $dbh, "foo";
> >
> >    $hash{key} = $value;  # INSERT
> >    $hash{key} = 3;       # UPDATE
> >    delete $hash{key};    # DELETE
> >    $value = $hash{key};  # SELECT
> >
> > Please edit t/10_hash.t to do what you need to do to connect to Postgres
> > or Oracle. Support for MySQL, CSV, SQLite etc for later
> >
> > The reasoning behind this is that I have a small machine that connects
> > to a database and does a lot of calculations. To `cache' calculated
> > results, it uses a hash, which has outgrown the available memory space,
> > so I tied that with "DB_File" to disk. The system however didn't give
> > me enough space to store that, and the database server is huge and fast
> 
> Hi Merijn,
> 
> how does your module differ from Tie::DBI
> (http://search.cpan.org/dist/Tie-DBI/)?
> Or is it just a try to have a new start, because of the inactivity at Tie::DBI?

No idea how I could have missed that one :)

I'll look into that, and might submit some patches.

One of the things I started with is the fact that what I created
creates its own temp tables, whereas Tie::DBI requires existing tables.

Should be easy to extend though.

Thanks

-- 
H.Merijn Brand  http://tux.nl      Perl Monger  http://amsterdam.pm.org/
using 5.00307 through 5.12 and porting perl5.13.x on HP-UX 10.20, 11.00,
11.11, 11.23, and 11.31, OpenSuSE 10.3, 11.0, and 11.1, AIX 5.2 and 5.3.
http://mirrors.develooper.com/hpux/           http://www.test-smoke.org/
http://qa.perl.org      http://www.goldmark.org/jeff/stupid-disclaimers/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.