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
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 529
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.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-18811-1304954325-1583.68040-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 464
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!)
From jonathan.barber [...] gmail.com Mon May 9 12: 23:11 2011
MIME-Version: 1.0
X-Spam-Status: No, score=-6.209 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_HI=-5, RFC_ABUSE_POST=0.001, SPF_NEUTRAL=0.779, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=ham
In-Reply-To: <rt-3.8.HEAD-18811-1304954326-1160.68040-6-0 [...] rt.cpan.org>
X-Spam-Flag: NO
References: <RT-Ticket-68040 [...] rt.cpan.org> <rt-3.8.HEAD-18811-1304954326-1160.68040-6-0 [...] rt.cpan.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <BANLkTinWiH=CHJdAXCR1TunFP5RUTKB1HA [...] mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
X-Spam-Score: -6.209
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] gmail.com
Authentication-Results: hipster.bestpractical.com (amavisd-new); domainkeys=pass header.from=jonathan.barber [...] gmail.com
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 11BFC241A61 for <cpan-bug+Dancer-Plugin-SimpleCRUD [...] hipster.bestpractical.com>; Mon, 9 May 2011 12:23:11 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Tslr7v9S+J7e for <cpan-bug+Dancer-Plugin-SimpleCRUD [...] hipster.bestpractical.com>; Mon, 9 May 2011 12:23:09 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 2A072241A5C for <bug-Dancer-Plugin-SimpleCRUD [...] rt.cpan.org>; Mon, 9 May 2011 12:23:08 -0400 (EDT)
Received: (qmail 26713 invoked by uid 103); 9 May 2011 16:23:08 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 9 May 2011 16:23:08 -0000
Received: from mail-iy0-f178.google.com (HELO mail-iy0-f178.google.com) (209.85.210.178) by 16.mx.develooper.com (qpsmtpd/0.80/v0.80-19-gf52d165) with ESMTP; Mon, 09 May 2011 09:23:06 -0700
Received: by iyi12 with SMTP id 12so4714193iyi.9 for <bug-Dancer-Plugin-SimpleCRUD [...] rt.cpan.org>; Mon, 09 May 2011 09:23:03 -0700 (PDT)
Received: by 10.42.145.130 with SMTP id f2mr6743324icv.325.1304958183696; Mon, 09 May 2011 09:23:03 -0700 (PDT)
Received: by 10.231.152.1 with HTTP; Mon, 9 May 2011 09:23:03 -0700 (PDT)
Delivered-To: cpan-bug+Dancer-Plugin-SimpleCRUD [...] hipster.bestpractical.com
Subject: Re: [rt.cpan.org #68040] Updating tables return errors with PostgreSQL
Domainkey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=JS9H9eKhgU+pGmpPZiCqFjYXoN4Gbd73LtgnADFLfCXlpyxOaTuynGr53SoAI5efNc ARB5pjBu0ZJ9UPA/MhDxx4dV7xK7WZFFnzbB/epNZIDnQsz6yYSqgWdMbtfRza339jzK /b4/pC6JtB5yQtX2fbpDTROxG5A6XgB+eajJk=
Return-Path: <jonathan.barber [...] gmail.com>
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=6hVacisNB3BIMSbW1gZ6CTFEK6N+8NLMqH3gO8ecyTQ=; b=RsyH5iD7EjPVPXTo0k4fJgiMyZKkMKONvkgumWhF1M8aEmn1Q7109hcVqRmGK+9Ulr AGFq4TkQr2eFFR4QXh8p2WkAbXshzAPGeEA4rfjsuUuqe+QdFUNi+HM4yrSskTUR8Csg aZ7UKiQX8CCOT16MiU8CIhEguDdre1Em8Gk6I=
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: cpan-bug+Dancer-Plugin-SimpleCRUD [...] hipster.bestpractical.com
X-RT-Mail-Extension: dancer-plugin-simplecrud
Date: Mon, 9 May 2011 17:23:03 +0100
X-Spam-Level:
To: bug-Dancer-Plugin-SimpleCRUD [...] rt.cpan.org
Content-Transfer-Encoding: quoted-printable
From: Jonathan Barber <jonathan.barber [...] gmail.com>
RT-Message-ID: <rt-3.8.HEAD-18807-1304958191-1230.68040-0-0 [...] rt.cpan.org>
Content-Length: 1005
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.
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-18811-1304954325-1583.68040-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <rt-3.8.HEAD-18811-1304954325-1583.68040-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-18807-1304979626-1051.68040-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 1174
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.