From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/64223 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.general Subject: [John Siracusa] Re: [RDBO] Quick Rose-y way to get value of Now() from the database Date: Tue, 02 Jan 2007 12:14:58 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1167846394 31285 80.91.229.12 (3 Jan 2007 17:46:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 3 Jan 2007 17:46:34 +0000 (UTC) Original-X-From: ding-owner+M12746@lists.math.uh.edu Wed Jan 03 18:46:32 2007 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1H2ABw-0006Ko-F1 for ding-account@gmane.org; Wed, 03 Jan 2007 18:46:20 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1H2ABI-0005vw-0p; Wed, 03 Jan 2007 11:45:40 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1H1nEg-0007mK-EW for ding@lists.math.uh.edu; Tue, 02 Jan 2007 11:15:38 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.63) (envelope-from ) id 1H1nEZ-0004pq-RO for ding@lists.math.uh.edu; Tue, 02 Jan 2007 11:15:38 -0600 Original-Received: from fw01.cmbrmaks.akamai.com ([80.67.64.10] helo=smtp1.akamai.com) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1H1nEY-0008L6-00 for ; Tue, 02 Jan 2007 18:15:30 +0100 Original-Received: from smtp1.akamai.com (vwall.kendall.corp.akamai.com [172.17.4.33]) by smtp1.akamai.com (8.13.8/8.12.10) with ESMTP id l02HEcgh016671 for ; Tue, 2 Jan 2007 12:14:38 -0500 (EST) Original-Received: from dhcp-65-162.kendall.corp.akamai.com (dhcp-65-165.kendall.corp.akamai.com [172.16.36.21]) by smtp1.akamai.com (8.13.8/8.12.10) with ESMTP id l02HEbHP016656 for ; Tue, 2 Jan 2007 12:14:38 -0500 (EST) Original-To: Ding Mailing List X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6;d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Followup-To: Ding Mailing List User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.92 (gnu/linux) X-Spam-Score: -2.5 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:64223 Archived-At: --=-=-= I'm not sure if this is a Gnus or TC or Emacs bug, since I don't know much about message-mode. I use Trivial Cite, and on followup to the attached message I get the following error. Does anyone know? Thanks Ted Debugger entered--Lisp error: (error "Invalid search bound (wrong side of point)") re-search-forward("\\([.?!][]\"'\xd0c9\x5397d)}]*\\($\\| $\\| \\| \\)\\|[\xd0a3\xd0a5\xd0a9\xd0aa\x90a3\x91ae\x91bf\x91a1\x250a4\x250a5\x250a9\x250aa\x190a4\x190a5\x190a9\x190aa]+\\)[ \n]*$" # t) fill-delete-newlines(691 # left nil nil) fill-region-as-paragraph(688 591 nil nil) fill-region(543 591) (let ((start-marker ...) (fill-prefix)) (insert (funcall tc-make-attribution)) (fill-region (marker-position start-marker) (point)) (setq start (point))) (if tc-make-attribution (let (... ...) (insert ...) (fill-region ... ...) (setq start ...))) (let ((start ...)) (setq tc-strings-list nil) (undo-boundary) (tc-fix-final-newline) (tc-parse-headers) (if tc-make-attribution (let ... ... ... ...)) (tc-remove-trailing-whitespace) (if tc-remove-signature (tc-do-remove-sig)) (tc-remove-trailing-whitespace) (if tc-max-lines (save-excursion ... ... ... ... ...)) (if tc-cite-marks (setq tc-cite-marks ...) (if tc-guess-cite-marks ... ...)) (setq tc-cite-marks (escape-char-range tc-cite-marks)) (tc-indent-citation) (if tc-normalize-cite-marks (tc-cleanup-cite-marks start ...)) (if tc-fill-column (tc-fill-cited-text start ...)) (setq tc-cite-marks nil) (tc-fix-signature-undo)) (save-excursion (if (< ... ...) (exchange-point-and-mark)) (let (...) (setq tc-strings-list nil) (undo-boundary) (tc-fix-final-newline) (tc-parse-headers) (if tc-make-attribution ...) (tc-remove-trailing-whitespace) (if tc-remove-signature ...) (tc-remove-trailing-whitespace) (if tc-max-lines ...) (if tc-cite-marks ... ...) (setq tc-cite-marks ...) (tc-indent-citation) (if tc-normalize-cite-marks ...) (if tc-fill-column ...) (setq tc-cite-marks nil) (tc-fix-signature-undo))) trivial-cite() ad-Orig-message-yank-original(nil) message-yank-original() gnus-inews-yank-articles((11924)) gnus-post-news(nil "nnimap+blockstar.com:INBOX.poop" [11924 "Re: [RDBO] Quick Rose-y way to get value of Now() from the database" "John Siracusa " "Fri, 29 Dec 2006 21:06:39 -0500" "" "<39C0CB79-8AB0-4DE1-B5B3-CBC1CAAE4733@2xlp.com>" 4643 36 "dhcp-65-162.kendall.corp.akamai.com INBOX.poop:11924" ((X-CRM114-Status . "Good ( pR: 44.4147 )") (To . "Rose-DB-Object "))] "*Article*" (11924) nil nil) gnus-summary-followup((11924) nil) gnus-summary-followup-with-original(nil) call-interactively(gnus-summary-followup-with-original) --=-=-= Content-Type: message/rfc822 Content-Disposition: inline Return-Path: Delivered-To: tzz@lifelogs.com Date: Fri, 29 Dec 2006 21:06:39 -0500 From: John Siracusa To: Rose-DB-Object Message-ID: Thread-Topic: [RDBO] Quick Rose-y way to get value of Now() from the database Thread-Index: AccrtyQ3Yoy7LZeqEdux7AAKlbpFBg== In-Reply-To: <39C0CB79-8AB0-4DE1-B5B3-CBC1CAAE4733@2xlp.com> Subject: Re: [RDBO] Quick Rose-y way to get value of Now() from the database Reply-To: siracusa@mindspring.com, "Rose\:\:DB\:\:Object list" List-Id: "Rose::DB::Object list" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: rose-db-object-bounces@lists.sourceforge.net MIME-Version: 1.0 On 12/29/06 8:57 PM, Jonathan Vanasco wrote: > On Dec 29, 2006, at 7:53 PM, John Siracusa wrote: >> If you jut want the value of now() in isolation, plain DBI is the way to go. >> (Wrap the code in a function or class method somewhere to hide the gory DBI >> details.) >> > the problem I see is that you can run into issues where NOW() is transaction > specific -- like in Postgres That's not a problem, so long as you do what you have to do anyway: share a single db connection among all pieces of code within a particular transaction. The function or class method to get the current value of now() should take a db or $dbh argument to allow this. > you could also try creating a new rose::db::object class of sql > helper items with 'result' as the only column-- then give it a > manager class and have functions select your 'result' into the > 'result' field. It's pretty easy to make a degenerate RDBO class and Manager to do this kind of thing, but it seems pretty "unclean" to me, and not worthwhile. -John ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object --=-=-=--