On Feb 19, 2008 11:04 AM, John Siracusa <[EMAIL PROTECTED]> wrote:
> Anyone have any
> opinions or experiences to share?
It's great. Fast svn, easy wiki, easy bug tracking, good mailing list
support, no waiting for project approval. I recommend it.
- Perrin
On Thu, Feb 14, 2008 at 4:06 PM, Ken Prows <[EMAIL PROTECTED]> wrote:
> Sorry, I forgot to include the limit arg in my example. I do use limit
> so that I can page the data. I need to know the total matches so that I
> can determine how many pages there are.
In that case, I recommend that you a
On Thu, Feb 14, 2008 at 3:30 PM, Ken Prows <[EMAIL PROTECTED]> wrote:
> I am trying to find a way to use MySQL's FOUND_ROWS() feature with Rose:
>
>
> http://dev.mysql.com/doc/refman/5.0/en/information-functions.html#function_found-rows
>
> I am most interested in getting this to work with my Ma
On Feb 8, 2008 1:43 PM, John Siracusa <[EMAIL PROTECTED]> wrote:
> * Caching of db objects during mod_perl server start-up is now turned
> off by default, with new API to turn it back on and do the necessary
> pre-fork clean-up that this entails. This change solved a segmentation
>
On Nov 27, 2007 11:21 PM, David Lloyd <[EMAIL PROTECTED]> wrote:
> Ron Savage wrote:
> > You mean like SQL::Abstract?
> > http://search.cpan.org/~nwiger/SQL-Abstract-1.22/
>
> I was thinking the same thing...does that not do what the OP wishes it to?
SQL::Abstract is very limited. It doesn't even
On Nov 27, 2007 2:41 PM, maxim <[EMAIL PROTECTED]> wrote:
> its useful when you have XML based framework where your backend is
> trying to reflect some XML schema and you dont what to remap XML on the DB
> schema but just using it.
If you really want to use XML for your backend storage, I'd sugges
On Nov 26, 2007 11:39 PM, John Siracusa <[EMAIL PROTECTED]> wrote:
> I suppose you could simulate it by building
> up Perl data structures suitable for passing in a get_objects() query
> parameter (i.e., value/hashref pairs and so on) but that's not quite
> the same thing.
That's what I've done an
On Nov 14, 2007 10:31 AM, John Siracusa <[EMAIL PROTECTED]> wrote:
> We use
> mod_perl, Informix, MySQL, an MVC web application framework, and (of
> course :) Rose::DB::Object and Rose::HTML::Objects.
When is the Rose web framework coming to CPAN? I'm ready for it.
- Perrin
Hmm, why not use DBI->connect_cached for this?
- Perrin
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a
On 9/29/07, Richard Jones <[EMAIL PROTECTED]> wrote:
> Is there an equivalent to the Catalyst DBIC::Profiler available for
> Rose? I'm looking for something to output SQL query timing in the
> browser.
DBI::Profile and the DBI tracing options should give you what you
want. They work with any data
On 8/17/07, John Siracusa <[EMAIL PROTECTED]> wrote:
> But really, I'd like to solve this somehow so the default way works as
> well. It would be nice if I could ask Apache::DBI not to call
> reset_startup_state(), perhaps by passing a special connect attribute:
Do you think that Apache::DBI shou
On 8/15/07, Graham Barr <[EMAIL PROTECTED]> wrote:
> So either init_dbh needs to be able to detect that the $dbh it gets is a
> reuse of an existing connection, or Rose::DB->new needs to return the same
> object for all calls for the same connection.
Even if init_dbh is changed, I think Apache::DB
On 8/15/07, Michael Lackhoff <[EMAIL PROTECTED]> wrote:
> Well, I didn't switch AutoCommit on or off and I didn't do a rollback
> myself, so the question remains why the default configuration with
> Apache::DBI and init_db(MyApp::DB->new) does a rollback when the
> database is accessed from a new d
On 8/14/07, John Siracusa <[EMAIL PROTECTED]> wrote:
> I looked for that and didn't see it, and still don't see it.
Sorry, this was actually changed already. I was looking at an older release.
- Perrin
-
This SF.net email i
On 8/14/07, John Siracusa <[EMAIL PROTECTED]> wrote:
> Doesn't Apache::DBI just care that $dbh->{AutoCommit} is false at the
> time it checks in the cleanup handler?
Look further up in the code. It never pushes the handler unless
AutoCommit is off. Probably a mistake in my opinion. If others
ag
On 8/14/07, John Siracusa <[EMAIL PROTECTED]> wrote:
> The simplest way to do this is to leave everything as per the
> defaults, and just use Apache::DBI.
Note that Apache::DBI also does the automatic rollback for you, but
only if you have AutoCommit off when you connect. If you connect with
Auto
On 8/14/07, Michael Lackhoff <[EMAIL PROTECTED]> wrote:
> Only question: Is it really possible to call rollback as a class method
> or do I have to call it on the specific object that started the transaction?
You have to call it on the database handle that started the
transaction. If all of your
On 8/14/07, Michael Lackhoff <[EMAIL PROTECTED]> wrote:
> Well, my understandig was that if perl dies within a transaction it (or
> DBI) would do a rollback, from your answer I guess this is not the case.
No. Your database will do it if you cut the connection and there is
uncommitted work, but pe
On 8/14/07, Michael Lackhoff <[EMAIL PROTECTED]> wrote:
> my $db = MyApp::DB->new;
> $self->my_db($db); # a new db for a new transaction
> $db->begin_work; # Start transaction
>
> ... create two objects and save them ...
>
> die "Does it roll back?";
> $db->commit;
I don't see any rollback there.
On 6/22/07, Michael Lackhoff <[EMAIL PROTECTED]> wrote:
> I didn't get a result. Within the authentication handler I stuffed an
> object (or even a simple string) into $r->pnotes and tried to write it
> to the logfile from the authorization handler but it was empty, the
> same test worked with $c->
On 6/22/07, Michael Lackhoff <[EMAIL PROTECTED]> wrote:
> Thanks for the hint! This almost did it. Some tests showed that I had
> to use the connection-variant of pnotes in my setup:
>
> use Apache2::ConnectionUtil;
> # grab the connection object;
> my $c = $r->connection;
You really shouldn't nee
On 6/20/07, Michael Lackhoff <[EMAIL PROTECTED]> wrote:
> Is this possible? I tried $r->dir_config(user_obj => $rdbo_user_obj); from
> the mod_perl
> documentation but that didn't work.
I think you're looking for this:
$r->pnotes(user_obj => $rdbo_user_obj);
- Perrin
---
On 4/16/07, Tim Bunce <[EMAIL PROTECTED]> wrote:
> > If there's an exception, I believe DBI issues a rollback automatically,
>
> Nope.
Yes, I was looking at the DESTROY code, not the error handling code.
I was talking to Bill about this off-list and he showed me a case
where my strategy fails. I
On 4/14/07, Bill Moseley <[EMAIL PROTECTED]> wrote:
> So when that die is called the transaction is rolled back and nothing
> sub outer() or do_stuff_and_send_mail() did is in the database. But,
> the mail still got sent (probably saying something happened that
> didn't.)
It sound like you want a
On 4/13/07, Bill Moseley <[EMAIL PROTECTED]> wrote:
> Catalyst does wrap the requests in eval, so if a controller dies you
> have to look for the exception stuffed int $c->errors somewhere
>
> If you don't mind doing a rollback on all requests then that sure
> makes things nice and simple. Thanks.
On 4/13/07, Bill Moseley <[EMAIL PROTECTED]> wrote:
> So, for example, in Catalyst in an end() (or something at the end) you
> would look for errors and then do a rollback, otherwise commit? And
> you look at AutoCommit to see if you need to do either of those, I
> assume.
No, it's much simpler t
On 4/12/07, Peter Karman <[EMAIL PROTECTED]> wrote:
> here's my (admittedly buggy) code for doing this. It caches a single dbh for
> each unique RDB registry entry combination of domain.type.dsn. I know that it
> breaks under mod_perl -- anyone spot why? (the error I get is from Pg:
> "prepared
>
On 4/12/07, Bill Moseley <[EMAIL PROTECTED]> wrote:
> Speaking of transactions -- anyone ever asked for nested transaction
> support?
We had a semi-long discussion about that a few weeks back, which you
can find in the archives.
> > > What about using Ima::DBI? Would that stomp on RDB?
You'd pr
On 4/11/07, John Siracusa <[EMAIL PROTECTED]> wrote:
> If you db supports it, you could try going into a serialized isolation
> mode and then doing all your operations in a single transaction.
It does. "SET TRANSACTION ISOLATION LEVEL repeatable read" will cause
all of your SELECT statements to b
On 3/29/07, James Masters <[EMAIL PROTECTED]> wrote:
> Mod Perl sounds very tempting
> but doesn't sound like it works too well with win32; Had enough
> trouble getting Rose working on win32 - spent days on it!
I don't use Windows myself, but the Win32 packages that Randy Kobes
supports for mod_pe
On 3/16/07, Christopher H. Laco <[EMAIL PROTECTED]> wrote:
> But doesn't that act of using a raw dbh from inside of a model, defeat
> the purpose of models/MVC to begin with?
Well, now you're getting into what MVC means and how it gets
implemented by systems like Catalyst. I think the "controller
On 3/16/07, Christopher H. Laco <[EMAIL PROTECTED]> wrote:
> So, I have my Cat models all
> provide commit() and rollback().
I wouldn't do that. This is a function of your database connection,
not of individual row objects. DBI already provides commit/rollback,
and that's the level where it shou
On 3/16/07, Christopher H. Laco <[EMAIL PROTECTED]> wrote:
> My point is, there's no sane way to do a big jumble of code in one DB
> transaction without having to go code diving for a dbh to work against,
> ala 'local $dbh->{AutoCommit} and such.
So you're saying that one of your tools is trying t
On 3/16/07, Christopher H. Laco <[EMAIL PROTECTED]> wrote:
> Totally a side tangent, but when you start using your schema classes
> from RDBO/DBIC/CDBI in things like Catalyst as Models, and maybe using
> many of them at the same time in one transaction, that whole "Just use
> the dbh" falls apart.
On 3/16/07, James Masters <[EMAIL PROTECTED]> wrote:
> Just wondering - does Rose deal with transactions, rollbacks etc. "under the
> hood" (or "under the bonnet" as we say in England) and is therefore ACID
> compliant?
You really don't need any help from your object-relational mapper to
use trans
On Wed, 2007-01-17 at 17:33 -0500, John Siracusa wrote:
> I was ignoring strict mode for the purposes of this exploration. Even
> in "crazy old MySQL mode" I think the "describe table" output should
> more closely match what's returned by DBD::mysql in COLUMN_DEF.
I agree, that sounds like a bug
On Wed, 2007-01-17 at 10:01 -0500, John Siracusa wrote:
> I'm forwarding this private email thread to the list with the
> permission of the (now anonymized) sender because it's about an
> unexpected situation that many RDBO users may face. Yes, it revolves
> around yet another fun feature of MySQL
On Mon, 2007-01-15 at 16:00 -0500, Robert James Kaes wrote:
> So, a different error, but still an error when I touch the file.
Sorry to say it, but not all modules work with Apache2::Reload. There
is no official way to reload a module in perl, so all it does is delete
the module from %INC, load i
Tim Bunce wrote:
> Just to be clear on this: The *DBI driver* does not do that.
>
> For MySQL the underlying db client library does that by default.
> (I think that's also true for Postgres.) Oracle client libs default to
> prefetching one extra row but DBD::Oracle tells it to prefetch about two
>
John Siracusa wrote:
> Finally, if you only want to turn this on for particular calls, remember
> that the db is an optional argument to all Manager methods. You can always
> make/get a $db, yank out the $dbh, set the attribute manually, and pass the
> $db as a parameter to your Manager calls.
>
Jonathan Vanasco wrote:
> i simply don't know of anyone handling large
> amounts of data with mysql and NOT having several dedicated staff to
> deal with mysql and data integrity alone.
Now you do. We have multiple databases with 80 million+ row tables, no
dedicated DBAs, and no data integr
Randal L. Schwartz wrote:
> Anyone using MySQL these days is for one of two reasons:
>
> 1) Legacy
> 2) Ignorance
>
> Both of those are curable.
There's no cure for speed, flexibility, and ease of use though. :)
- Perrin
-
Neal Clark wrote:
> Ideally, I will be making iterators from SQL calls. The SQL will
> limit the number of rows as best as I can, but there will be times I
> need to iterate over every row. I read in one of the CPAN docs that
> Rose::DB::Object::Iterator returns 'true iterators', i.e. the row
Jonathan Vanasco wrote:
> lock table
> read last_used_number( year )
> increment last_used_number( year )
> unlock table
This can also be done in a one-shot, without needing to explicitly lock
anything:
UPDATE foo SET id = id+1 WHERE
Michael Lackhoff wrote:
> Though it seems to slightly defeat the point in using
> RDBO: To have Perl, classes and methods instead of SQL, tables and
> columns.
Abstraction is certainly one reason to use an ORM, but I think it's a
bad idea to stick strictly with your ORM if it prevents you from
Michael Lackhoff wrote:
> I need some pseudo-unique numbers like invoice numbers. They start every
> year with 1, so autoincrement won't work. My idea was to use a helper
> table with just just two fields 'year' and 'last_used_number'. Is it
> enough to create a two column unique key or would it be
Peter Leonard wrote:
> Rose::DB::Object::Cached would be a likely choice, except we're looking
> at a multi-server cache - as Jonathan mentioned above, memcached is our
> intended target.
Sure, but it's probably easier to modify the storage part of
Rose::DB::Object::Cached to hit memcached than
Peter Leonard wrote:
> I understand the complexity involved, and what we're looking for is the
> quick storage & retrieval of the underlying data
It sounds like you want to cache the data. Did you consider expanding
Rose::DB::Object::Cached to use your data storage of choice instead of
memory?
On Wed, 2006-08-09 at 01:38 -0400, Jonathan Vanasco wrote:
> if so, does it DEALLOCATE the statement handle?
Won't that be the same as just turning off server-side statement
handles?
- Perrin
-
Using Tomcat but need to do m
Hi,
Here's a patch that fixes a problem with how IN queries are handled when
bind values are not used. It was flattening scalar refs into strings
rather than de-referencing them, but only when binds are off.
I tried to follow your indentation style. I shifted the bind variations
around a bit be
I'm using the QueryBuilder from some of my code, and it has been working
quite well. I have a case where the behavior surprised me and I'm
wondering if I misunderstood the docs.
The docs show this:
query => [ legs => { gt_sql => 'eyes' } ]
This results in "legs > eyes" with no quoting. However,
John Siracusa wrote:
> "The time zone of the DateTime object that results from a successful parse
> is set to the value of the time_zone option, if defined. Otherwise, it is
> set to the server_time_zone value of the object's db attribute using
> DateTime's set_time_zone method."
Nice feature.
>
Hi,
I'm looking at using Rose::DB::Object::QueryBuilder on its own (without
the rest of RDBO) to generate some SQL. It looks like this should work
fine. However, I'm finding the in_set and in_array methods very confusing.
According to the docs, 'COLUMN' => { in_set => 'A' } generates the SQL
On Thu, 2006-05-25 at 14:24 -0400, Guillermo Roditi wrote:
> is it really? because I couldn't figure it out. I dont want to use
> timestamps, and I dont know how to do it otherwise
Timestamps parse to DateTime objects as easily as datetime columns do.
This is what I use:
timestamp TIMESTAMP NOT NU
On Thu, 2006-05-25 at 13:26 -0400, Guillermo Roditi wrote:
> Basically the promblem is that I want default for a column to be
> NOW(). unfortunately that is getting insterted as -00-00 so my
> guess is that it's getting screwed up in the placeholder stage, and I
> can't just do default => Date
On Thu, 2006-03-09 at 19:00 -0300, Nilson Santos Figueiredo Junior
wrote:
> The main point really is code clearness and structure. It's an MVC
> framework and you're asking the model to do its job (the same happens
> to the view). It's really a thin wrapper, but a thin wrapper that
> guarantees tha
On Thu, 2006-03-09 at 00:11 -0300, Nilson Santos Figueiredo Junior
wrote:
> You get one nice thing, though: $c->model('Artist') (where $c is the
> Catalyst context object) returns the appropriate object for the
> "Artist" model.
I never understood the point of this. That code just replaces the na
On Thu, 2005-12-22 at 09:54 -0500, John Siracusa wrote:
> On 12/22/05 10:04 AM, Uwe Voelker wrote:
> > Manager's get_objects unconditionally returns "[EMAIL PROTECTED]", whereas
> > the
> > doc says it respects list context (and I vague remember it did some
> > releases ago).
>
> The docs are wro
On Mon, 2005-12-19 at 18:35 -0500, John Siracusa wrote:
> If the number of iterations is fixed, you get a usable wallclock time in the
> results.
The danger here is that cmpthese does not use that, so the compare
option is misleading. I got bitten by that once, assuming that
the :hireswallclock o
On Mon, 2005-12-19 at 17:30 -0500, John Siracusa wrote:
> Pass the "--time" and (optionally) the "--hi-res-time" flags to bench.pl to
> see a wall clock comparison.
Are you sure? I looked at Benchmark a while back trying to find a way
to measure wall time with cmpthese() and couldn't find one. I
On Mon, 2005-12-19 at 08:33 -0500, John Siracusa wrote:
> Yes, the db itself will usually be the biggest performance drain. But the
> point of this benchmark suite is to isolate the overhead caused by the ORM
> itself.
Aren't unnecessary extra queries the biggest source of overhead though?
That s
61 matches
Mail list logo