A Redleaf::Store that uses PostgreSQL. This module is based on the MySQL store and is compiled in when PostgreSQL is available. This store provides storage using the PostgreSQL open source database including contexts.
$Id$
Copyright © 2008-2009, Michael Granger All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
SVN Revision
SVN Id
Default options — the PostgreSQL backend requires that all of them be set, even if they’re empty.
Load the PostgreSQL-backed Redleaf::HashesStore from the specified database.
# File lib/redleaf/store/postgresql.rb, line 57 57: def self::load( database, opthash={} ) 58: return new( database, opthash.merge(:new => false) ) 59: end
Create a new Redleaf::PostgreSQLStore.
# File lib/redleaf/store/postgresql.rb, line 67 67: def initialize( name, opthash={} ) 68: opthash = symbolify_keys( opthash ) 69: self.log.debug "Symbolified keys: %p" % [ opthash ] 70: options = DEFAULT_OPTIONS.merge( opthash ) 71: 72: self.log.debug "Merged options are: %p" % [ options ] 73: return super( name, options ) 74: end
Returns true if the Store is persistent
# File lib/redleaf/store/postgresql.rb, line 78 78: def persistent? 79: return true 80: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.