Parent

Methods

Class Index [+]

Quicksearch

Sequel::Postgres::StatementCache::Statement

A simple structure used for the values in the StatementCache’s hash. It does not hold the related SQL, since that is used as the key for the StatementCache’s hash.

Attributes

last_seen[RW]

The last time this statement was seen by the cache, persumably the last time it was executed.

num_executes[RW]

The total number of executions since the statement entered the cache.

cache_id[R]

The id related to the statement, used as part of the prepared statement name.

Public Class Methods

new(cache_id) click to toggle source

Used when adding entries to the cache, just sets their id. Uses 0 for num_executes since that is incremented elsewhere. Does not set last_seen since that is set elsewhere to reduce branching.

    # File lib/sequel/extensions/pg_statement_cache.rb, line 60
60:         def initialize(cache_id)
61:           @num_executes = 0
62:           @cache_id = cache_id
63:         end

Public Instance Methods

name() click to toggle source

The name to use for the server side prepared statement. Note that this statement might not actually be prepared.

    # File lib/sequel/extensions/pg_statement_cache.rb, line 67
67:         def name
68:           "sequel_pgap_#{cache_id}"
69:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.