Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Dancer-Plugin-SimpleCRUD CPAN distribution.

Report information
The Basics
Id: 68040
Status: resolved
Priority: 0/
Queue: Dancer-Plugin-SimpleCRUD

People
Owner: Nobody in particular
Requestors: jonathan.barber [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.02
Fixed in: (no value)



Subject: Updating tables return errors with PostgreSQL
Download (untitled) / with headers
text/plain 529b
Setting the SQL::Abstract argument quote_char to the backtick character ('`') doesn't work with PostgreSQL. When submitting a change to the database, the following error is returned: DBD::Pg::db do failed: ERROR: syntax error at or near "`" LINE 1: UPDATE `widgets` SET `note` = $1 WHERE ( `id` = $2 ) ^ at /.../lib/site_perl/5.12.3/Dancer/Plugin/SimpleCRUD.pm line 358. Line 358 is: my $sql = SQL::Abstract->new( quote_char => '`' ); I just removed the quote_char argument and the module started working fine.
Download (untitled) / with headers
text/plain 464b
Ah, thank you for the helpful report! I'll get a new version out very soon to fix this. I'll probably move away from using SQL::Abstract entirely, and just use the quick_insert() / quick_update() etc functions in recent Dancer::Plugin::Database versions instead. (They weren't added to D::P::Database when I started writing D::P::SimpleCRUD, so I used SQL::Abstract; I may as well get rid of the dependency on SQL::Abstract and just use them now they're there!)
Subject: Re: [rt.cpan.org #68040] Updating tables return errors with PostgreSQL
Date: Mon, 9 May 2011 17:23:03 +0100
To: bug-Dancer-Plugin-SimpleCRUD [...] rt.cpan.org
From: Jonathan Barber <jonathan.barber [...] gmail.com>
Download (untitled) / with headers
text/plain 1005b
On 9 May 2011 16:18, David Precious via RT <bug-Dancer-Plugin-SimpleCRUD@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=68040 > > > Ah, thank you for the helpful report! > > I'll get a new version out very soon to fix this.
Cool, I've just started playing around with Dancer, and was looking to see what the quickest way to get data in and out of a DB was, and D:P:SimpleCrud won! So many thanks for writing the module. One other thing, I noticed that the POD DESCRIPTION refers to HTML::FormFu, but the module doesn't seem to use it. Show quoted text
> I'll probably move away from using SQL::Abstract entirely, and just use > the quick_insert() / quick_update() etc functions in recent > Dancer::Plugin::Database versions instead.  (They weren't added to > D::P::Database when I started writing D::P::SimpleCRUD, so I used > SQL::Abstract; I may as well get rid of the dependency on SQL::Abstract > and just use them now they're there!)
Ah, that look interesting, I'll have to give it a go.
Download (untitled) / with headers
text/plain 1.1k
On 2011-05-09 16:18:45, BIGPRESH wrote: Show quoted text
> Ah, thank you for the helpful report! > > I'll get a new version out very soon to fix this.
Version 0.03 is on its way to CPAN now :) I've removed the dependency on SQL::Abstract entirely, and used the convenience methods provided by Dancer::Plugin::Database, so you should find that it will work fine with PostgreSQL now. (I haven't had a chance to test against PostgreSQL to confirm, but I know the stuff in Dancer::Plugin::Database has been tested with PostgreSQL (as well as MySQL, SQLite, and I think others...) I've also updated the POD to replace the mistaken references to HTML::FormFu with CGI::FormBuilder. Version 0.03 also includes new searching functionality I've been meaning to release for a while :) Thanks for your helpful report - if you find any other issues or have any suggestions, I'd love to hear from you. Do bear in mind that Dancer::Plugin::SimpleCRUD is still young and still needs some work to become a "polished product" (having said that, though, I'm happily using it myself, including within a web app for a client which has been in production for quite some time with no complaints). Cheers!


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.