Module | Sequel::Postgres::StatementCache::DatabaseMethods
In: | lib/sequel/extensions/pg_statement_cache.rb

### Methods

alter_table drop_table extended

### Public Class methods

extended(db)

Setup the after_connect proc for the connection pool to make sure the connection object is extended with the appropriate module. This disconnects any existing connections to ensure that all connections in the pool have been extended appropriately.

[Source]

         # File lib/sequel/extensions/pg_statement_cache.rb, line 276
    276:         def self.extended(db)
    277:           # Respect existing after_connect proc if one is present
    278:           pr = db.opts[:after_connect]
    279:
    280:           # Set the after_connect proc to extend the adapter with
    281:           # the statement cache support.
    282:           db.pool.after_connect = db.opts[:after_connect] = proc do |c|
    283:             pr.call(c) if pr
    284:             c.extend(AdapterMethods)
    285:           end
    286:
    287:           # Disconnect to make sure all connections get set up with
    288:           # statement cache.
    289:           db.disconnect
    290:         end

### Public Instance methods

alter_table(*)

Clear statement caches for all connections when altering tables.

[Source]

         # File lib/sequel/extensions/pg_statement_cache.rb, line 293
    293:         def alter_table(*)
    294:           clear_statement_caches
    295:           super
    296:         end

drop_table(*)

Clear statement caches for all connections when dropping tables.

[Source]

         # File lib/sequel/extensions/pg_statement_cache.rb, line 299
    299:         def drop_table(*)
    300:           clear_statement_caches
    301:           super
    302:         end

[Validate]