Noting like writing an email to trigger reading the docs again.
On Tue, Oct 7, 2014 at 11:43 AM, Bill Moseley wrote:
> I'm trying to just count number of database queries and the time spent
> waiting on the database.
>
Does this look correct?
my $h = DBI::Profile->new( Path
that go to the db
(e.g. "execute", "do").
Can I use DBI::Profile to just gather up counts to the database?
Thanks,
--
Bill Moseley
mose...@hank.org
ght be helpful to note
in the README that DBI_USER will default to 'postgres' if not set. (Don't
many distributions use that as the superuser and it is probably not
available for most normal users?)
--
Bill Moseley
mose...@hank.org
ot;2010"}
Notice how the deleted boolean and integer columns are quoted, but the "foo"
I injected is not quoted?
In a javascript library we are using it's seeing the deleted value as true.
So, I'm curious if I can make DBI (or DBD::Pg) return the non-text columns
looking like numbers to Perl.
I suppose I could do something silly like:
/^\d+$/ && ($_ += 0) for values %{$x};
which then returns:
{"artist":1,"name":"One first CD","foo":0,"deleted":0,"id":1,"year":2010}
--
Bill Moseley
mose...@hank.org
$DBI::neat_maxlen = 1;
DBI->trace(1);
<- connect('dbname=test_dev', 'moseley', ...)= DBI::db=HASH(0xb2f6a90)
at DBI.pm line 653
Anyway to show the full connect details?
$DBI::VERSION = "1.609";
--
Bill Moseley
mose...@hank.org
$dbh and then create a new $dbh.
Then wrap the request in eval block and rollback on errors.
Or maybe try this:
http://search.cpan.org/~dwheeler/DBIx-Connector-0.20/lib/DBIx/Connector.pm
--
Bill Moseley
mose...@hank.org
.
True. That's perhaps a bit easier to control since we are the ones
creating the functions.
But I do see your point.
Thanks,
--
Bill Moseley
mose...@hank.org
On Mon, Jul 6, 2009 at 10:26 PM, Jared Still wrote:
>
> On Mon, Jun 29, 2009 at 7:59 PM, Bill Moseley wrote:
>
>> What solutions are available, if any, to work with a master and multiple
>> slave database configuration that would be transparent to the application?
>&g
Postgresql.
Thanks,
--
Bill Moseley
mose...@hank.org
per \...@_;
return;
},
} qw/ prepare prepare_cached execute quote_identifier * /;
my $dbh = DBI->connect( 'dbi:Pg:', '', '',
{
RaiseError => 1,
AutoCommit => 1,
Callbacks => \%callbacks,
},
);
my $sth
ch.perl.org/src/TIMB/DBI-1.608/t/70callbacks.t
I was looking at the callbacks a few days ago. I wasn't clear what
all was available, but more importantly I couldn't see if it was
possible to also get the execute parameters. I assume it's not
possible with the callbacks. Is that c
trace to be able to selectively trace
some statements based on inspecting what caller() returns. Does DBI
have any existing hooks for doing this? What I want to see is
everything passed to the database. I can see this in the database
logs but I want to filter and add extra info based on caller().
t; right?
The \\% is translated to:
%
Which leaves the % unescaped.
I'll just remove "\" from the input. But thought this might be a
reasonably common situation (use % around a search string but not
allow % or _ to be special in the user data.
--
Bill Moseley
[EMAIL PROTECTED]
ight? So \\% is what
> you'd want, isn't it?
No, I don't want to give the user access to the % or _. I'm using
'%' . $user_string . '%'
but I don't want $user_string to have any special characters. If
$user_string includes \ or % or _ I want them to be literal, without
special meaning.
--
Bill Moseley
[EMAIL PROTECTED]
But if $search_pattern is '\%' then you end up with '\\%'.
I suppose the easy thing is to s/$esc//g first. What's the approach
if the $esc is a valid character for the column data?
--
Bill Moseley
[EMAIL PROTECTED]
like attributes are reset when connect_cached is called.
I guess that's why Ima::DBI doesn't call connect_cached() unless ping
fails.
--
Bill Moseley
[EMAIL PROTECTED]
a in the column order specified in the query.
And also return the list of column names.
Thanks,
--
Bill Moseley
[EMAIL PROTECTED]
On Sat, Feb 11, 2006 at 01:22:49PM +, Tim Bunce wrote:
> On Fri, Feb 10, 2006 at 02:50:11PM -0800, Bill Moseley wrote:
> > I'd like to see all of the prepared_cached() and execute() statements
> > when tracing. Currently that output is truncated.
> >
> > Ho
I'd like to see all of the prepared_cached() and execute() statements
when tracing. Currently that output is truncated.
How do I change where it truncates?
Thanks,
--
Bill Moseley
[EMAIL PROTECTED]
t a good use
of heavy mod_perl processes.
Bill Moseley
mailto:[EMAIL PROTECTED]
Hi,
I've found a number of generic CGI scripts for simple table operations, but
nothing great. Is there one that's well-coded, where I can simply specify
the the column data types, and validation routines and be done? In a
perfect world it would be Template-Toolkit based, too.
Tha
21 matches
Mail list logo