From patrick.may at mac.com Tue Nov 6 02:48:50 2012 From: patrick.may at mac.com (Patrick May) Date: Mon, 05 Nov 2012 21:48:50 -0500 Subject: [postmodern-devel] Tutorials, examples, and best practices Message-ID: <1FB3F526-3782-413C-96BE-C7074D07E40F@mac.com> Are there any collections of tutorials, examples, and/or best practices for Postmodern? For instance, I have a macro to wrap database operations: (defmacro with-test-database (&rest body) `(with-connection (list +test-database-name+ +test-database-user+ +test-database-password+ "localhost" :pooled-p t) , at body)) Obviously it needs some transaction support as well. Do other people use it this way? What are your most useful tips and tricks? Also, it took me some time fiddling around to get :insert-into to work correctly. It makes sense to me now, but a detailed example would have helped. I'm about to write some production code against a mid-sized, fully normalized database. Any lessons learned in those kinds of environments would be of interest. Thanks, Patrick From sabra.crolleton at gmail.com Mon Nov 19 07:04:33 2012 From: sabra.crolleton at gmail.com (Sabra Crolleton) Date: Sun, 18 Nov 2012 23:04:33 -0800 Subject: [postmodern-devel] Tutorials, examples, and best practices In-Reply-To: <1FB3F526-3782-413C-96BE-C7074D07E40F@mac.com> References: <1FB3F526-3782-413C-96BE-C7074D07E40F@mac.com> Message-ID: It is probably too basic for you, but you might find something useful at https://sites.google.com/site/sabraonthehill/postmodern-examples It is mostly just notes that I put together for someone on my staff. Cheers, Sabra On Mon, Nov 5, 2012 at 6:48 PM, Patrick May wrote: > Are there any collections of tutorials, examples, and/or best > practices for Postmodern? For instance, I have a macro to wrap database > operations: > > (defmacro with-test-database (&rest body) > `(with-connection (list +test-database-name+ > +test-database-user+ > +test-database-password+ > "localhost" > :pooled-p t) > , at body)) > > Obviously it needs some transaction support as well. Do other people use > it this way? What are your most useful tips and tricks? > > Also, it took me some time fiddling around to get :insert-into to > work correctly. It makes sense to me now, but a detailed example would > have helped. > > I'm about to write some production code against a mid-sized, fully > normalized database. Any lessons learned in those kinds of environments > would be of interest. > > Thanks, > > Patrick > > > _______________________________________________ > postmodern-devel mailing list > postmodern-devel at common-lisp.net > http://lists.common-lisp.net/cgi-bin/mailman/listinfo/postmodern-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: From patrick.may at mac.com Tue Nov 20 17:18:10 2012 From: patrick.may at mac.com (Patrick May) Date: Tue, 20 Nov 2012 12:18:10 -0500 Subject: [postmodern-devel] Tutorials, examples, and best practices In-Reply-To: References: <1FB3F526-3782-413C-96BE-C7074D07E40F@mac.com> Message-ID: <04D83F18-CB3D-4D96-8A72-EE54A4106618@mac.com> Sabra, Thanks, that's great stuff! Even simple examples showing how others use the package are valuable, and yours are far more detailed than I expected. Thanks again, Patrick On Nov 19, 2012, at 2:04 AM, Sabra Crolleton wrote: > It is probably too basic for you, but you might find something useful at > https://sites.google.com/site/sabraonthehill/postmodern-examples > > It is mostly just notes that I put together for someone on my staff. > > Cheers, > > Sabra > > > On Mon, Nov 5, 2012 at 6:48 PM, Patrick May wrote: > Are there any collections of tutorials, examples, and/or best practices for Postmodern? For instance, I have a macro to wrap database operations: > > (defmacro with-test-database (&rest body) > `(with-connection (list +test-database-name+ > +test-database-user+ > +test-database-password+ > "localhost" > :pooled-p t) > , at body)) > > Obviously it needs some transaction support as well. Do other people use it this way? What are your most useful tips and tricks? > > Also, it took me some time fiddling around to get :insert-into to work correctly. It makes sense to me now, but a detailed example would have helped. > > I'm about to write some production code against a mid-sized, fully normalized database. Any lessons learned in those kinds of environments would be of interest. > > Thanks, > > Patrick > > > _______________________________________________ > postmodern-devel mailing list > postmodern-devel at common-lisp.net > http://lists.common-lisp.net/cgi-bin/mailman/listinfo/postmodern-devel > > _______________________________________________ > postmodern-devel mailing list > postmodern-devel at common-lisp.net > http://lists.common-lisp.net/cgi-bin/mailman/listinfo/postmodern-devel -------------- next part -------------- An HTML attachment was scrubbed... URL: From attila.lendvai at gmail.com Wed Nov 21 13:50:15 2012 From: attila.lendvai at gmail.com (Attila Lendvai) Date: Wed, 21 Nov 2012 14:50:15 +0100 Subject: [postmodern-devel] Tutorials, examples, and best practices In-Reply-To: <1FB3F526-3782-413C-96BE-C7074D07E40F@mac.com> References: <1FB3F526-3782-413C-96BE-C7074D07E40F@mac.com> Message-ID: > I'm about to write some production code against a mid-sized, fully normalized database. Any lessons learned in those kinds of environments would be of interest. i'm not sure you'll find many things for direct copy-pasting, but here's an sql abstraction layer that has a postgresql backend: http://dwim.hu/darcsweb/darcsweb.cgi?r=HEAD%20hu.dwim.rdbms;a=headblob;f=/source/postgresql/backend.lisp -- attila Notice the erosion of your (digital) freedom, and do something about it! PGP: 2FA1 A9DC 9C1E BA25 A59C 963F 5D5F 45C7 DFCD 0A39 OTR XMPP: 8647EEAC EA30FEEF E1B55146 573E52EE 21B1FF06 From sabra.crolleton at gmail.com Wed Nov 21 21:01:50 2012 From: sabra.crolleton at gmail.com (Sabra Crolleton) Date: Wed, 21 Nov 2012 13:01:50 -0800 Subject: [postmodern-devel] Tutorials, examples, and best practices In-Reply-To: References: <1FB3F526-3782-413C-96BE-C7074D07E40F@mac.com> Message-ID: Attila, Any comments about things you discovered while writing or using this code? Cheers, Sabra On Wed, Nov 21, 2012 at 5:50 AM, Attila Lendvai wrote: > > I'm about to write some production code against a mid-sized, > fully normalized database. Any lessons learned in those kinds of > environments would be of interest. > > i'm not sure you'll find many things for direct copy-pasting, but > here's an sql abstraction layer that has a postgresql backend: > > > http://dwim.hu/darcsweb/darcsweb.cgi?r=HEAD%20hu.dwim.rdbms;a=headblob;f=/source/postgresql/backend.lisp > > -- > attila > > Notice the erosion of your (digital) freedom, and do something about it! > PGP: 2FA1 A9DC 9C1E BA25 A59C 963F 5D5F 45C7 DFCD 0A39 > OTR XMPP: 8647EEAC EA30FEEF E1B55146 573E52EE 21B1FF06 > > _______________________________________________ > postmodern-devel mailing list > postmodern-devel at common-lisp.net > http://lists.common-lisp.net/cgi-bin/mailman/listinfo/postmodern-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: